
B u i l d i n g P a c k e t s D y n a m i c a l l y
An application can use fixed packets or packets that change every time they are used, such as in an application where the operator enters the quantity for the batch. When packets change every time they are used, the application must build the packet dynamically.
SAMPLE3.C in the Samples
U s i n g t h e S c a n n e r
An application uses the printer’s scanner to read bar codes as follows:
1 . Enable the scanner with scnScannerOpen or scnOpenScannerShared.
2 . If necessary, configure the scanner using the scnGetxxx and scnSetxxx functions.
3 . Use any scanner function to operate the scanner. These functions are described in Chapter 4 and all begin with an scn prefix.
4 . Disable the scanner with scnCloseScanner.
SAMPLE5.C in the Samples
R e a d i n g T r i g g e r P u l l s
Pressing any key (including pulling the trigger) sends a code to the application for it to read. The trigger emulates an F11 as an extended character code. To read a trigger pull, the application reads two characters. If the first character is a zero and the second is 0x85, the operator pulled the trigger.
SAMPLE1.C in the Samples
Programming Techniques