VSI-S Command, Query and Response Syntax
The following explanation of the VSI-S syntax may be useful in understanding the structure of commands, queries and their respective responses. This explanation has been lifted directly from the VSI-S specification.
Command Syntax
Commands cause the system to take some action and are of the form
\<keyword\> = \<field 1\> : \<field 2\> : …. ;
where <keyword> is a VSI-S command keyword. The number of fields may either be fixed or indefinite; fields are separated by colons and terminated with a semi-colon. A field may be of type decimal integer, decimal real, integer hex, character, literal ASCII or a VSI-format time code. White space between tokens in the command line is ignored, however most character fields disallow embedded white space. For Field System compatibility, field length is limited to 32 characters except for the ‘scan label’ (see Section 6), which is limited to 64 characters.
Command-Response Syntax
Each command elicits a response of the form
!\<keyword\> = \< return code \> [:\<DTS-specific return\> :….] ;
where
<keyword> is the command keyword
<return code> is an ASCII integer as follows:
action successfully completed
action initiated or enabled, but not completed
command not implemented or not relevant to this DTS
syntax error
error encountered during attempt to execute
currently too busy to service request; try again later
inconsistent or conflicting request3
no such keyword
parameter error
<DTS-specific return> one or more optional fields specific to the particular DTS, following the standard fields defined by VSI-S; fields may be of any type, but should be informative about the details of the action or error.
Query and Query-Response Syntax
Queries return information about the system and are of the form
\<keyword\> ? \<field 1\> : \<field 2\> : …. ;
with a response of the form
!\<keyword\> ? \<field 1(return code)\> : \<field 2\> : \<field 3\> : …: [\<DTS-specific return\>];
where
<return code> is an ASCII integer as follows:
query successfully completed
action initiated or enabled, but not completed
query not implemented or not relevant to this DTS
syntax error
error encountered during attempt to execute query
currently too busy to service request; try again later
inconsistent or conflicting request [5]_
no such keyword
parameter error
indeterminate state
Note: A ‘blank’ in a returned query field indicates the value of the parameter is unknown.
A ‘?’ in a returned query field indicates that not only is the parameter unknown, but that some sort of error condition likely exists.