zektor serialoption Manual Do Utilizador

Página de 24
15
The HDS4.2 Response Strings
The section list the strings returned from the HDS4.2.
All HDS4.2 strings are terminated with the characters <CR><LF>.
Strings will start with only one of three characters:
‘+’
 
- Acknowledgement of a valid command.
‘!’ 
- Command caused an error (followed by the error code).
‘=’
- Start of a status string (followed by the status string).
Acknowledgement String
+<CR><LF>
Acknowledge an error free command.
Acknowledge an error free command was received by the HDS4.2. All commands are acknowledged with either this 
string or the Error Code String if an error occurred processing the command.
Error Code String
!<error><CR><LF>
Indicate an error in the previous command.
The response to a command that caused an error.
<error>
= A single digit ASCII value that indicates the error.
1
 - Unknown command.
2
 - Error in command’s parameters (out of range, or invalid).
5
 - Bad number of parameters in command line.
Power Status String
=P<power><CR><LF>
Return the current power state
<power>
 = A one digit ASCII value that indicates the power state of the HDS4.2
0
 - HDS4.2 is OFF.
1
 - HDS4.2 in ON.
Channel Status String
=C<chan><CR><LF>
Return the current channel
<chan>
 = A one digit ASCII value that indicate the current channel of the HDS4.2.
1
 - HDS4.2 is set to channel 1.
2
 - HDS4.2 is set to channel 2.
3
 - HDS4.2 is set to channel 3.
4
 - HDS4.2 is set to channel 4.