[sane-devel] scanner buttons

m. allan noah anoah@pfeiffer.edu
Fri, 9 Jul 2004 13:54:40 -0400 (EDT)


On Fri, 9 Jul 2004, David Stevenson wrote:

> > ok, here's a crazy idea- why not just reload the entire option array every 
> > few seconds? the backend then gets to decide what order to reload them in 
> > (i.e. load the 'mode' switch first, then change all the mode params, then 
> > load the 'scan' button press).
> > 
> > is this nuts?
> > 
> > allan
> > 
> 
> What sort of response time do we need?
> I am thinking of a scan button, having pushed the button when will the 
> user see some action? My feeling is less than one second is expected, 
> ideally much less. Which implies to me either the polling is very low 
> overhead or some sort of event triggered call back is needed.

fujitsu usb scanner driver polls every one or two seconds. the scanners 
only store button presses for 3. so if the front-end does not give 
control to the backend at least that often, the presses will get lost.

if we write the backend such that it only querys the status of the scanner 
on the first button, and the front-end has to go many options with a poll 
cap set, then it might be too long before we get back around to the first 
one.

i guess the backend to keep a time-stamp of the last time it called the 
status from the scanner. then whenever any option that might be affected 
by the status gets updated by the front-end, the backend could get the 
status. then store the status in a bitmap, and get the new option value 
from the bitmap.

still, the front-end spends alot of time looping over the options that are 
marked with certain caps.

allan

> 
> just a thought...
> David
> 
> (Henning sorry if this ends up double posting - I just sent from wrong 
> account )
> 
> 

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera