The text of a manual · part 8 of 11
PSM20i Bar Code Scanner Attachment Programmer's Guide: Chapter 2 Function Definitions, pages 55 to 60
Pages 55 to 60 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 55
Function Definitions upcEANCouponCode Class BarCodeReader
Description Enable or disables decoding of UPC-A, UPC-A with 2 supplemental characters, UPC-A with 5 supplemental characters, and UPC-A/EAN-128 bar codes. Autodiscriminate UPC/ EAN Supplementals must be enabled.
Invocation boolean upcEANCouponCode (boolean enable) enable
= false - Disable UPC/EAN Coupon Code = true - Enable UPC/EAN Coupon Code
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. upcEANCouponCode (true); Enable UPC/EAN coupon codes.
2-41
Page 56
PSM20i Bar Code Scanner Attachment Programmer’s Guide upcEANSecurity Class BarCodeReader
Description Set the level of security for decoding UPC/EAN bar codes. The security level goes up as the quality of the bar code diminishes. There is an inverse relationship between security and scanner aggressiveness, so be sure to set only that level of security necessary for any given application.
Invocation boolean upcEANSecurity (byte level) count
= 0 Most aggressive state. Provides sufficient security in decoding “in-spec” UPC/ EAN bar codes. = 1 Allows decoding of poorly printed barcodes whose mis-decodes are limited to characters 1, 2, 7, 8. = 2 Allows decoding of poorly printed barcodes whose mis-decodes are not limited to characters 1, 2, 7, 8. = 3 If level 2 fails then select this level. This level is an extreme measure against mis-decoding severely out of spec bar codes. The quality of the barcodes should really be improved if this level is necessary.
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. upcEANSecurity ((byte)0x02); Set security level to 2 for decoding UPC/EAN labels.
2-42
Page 57
Function Definitions upcEANSupplemental Class BarCodeReader
Description Set supplemental mode for UPC/EAN labels. Note: The Auto discriminate mode, if enabled, will reduce aggressiveness on UPC/EAN labels without supplementals. If Auto discriminate is enabled, choose an appropriate upcEANSupplReduncancy (see page 2-44) value.
Invocation boolean upcEANSupplemental (byte mode) mode
= 0 Ignore supplemental = 1 Decode UPC/EAN with supplementals = 2 Auto discriminate UPC/EAN supplementals
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. upcEANSupplemental ((byte)0x01); Enable UPC/EAN with supplemental barcodes.
2-43
Page 58
PSM20i Bar Code Scanner Attachment Programmer’s Guide upcEANSupplRedundancy Class BarCodeReader
Description With Auto discriminate UPC/EAN Supplementals selected, this call adjusts the number of times a symbol without supplementals will be decoded before transmission. A minimum of 5 times is recommended.
Invocation boolean upcEANSupplRedundancy (byte count) count valid range is 2 - 20
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. upcEANSupplRedundancy ((byte)0x05); Decode UPC/EAN label 5 times before returning it to the application.
2-44
Page 59
Function Definitions
Miscellaneous getSDKVersion Class BarCodeReader
Description Returns the version of the SDK that was used in creating the midlet.
Invocation String getSDKVersion()
Return Value Returns a string containing the version of the SDK.
Example import com.symbol.j2me.midlets.ascanner.BarCodeReader; BarCodeReader barCodeReader = new BarCodeReader(); String sversion = barCodeReader.getSDKVersion();
2-45
Page 60
PSM20i Bar Code Scanner Attachment Programmer’s Guide
2-46