System information
Section 4. The CR1000 Type Datalogger
4-8
4.9 Getting Table Definitions
Table definitions are retrieved from the CR1000 type datalogger with the File
Upload transaction. The file name in the transaction should be specified as
“.TDF”. The datalogger will recognize this file extension and return the
appropriate response containing the table definitions. A hexadecimal example
of the command packet looks like:
BD A0 01 70 04 10 01 00 04 1D 1D 00 00 43 50 55 3A 44 65 66
2E 74 64 66 00 00 00 00 00 00 00 80 27 EA BD
The response message from the datalogger will contain the table definitions
and may be broken over multiple packets. A function should be created to
parse the table information from the response packet. This information should
be saved by the application and used to calculate table signatures and to
interpret data records that are collected from the datalogger. If the table
definitions are broken over multiple packets, the last File Upload Response
packet should have a value in the FileOffset field that is smaller than the Swath
field declared in the File Upload Command packet. An example response
packet looks like:
BD A0 04 00 01 10 04 00 01 9D 1D 00 00 00 00 00 01 53 74 61
74 75 73 00 00 00 00 01 0C 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 8B 4F 53 76 65 72 73 69 6F 6E 00 00 00 00 00
00 00 00 01 00 00 00 08 00 00 00 08 00 00 00 00 8B 4F 53 44
61 74 65 00 00 00 00 00 00 00 00 01 00 00 00 0A 00 00 00 0A
00 00 00 00 8B 50 72 6F 67 4E 61 6D 65 00 00 00 00 00 00 00
00 01 00 00 00 10 00 00 00 10 00 00 00 00 95 50 72 6F 67 53
69 67 00 00 F1 67 BD
4.9.1 How to Get and Use Table Signatures
The table definition signature is a signature on the parameters describing a
table. There must be one signature for each defined table in the File Upload
Response packet. Calculate the signature by starting with the first byte of the
FieldName parameter and ending after the field list terminator for that table. A
description of the signature algorithm and example C code showing the method
used to calculate the signature can be found in Appendix B. Additional
examples showing functions used to parse tables from table definitions and
calculate signatures existing in the JAVA code found in Appendix D.
The table signature should be stored by the application and used in the Collect
Data Command packet when collecting data from the CR1000 type datalogger.
The datalogger validates the table signature to ensure that the datalogger tables
have not changed when an application requests data.
4.10 Retrieving Data
By default data are stored in ring memory on the datalogger and must be
collected by an external application before the old values are overwritten by
new values. The data are stored in tables in the CR1000 type datalogger and an
application retrieves this data using the Collect Data transaction. An example
of a packet that initiates the collection process looks like:
BD A0 01 70 04 10 01 00 04 09 09 00 00 05 00 03 43 15 00 00
00 3C 00 00 C7 DF BD