ASCII
ASCII messages are readable by both the user and a computer. The structures of all ASCII messages follow the general conventions as noted here:
-
The lead code identifier for each record is '#'.
-
Each log or command is of variable length depending on amount of data and formats.
-
All data fields are delimited by a comma ',' with two exceptions:
-
The first exception is the last header field which is followed by a ‘;’ to denote the start of the data message.
-
The second exception is the last data field, which is followed by a * to indicate end of message data.
-
Each log ends with a hexadecimal number preceded by an asterisk and followed by a line termination using the carriage return and line feed characters.
For example:
*1234ABCD[CR][LF]. This value is a 32-bit CRC of all bytes in the log, excluding the '#' identifier and the asterisk preceding the eight CRC digits.
See 32-Bit CRC for the algorithm used to generate the CRC. -
The receiver only accepts the following ASCII characters.
-
characters between space (ASCII value 32) and '~' (ASCII value 126) inclusive,
-
vertical tab (ASCII value 9)
-
line feed (ASCII value 10)
-
horizontal tab (ASCII value 11)
-
carriage return (ASCII value 13)
Other values are discarded and can lead to unexpected results.
-
-
An ASCII string is one field and is surrounded by double quotation marks.
For example:
“ASCII string”. If separators are surrounded by quotation marks then the string is still one field and the separator will be ignored (example, “xxx,xxx” is one field). Double quotation marks within a string are not allowed. -
If the receiver detects an error parsing an input message, it returns an error response message. See Responses for a list of response messages from the receiver.
Message Structure:
header; |
|
data field..., |
|
data field..., |
|
data field... |
|
*xxxxxxxx |
|
[CR][LF] |
The ASCII message header structure is described in Table: ASCII Message Header Structure.
Field |
Field Name |
Field Type |
Description |
Ignored on Input |
1 |
Sync |
Char |
Sync character. The ASCII message is always preceded by a single ‘#’ symbol |
N |
2 |
Message |
Char[] |
The ASCII name of the log or command |
N |
3 |
Port |
Char[] |
The name of the port from which the log was generated. The string is made up of the port name followed by an _x where x is a number from 1 to 31 denoting the virtual address of the port. If no virtual address is indicated, it is assumed to be address 0 |
Y |
4 |
Sequence # |
Long |
Used for multiple related logs. It is a number that counts down from N-1 to 0, where 0 means it is the last one of the set. Most logs only come out one at a time in which case this number is 0 |
N |
5 |
% Idle Time |
Float |
The minimum percentage of time the processor is idle, calculated once per second |
Y |
6 |
Time Status |
Enum |
The value indicates the quality of the GPS reference time (see Table: GPS Reference Time Status) |
Y |
7 |
Week |
Ulong |
GPS reference week number |
Y |
8 |
Seconds |
GPSec |
Seconds from the beginning of the GPS reference week; accurate to the millisecond level |
Y |
9 |
Receiver Status |
Ulong |
An eight digit hexadecimal number representing the status of various hardware and software components of the receiver (see Table: Receiver Status) |
Y |
10 |
Reserved |
Ulong |
Reserved for internal use |
Y |
11 |
Receiver |
Ulong |
A value (0 - 65535) representing the receiver software build number |
Y |
12 |
; |
Char |
The character indicates the end of the header |
N |
Example Log:
#RAWEPHEMA,COM1,0,55.5,SATTIME,2072,133140.000,02000000,58ba,15761;32,2072,
136800,8b00602b57a606100004389101eefa4e0eeed24e012f216600007608cd27,
8b00602b58282f02373454d33b986d01bd01a76ba710a2a10d008e21667f,
8b00602b58ae003384abe701001226ff6c6c1c9999f3c99fffa77c2f05c8*d3806ea3