Chapter 3 Terminal Specific Function Library
57
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.
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.
Return
If successful, it returns an integer whose value equals to the string length of the
decoded data.
Otherwise, it returns 0.
See Also
HaltScanner1, InitScanner1
HaltScanner1
Purpose
To stop the scanner port from operating.
Syntax
void HaltScanner1 (void);
Example
HaltScanner1();
Description
Once the scanner port is stopped from operating by this routine, it cannot be
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;}
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...