
72
Class Reference
4.3.2.18
bdAddr
The
bdAddr
property of the
reader
object contains a read only string containing the
Bluetooth address of the radio installed in the handheld.
Example:
bdAddrString = reader.bdAddr;
4.4
storage
The
storage
object provides application software access to handheld file storage. Files
are written to storage by the
storage.write
method and by downloading from the host
(see section 3.7).
Note!
Names of files can be 1 - 200 printable ASCII characters. For compatibility with host file
systems, we recopmmend that you do not use characters that are reserved by host operating
systems: /, \, :, ?, *, [, ], ', ", etc. Files should be kept to a maximum length of 32K bytes. Files
are stored in UTF8 format, which encodes Unicode characters in one or more bytes each.
4.4.1
Methods
The following section documents the methods defined for the handheld
storage
object.
In this section, the examples use elements of a time card application that assumes time
card records are maintained as files organized by employee number. The naming
convention for the time card records is
TimeCard<employee_number>.
4.4.1.1
append
The
storage.append
method adds data to the end of a file.
Format:
result = storage.append(name, data);
Where:
name
– string; the name of the object to append.
data
– string; the data to add to the end of the file.
result
– Boolean;
true
if the append succeeded;
false
if the append failed.
Example:
storage.append("TimeCard” + employeeNumber, tcRecord);
Adds the time card record to the end of the time card record that already exists for the
employee specified by
employeeNumber
.
4.4.1.2
erase
The
storage.erase
method erases a file.