[sane-devel] Well known sensor

Étienne Bersac bersace03 at gmail.com
Mon Mar 17 17:27:48 UTC 2008


Hi,

SANE allow hardware selected option. I call this "sensor" for short. It
can represent push button (like "scan", "cancel", "mail", etc.), wheel
button (ask Allan for details), paper sensor, cover sensor, etc. Some
device have blank button.

Unlike software selected option, frontend *must* understand the meaning
of a sensor. Software selection option can be dumped to user, title and
desc should be enough for the user. But sensor event must be
interpretted by the software.

Currently, backends often use "button %d" or "button-%d" which actually
does not help frontend to handle events.

The backend is aware of the meaning of sensor. It can know what value
mean what action according to either datasheet or device it self.

frontend needs an untranslated and extensible way to know what to do
with a value from a backend without user interaction.

I propose to extend the standard to provide well known hard selected
options. Here are some exemple :

      * "auto" (for e.g. blank button) : If the device is ready, this
        mean trigger scan, else it mean cancel, etc.
      * "scan" trigger scan start
      * "cancel" trigger scan cancelation
      * "mail" send output by mail (e.g. as attached image)
      * "print" send output to printer

We might append or prepend "sensor" before the actual name of the option
in order to avoid collision.

Can we please provide such well known sensor spec and implement it in
backends ?

Regards,
Étienne.




More information about the sane-devel mailing list