Optional crc field (*crc), Parser pseudocode, Examples of ascii input commands and responses – NavCom Sapphire Rev.J User Manual
Page 37

Sapphire Technical Reference Manual Rev. J
37
4. Strings: String arguments must b
e enclosed in quotes (“”). Within the quotes, all ASCII
characters are permissible, including commas. String arguments are intended to support
user defined names and messages that require the use of some punctuation or special
characters.
When a valid command mnemonic is received and the argument string is absent,
the receiver responds with a one-time output of the stored values for the command
parameters.
Optional CRC Field (*CRC)
An optional CRC field can be appended to input commands. This supports interfaces with
external controllers (e.g., laptops, PDAs with wireless connectivity) with application software that
computes and appends the CRC field to provide additional integrity.
The CRC field is expressed as a sequence of four hex-ASCII digits, preceded by an asterisk
(*CRC). The four hex-ASCII digits represent the binary value of a 16-bit CCITT cyclic
redundancy check computed by the C-language function shown in
Parser Pseudocode
The C-language Sapphire parser pseudocode is shown in
Examples of ASCII Input Commands and Responses
Table 3 shows examples of a basic single-argument command. The example uses the
[NAVELEVMASK] command to set the elevation mask, in degrees, for the main, code-based
navigation solution.
Table 3: Examples of Single Argument Command Inputs and Responses
Input
Response*
Description
[NAVELEVMASK] 7.5
[OK] NAVELEVMASK
Command accepted
[Nav Elev Mask] 9
[OK] NAVELEVMASK
Command accepted. (Note
the free use of spaces and
upper/lower case in the
command mnemonic.)
[NAVELEVMASK] -7
[??] NAVELEVMASK,argument #1 out
of range
Command not accepted.
Problem with argument.
[NAVELEVMASK]
[NAVELEVMASK] 9.00
No arguments specified so
receiver reports current
value(s).
*Command responses must be enabled to receive responses (verbose mode).
Table 4 shows examples of a command that accepts multiple arguments. If an argument is not
specified, the value is assumed to be the current set value. The command in these examples is
the [PORT] command, which is used to configure the RS-232 serial ports, and the RS-422 serial
port if available, of the Sapphire receiver.