Communication Simulation Data

Jump to: navigation, search

The communication simulation data files are used to simulate a tracking device (or some other external device) during testing. For simplicity, the simulation files are actually logger files that log all of the data that was sent between the computer and the device.

 1128060095.6882980  :    (DEBUG) # recorded Fri Sep 30 02:01:35 2005
 1128060095.7280912  :    (INFO) 1. command[10] INIT:E3A5\x0D
 1128060095.8632436  :    (INFO) 1. receive[9] OKAYA896\x0D
 1128060095.9064648  :    (INFO) 2. command[24] PHRQ:**********0A**62D3\x0D
 1128060095.9613473  :    (INFO) 2. receive[7] 01D4D5\x0D
 1128060095.9755168  :    (INFO) 3. command[144] PVWR:0100004E444900EB12000001000000010000010100000004C4BB347800000003000000030000000000403F000000000000000000000000000000000000000000000000F806\x0D
 1128060096.1648145  :    (INFO) 3. receive[9] OKAYA896\x0D
 [time in seconds ]  :    (INFO) L. [descriptor][N] [data]

The first column is a timestamp, given in seconds since the epoch (12:00am on Jan 1, 1970, UTC).

The "  : (INFO) " is part of the standard logger file format. All lines marked with "(INFO)" contain simulation data.

Following the (INFO) is a number, a descriptor, a data size, and then the data itself:

 1. command[10] INIT:E3A5\x0D

The number (here "1.") increases every time a command is sent to the device, and then remains the same for all data received from the device until the next command is sent. If data is received from the device before any commands have been sent, the number will be "0.".

The "descriptor" is either "command", for commands sent to the device, or "recieve", for data received from the device. Following the descriptor is the number of bytes of data that were either sent or received. Eventually additional descriptors might be added to signal special communication events such as "break" or handshaking pin status changes (RTS, DTS, etc).

Finally, the data itself is provided. The data always displayed in ASCII, with any non-printing character replaced by "\xXX" where XX is the hexidecimal value of the byte, and with "\" replaced by "\\". When counting the data length, each "\xXX" or "\\" counts for one byte.

Certain ASCII codes are worth remembering:

 \x00      null            ^@      \0
 \x08      backspace       ^H      \b
 \x09      tab             ^I      \t
 \x0A      line feed       ^J      \n
 \x0C      form feed       ^F      \f
 \x0D      carriage return ^M      \r
 \x11      XON             ^Q
 \x13      XOFF            ^S
 \x1B      escape          ^[