D028868 CR1500 CR1100 CR2700 JavaScript Programming Guide User Manual Page 21 of 41
The Code Corporation
12393 South Gateway Park Place, Suite 600, Draper, UT 84020
+1 (801) 495-2200
FAX +1 (801) 495-0280
Customer formatted data: This is formatting applied from a customer-supplied
.parse file. These files can be generated using the DL/ID tab of CortexTools
JSON formatted data: This is data formatted in JavaScript Object Notation (JSON).
Currently, only DL/ID data can be formatted in JSON by the decoder. For more
information about JSON, see JSON.org
decodes[i].data (type string)
The decodes[i].data property is a read/write value representing the payload of the barcode
that has just been decoded. This data may also include data processing, checksum
information, or data formatting, based on settings made by the user for the decode engine. If
the decode engine has no special handling settings applied, this information should match the
string that was used to encode the barcode before the barcode was printed or displayed.
Example:
var decodeText = decodes[i].data;
13.2 Storage Object
The storage object provides application software access to Code reader file storage. Files are written to
storage by the storage.write method and by downloading from the host.
Note: Names of files can be up to 200 printable ASCII characters. For compatibility with host file systems,
Code recommends you do not use characters that are reserved by host operating systems: /, \, :, ?, *, [, ], ',
", etc. Files are stored in UTF8 format, which encodes Unicode characters in one or more bytes each. Any
file that uses multi-byte characters coming from the host must be encoded in UTF-8, in order for the stored
file to be correctly handled in UTF-8. JavaScript converts these files to UTF-16 when reading them from the
file system.
Informational Properties
storage.isFull
The storage.isFull property is a read-only Boolean value; true if storage is full and
cannot be added to; otherwise, false.
storage.fullness_percent
The storage.fullness_percent property is a read-only integer containing the percent
of storage in use.
Storage Methods
The following section documents the methods defined for the Code reader storage object.