D028868 CR1500 CR1100 CR2700 JavaScript Programming Guide User Manual Page 17 of 41
The Code Corporation
12393 South Gateway Park Place, Suite 600, Draper, UT 84020
+1 (801) 495-2200
FAX +1 (801) 495-0280
Example:
reader.indicateError();
reader.shiftJisToUnicode
This method converts a valid shiftJIS string to unicode, and returns the resulting string.
Example:
myUnicodeString = reader.shiftJisToUnicode(shiftjisStr);
reader.unicodeToShiftJis
This method converts a valid Unicode string to a shiftJIS encoding, and returns the resulting
string.
Example:
uniString = reader.unicodeToShiftJis(unicodeStr):
reader.indicateData
reader.indicateWireless
reader.indicateBattery
reader.getKeyboardStatus
This method returns an integer representation of a byte value which corresponds to the
current keyboard status. The lowest order bit represents a keyboard “caps lock”. The next bit
represents a keyboard “num lock”.
Example:
keyStat = reader.getKeyboardStatus();
Reader Decodes Object
The decodes object is provided by the onDecodes function. The argument is an array of decode
objects (see onDecodes). The following properties are provided:
decodes[i].decoderType
decodes[i].valid
The decoder marks decoded data as valid or not valid. This flag can be used to signal to the
system that data has already been handled or ignore it.
Example:
var validDecode = decodes[i].valid;