Sepasoft MES Module Suite
system.barcode.scanner.decode
Description
Returns a Decode Results object with the results of the decoding process.
Syntax
system.barcode.scanner.decode(rawBarcode, method, patterns, preamble, postamble, separator)
Parameters
String rawBarcode - Raw barcode data to decode.
String method - Use “SinglePass” to do a single pass search of each pattern in the patterns list, or use “Consume” to do a multi-pass search where each pattern in the list is search for at the beginning of the raw barcode string, then remove from the string until the raw barcode is consumed. A “Consume” process can result in an unmatched portion of the raw barcode left and placed in the DecodeResults.getUnmatched property. When decoding a GS1 standard barcode the “Consume” method should be used.
String patterns - A list of barcode patterns to be used to search the raw barcode.
String preamble - The prefix regex string to be removed from the raw barcode prior to doing the pattern matching. A Unicode character of \u0002 for STX can be used.
String postamble - The suffix regex string to be removed from the raw barcode prior to doing the pattern matching. A Unicode character of \u0003 for ETX or \u000A for new line/line feed or \u000D for carriage return can be used.
String separator - The GS1 FNC1 separator as a regex string used if decoding a GS1 barcode. A Unicode character of \u001D or \u00E8 can be used.
Returns
A Decode Results object.
Scope
All
Sepasoft MES Module Suite