Metrologic Optimus S Programming Manual page 63

"c" programming guide
Table of Contents

Advertisement

Decode
Purpose
To perform barcode decoding.
Syntax
int Decode (void);
Example
while (1) { if (Decode()) break;}
Description
Once the scanner port is initialized by calling InitScanner1(), call this routine to
perform barcode decoding.
Return
If successful, it returns an integer whose value equals to the string length of the
decoded data.
Otherwise, it returns 0.
HaltScanner1, InitScanner1
See Also
HaltScanner1
Purpose
To stop the scanner port from operating.
Syntax
void HaltScanner1 (void);
Example
HaltScanner1();
Once the scanner port is stopped from operating by this routine, it cannot be
Description
restarted unless it is initialized again by calling InitScanner1().
It is recommended that the scanner port should be stopped if the barcode
decoding is not required for a long period of time.
Return
None
See Also
Decode, InitScanner1
InitScanner1
Purpose
To initialize the scanner port.
Syntax
void InitScanner1 (void);
Example
InitScanner1();
while (1) {if (Decode()) break;}
Chapter 3 Terminal Specific Function Library
This routine should be called constantly in user's program loops when
barcode decoding is required.
If the barcode decoding is not required for a long period of time, it is
recommended that the scanner port should be stopped by calling
HaltScanner1().
If the Decode function decodes successfully, the decoded data will be
placed in the string variable CodeBuf[] with a string terminating character
appended. And integer variable CodeLen, as well as the character variable
CodeType will reflect the length and code type of the decoded data
respectively.
57

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents