zektor serialoption ユーザーズマニュアル

ページ / 24
4
Where:
+
 
= The ‘+’ character.
<CR><LF>
= The Carriage Return and Line feed characters.
Every command that does not cause an error will be responded to with the acknowledgement string. This includes 
commands that request status. Status commands are acknowledge with this string, and then followed by the status 
response string.
The Error Response
!<error code>
Where:
!
= The ‘!’ character.
<error code>
= An numeric ASCII value indicating the error encountered.
Any command that causes an error will be acknowledge with the error response string instead of a ‘+’ prefixed ac-
knowledgement string.
For simple parsing of strings, the installer can simply look for the ‘+’ or ‘!’ in response to a command. Or the ‘!’ re-
sponse can be more fully parsed to determine what caused the error.
The Status Response String
=<cmd><parameter><CR><LF>
Where:
=
= The ‘=’ character.
<cmd>
= The status command’s command character.
<parameter>
= The command’s status.
<CR><LF>
= The carriage return / line feed characters.
Status commands returned from the RS-232 interface are easily parsed, for they all begin with the ‘=’ character.
Status string:
=<cmd><status><CR><LF>
Where:
=
= The ‘=’ character.
<status>
= The status of the current command, usually a numeric ASCII value.
<CR><LF>
= The Carriage Return and Line feed characters.