sane-project-website/old-archive/2001-01/0116.html

148 wiersze
5.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: snapscan</TITLE>
<META NAME="Author" CONTENT="Henning Meier-Geinitz (hmg-ml@gmx.de)">
<META NAME="Subject" CONTENT="Re: snapscan">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: snapscan</H1>
<!-- received="Wed Jan 10 12:30:06 2001" -->
<!-- isoreceived="20010110203006" -->
<!-- sent="Wed, 10 Jan 2001 20:17:04 +0100" -->
<!-- isosent="20010110191704" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="hmg-ml@gmx.de" -->
<!-- subject="Re: snapscan" -->
<!-- id="20010110201704.A646@vortex.swb.de" -->
<!-- inreplyto="200101101021.LAA02078@siegel.math.uni-frankfurt.de" -->
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:hmg-ml@gmx.de?Subject=Re:%20snapscan&In-Reply-To=&lt;20010110201704.A646@vortex.swb.de&gt;"><EM>hmg-ml@gmx.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Wed Jan 10 2001 - 11:17:04 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0117.html">abel deuring: "Re: SANE and Linux kernel 2.4.0"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0115.html">Rene Rebe: "Re: help - hp 5300c"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0109.html">Christian Nassau: "snapscan"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0147.html">Christian Nassau: "Re: snapscan"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0147.html">Christian Nassau: "Re: snapscan"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#116">[ date ]</A>
<A HREF="index.html#116">[ thread ]</A>
<A HREF="subject.html#116">[ subject ]</A>
<A HREF="author.html#116">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>On Wed, Jan 10, 2001 at 11:21:03AM +0100, Christian Nassau wrote:
<BR>
<EM>&gt; *** Remarks on blocking/non-blocking mode
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; There seems to be some confusion or unclarity what one
</EM><BR>
<EM>&gt; should mean by these terms. Note that the SANE specs
</EM><BR>
<EM>&gt; don't say anything about it!
</EM><BR>
<P>The standard defines the meaning of blocking/non-blocking mode in
<BR>
chapter 4.3.10 (sane_read). Blocking/non-blocking describes the
<BR>
behaviour of sane_read in the case that no data is available. In
<BR>
blocking mode sane_read will wait until at least one byte is available
<BR>
(it &quot;blocks&quot;). In non-blocking mode it returns immediately (len=0).
<BR>
&nbsp;
<BR>
<EM>&gt; -- blocking mode (aka *strongly* blocking mode):
</EM><BR>
<EM>&gt; all of the data is fetched from the scanner (in the
</EM><BR>
<EM>&gt; first call to sane_read), then handed over to the frontend
</EM><BR>
<EM>&gt; in digestable pieces
</EM><BR>
<P>No blocking or non-blocking involved. It's completely up to the
<BR>
backend how it gets data from the scanner. Most backends start a
<BR>
reader process in sane_start and have some way of buffering data.
<BR>
<P><EM>&gt; -- simulated non-blocking mode:
</EM><BR>
<EM>&gt; program runs in strongly blocking mode but asks
</EM><BR>
<EM>&gt; only for a convenient amount of data,
</EM><BR>
<EM>&gt; data is then handed out to the frontend
</EM><BR>
<P>As Oliver said, the backend must provide any amount of data down to
<BR>
one byte per read.
<BR>
<P><EM>&gt; -- non-blocking mode
</EM><BR>
<EM>&gt; program runs in strongly blocking mode (for
</EM><BR>
<EM>&gt; the full image), but as a background process
</EM><BR>
<P>For blocking/non-blocking (from the SANE point of view) it's
<BR>
unimportant how the data was transmitted from the scanner to the
<BR>
backend. The backend may use 32 k buffers and wait until each buffer
<BR>
is transmitted to the frontend, use double buffering, or read all data
<BR>
from the scanner into one big buffer before returning the first byte
<BR>
through sane_read.
<BR>
<P>Bye,
<BR>
&nbsp;&nbsp;Henning
<BR>
<P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20snapscan&In-Reply-To=&lt;20010110201704.A646@vortex.swb.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0117.html">abel deuring: "Re: SANE and Linux kernel 2.4.0"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0115.html">Rene Rebe: "Re: help - hp 5300c"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0109.html">Christian Nassau: "snapscan"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0147.html">Christian Nassau: "Re: snapscan"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0147.html">Christian Nassau: "Re: snapscan"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#116">[ date ]</A>
<A HREF="index.html#116">[ thread ]</A>
<A HREF="subject.html#116">[ subject ]</A>
<A HREF="author.html#116">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Wed Jan 10 2001 - 12:33:08 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>