C Language Development Kit/Functions/ScannerOff

From OptiWiki

Jump to: navigation, search
Description Checks whether the scan-engine is off.
Syntax
int scanneroff(void);
Arguments None
Returns Zero when the scan-engine is on, a non zero positive integer when the scan-engine is off
Remarks Laser terminals:

The scan-engine is the part of the terminal that emits the laser beam and that processes variations in reflected laser light. When the laser beam is visible, the scan-engine is on, else it is off. The scan-engine is controlled by the function scannerpower().

Pen terminal DWT7133: The scan-engine is the part of the terminal that emits the LED light and that processes variations in reflected LED light. When the LED light is emitted, the scan-engine is on, else it is off. The scan-engine is controlled by the function scannerpower().

Example
// The following example shows how to implement 'continuous read' mode.
 
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    char bcr_buf[42];
    struct barcode code;
 
    code.min = 1;
    code.max = 41;
    code.text = bcr_buf;
 
    gotoxy( 0, 0);
    cursor( BLINKING );
 
    for(;;)
    {
        if( !scanneroff())
        {
            resetkey();
            if( readbarcode(  ) == OK )
            {
                goodreadled( GREEN, 10);
                sound( TSTANDARD, VHIGH, SMEDIUM, SHIGH, 0);
                scannerpower( ON, 250);
                gotoxy( 0, 0);
                printf("%s", code.text);
            }
        }
        else
            scannerpower( ON, 250);
    }
}


Views
Personal tools