Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 74
value is always in multiples of 64. This optimizes the download speed
during communications. The allocation size is defined by the A and I
pointers.
AllocationSize = (((DatabaseSize-1)/64)+1)*64
Database Size
A 16-bit quantity indicating the actual size of the database. This is
computed by:
DatabaseSize = Offset(H) – Offset(A)
App Specific Header Size
An 8-bit quantity that indicates the number of bytes allocated for
application specific information. This section can also store information
about the database itself. It might be used after an upload of the database to
recreate the database in the PC.
AppSpecificHeaderSize = Offset(D) – Offset(C)
The required minimum value for this section is 0x03 (2 bytes for number of
records and 1 byte for record size).
Number Of Records
A 16-bit quantity that specifies the number of records in the database.
4.26.1.3 Variable-Sized Random Database Structure
Random Access Database with
Variable-Sized Record Structure
Allocation Size (2-byte)
Number of Records (2-byte)
App Specific Header Size (1-byte)
Record #0 Offset 2-byte
Record #1 Offset 2-byte
Record #2 Offset 2-byte
...
Record #n Offset 2-byte
Record 0
Record 1
Record 2
Record 3
Record 4
...
Record n
Database Size (2-byte)
Remaining App Specific Header
(variable size up to 253 bytes)