Communication Protocols
29
Just before the router begins executing a command string, it sends a leader
character (asterisks) to the host. As it executes the commands, some
commands call for a response back to the host. Many of these strings contain
<CR> characters within the string in order to make the message more human
readable when viewed as raw data as would be the case when emulating a
terminal. Software written to drive these routing switchers may ignore all
spaces and <CR> characters in reply strings. After the command string has
been executed, the routing switcher returns the string " **OK!! " followed by
a trailer character (!!) and a <CR> (carriage return, ASCII 0D) character, to
the host. This indicates that the command has executed successfully. The
simplest possible command string would be:
**!!
which consists of the leader and trailer characters but no commands between
them. This command string would generate the response:
**OK!!<CR>
All responses from the router to the host begin with the asterisk character and
end with the exclamation character. In addition many response strings end
with a <CR> character. Status messages for multiple outputs from the router
to the host are delimited with a <CR> at the end of the data for each output
and before the beginning of data for the next output. When viewing the
response this produces easy to read data in columns. When read as part of a
driver program, these <CR> characters can be ignored if desired.
10.2.2 Command Details II
"Clear": Clear Matrix
Request: **CLEAR!!
Response: **OK!!<CR>
Action: Clear entire router matrix.
The command "CLEAR" requests that the switch matrix be cleared so that all
outputs are disconnected from inputs (in routers where this is possible) or else
all outputs at all levels have input #1 as their source (when disconnecting is
not possible). If output locks are supported, all output locks are removed by
this command. This command can take several seconds to execute (depending
on the size of the switch matrix), and therefore the OK response at the end of
the command string could be quite late. In order to help ensure that this
command isn't accidentally executed, it requires four additional characters
following the "C" character, to spell out the word "CLEAR" in full.
For example, the command:
**CLEAR!!