The text of a manual · part 7 of 11
PSM20i Bar Code Scanner Attachment Programmer's Guide: Chapter 2 Function Definitions, pages 45 to 54
Pages 45 to 54 of 80, from PSM20i Bar Code Scanner Attachment Programmer's Guide
The original document is the PDF (773 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol PSM20i
Page 45
Function Definitions ean13 Class BarCodeReader
Description Enable or disable decoding of EAN-13 barcodes and set label options.
Invocation boolean upcEAN13(boolean enable) enable
= false - Disable EAN-13 decoding = true - Enable EAN-13 decoding
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader.ean13(true); Enable EAN-13 type barcodes.
2-31
Page 46
PSM20i Bar Code Scanner Attachment Programmer’s Guide ean8 Class BarCodeReader
Description Enable or disable decoding of EAN-8 barcodes and set label options.
Invocation boolean upcEAN8(boolean enable, boolean extend) enable
= false - Disable EAN-8 decoding = true - Enable EAN-8 decoding extend
= false - Do not convert EAN-8 to EAN-13 = true - Convert EAN-8 to EAN-13
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader.ean8(true, true); Enable EAN-8 type barcodes, extend EAN-8 to 13 characters.
2-32
Page 47
Function Definitions interleaved2of5 Class BarCodeReader
Description Enable or disables decoding of Interleaved 2 Of 5 bar codes and options. Note: It is highly recommended to use discrete lengths greater than 8 on low security barcodes, such as Discrete 2of5 and Interleaved 2of5, to avoid poor system performance.
Invocation boolean interleaved2of5 (boolean enable, byte checkdigit, byte options, byte len1, byte len2) enable
= false - Disable Interleaved 2 of 5 decoding = true - Enable Interleaved 2 of 5 decoding checkdigit
= 0 Disable check digit verification = 1 Enable USS check digit verification = 2 Enable OPCC check digit verification options
Sets Interleaved 2 of 5 bar code options. Bit mapped options logically OR’d as needed = 1 Transmit check digit = 2 Convert to EAN-13 len1
See len2 description len2
If len2 = 0 then len1 determines the discrete length of the bar code. If len1 > len2 then, two discrete lengths are acceptable, where len1 and len2 determine the actual lengths. If len1 < len2 then valid length of bar code falls within the range determined by len1 and len2 If len1 = len2 = 0, then any length of Interleaved 2 of 5 bar code is accepted.
2-33
Page 48
PSM20i Bar Code Scanner Attachment Programmer’s Guide
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader. interleaved2of5 ( true, (byte)0x01, (byte)0x03, (byte)0x00, (byte)0x00 ); Enable decoding of Interleaved 2of5 labels, enable check digit verification, transmit check digit, convert to EAN-13, and allow any length label.
2-34
Page 49
Function Definitions isbt128 Class BarCodeReader
Description Enable or disables decoding of ISBT-128 bar codes.
Invocation boolean isbt128 (boolean enable) enable
= false - Disable ISBT-128 decoding = true - Enable ISBT-128 decoding
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader. isbt128 (true); Enable decoding of ISBT-128.
2-35
Page 50
PSM20i Bar Code Scanner Attachment Programmer’s Guide msiPlessey Class BarCodeReader
Description Enable or disables decoding of MSI Plessey bar codes and options.
Invocation boolean msiPlessey (boolean enable, byte checkdigit, byte options, byte len1, byte len2) enable
= false - Disable MSI Plessey decoding = true - Enable MSI Plessey decoding checkdigit
= 0 Apply 1 check digit = 1 Apply 2 check digits options
Sets MSI Plessey bar code options. Bit mapped options logically OR’d as needed = 1 Transmit check digit = 2 Check digit algorithm, true = mod10/mod10; false = mod10/mod11 len1
See len2 description len2
If len2 = 0 then len1 determines the discrete length of the bar code. If len1 > len2 then, two discrete lengths are acceptable, where len1 and len2 determine the actual lengths. If len1 < len2 then valid length of bar code falls within the range determined by len1 and len2 If len1 = len2 = 0, then any length of Interleaved 2 of 5 bar code is accepted.
2-36
Page 51
Function Definitions
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader. msiPlessey ( true, (byte)0x01, (byte)0x03, (byte)0x00, (byte)0x00 ); Enable decoding of MSI Plessey labels, apply 2 check digits, transmit check digit, mod10/ mod10 check digit algorithm, convert to EAN-13, and allow any length label.
2-37
Page 52
PSM20i Bar Code Scanner Attachment Programmer’s Guide upcA Class BarCodeReader
Description Enable or disable decoding of UPC-A barcodes and set label options.
Invocation boolean upcA(boolean enable, boolean checkdigit, byte preamble) enable
= false - Disable UPC-A decoding = true - Enable UPC-A decoding checkdigit
= false - Do not send check digit = true - Send check digit preamble
= 0 Do not apply preamble character to label = 1 Apply system character as preamble to label = 2 Apply country code and system character as preamble to label
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader.upcA(true, false, (byte)0x02); Enable UPC-A type barcodes, do not send the check digit, and apply country code and system characters as a preamble to the label.
2-38
Page 53
Function Definitions upcE Class BarCodeReader
Description Enable or disable decoding of UPC-E barcodes and set label options.
Invocation boolean upcE(boolean enable, boolean checkdigit, byte preamble, boolean convert) enable
= false - Disable UPC-E decoding = true - Enable UPC-E decoding checkdigit
= false - Do not send check digit = true - Send check digit preamble
= 0 Do not apply preamble character to label = 1 Apply system character as preamble to label = 2 Apply country code and system character as preamble to label convert
= 0 Do not convert UPC-E to UPC-A = 1 Convert UPC-E to UPC-A
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader.upcE (true, true, (byte)0x00, true); Enable UPC-E type barcodes, send the check digit, do not apply a preamble to the label, convert UPC-E to UPC-A. 2-39
Page 54
PSM20i Bar Code Scanner Attachment Programmer’s Guide upcE1 Class BarCodeReader
Description Enable or disable decoding of UPC-E1 barcodes and set label options.
Invocation boolean upcE1(boolean enable, boolean checkdigit, byte preamble, boolean convert) enable
= false - Disable UPC-E1 decoding = true - Enable UPC-E1 decoding checkdigit
= false - Do not send check digit = true - Send check digit preamble
= 0 Do not apply preamble character to label = 1 Apply system character as preamble to label = 2 Apply country code and system character as preamble to label convert
= false - Do not convert UPC-E1 to UPC-A = true - Convert UPC-E1 to UPC-A
Return Value true if configuration was successful.
false if configuration failed.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); boolean response = barCodeReader.upcE1 (true, true, (byte)0x00, true); Enable UPC-E1 type barcodes, send the check digit, do not apply a preamble to the label, convert UPC-E1 to UPC-A. 2-40