37
Tokens / Protocol
The X300 is always looking for tokens to perform actions. The protocol is that commands are issued
and no response monitored. The remote device should monitor the OK<R> messages that are
returned. It is usually looking for all the tokens apart from when writing file data. In this case only the
“#ENDFILE<R>” is searched for.
All commands sent to the X300 are acknowledged, for example if the client sends #RECSTART<R>,
OK<R> will be returned to the client to signify that the command was successfully carried out. In the
case of commands like GETTIME and GETDATE, OK<R> will not be returned, but the data requested,
followed by a <R>. In the case of PREVIOUSFILE and NEXTFILE, OK<R> will be replaced with either
LAST<R> or FIRST<R> if there are no more files to play next or previous, respectively. When sending
commands, the sender to the X300 can wait for an OK before sending another command, or one of the
other variants listed above.
There may be a need for a hold off time between certain commands (e.g 10 mS), as the X300 may take
a finite time to do certain tasks. To add delay you could simply put spaces between one command and
the next and these are ignored. The X300 does have a FIFO queue of 2048 bytes so can buffer data.
Certain commands can be followed immediately with other commands for example:
#CAMERA_<1-16><R>#PLAY<R>
-play a given camera
#SETTIME_<12:23:45><R>#SETDATE_<23/09/10><R>
-set time and date
Definitions
_
- A space
<>
-
Parameter, don‟t include brackets
<R>
- return (char 13)
FAIL
- File system failed to create file, aborted
FAIL
- File name is illegal
OK
- Acknowledgement, Command carried out
CLIENT
- The external equipment that is connected to the X300 via RS232
BAUD Rate
- This shall be selectable from within a menu
<TEXT>
- Textual data
Writing files
Write File command:
#WRITEFILE,<FILENAME><R>
Close File command:
#ENDFILE<R>
A return <R> character at then
end of the “#WRITEFILE” command will signify the beginning of the
writing process. All data from this point onwards will be written into the file specified. If the file system
fails to create the file for any reason, FAIL<R> will be returned to the client.
A check is done on the file name length, if the user overruns (number of characters in total is greater
than 60), FAIL<R> will be transmitted to the client, and the write command is aborted. The user should
only use uppercase letters and numbers in th
e filename and the space character. The extension “.EXT”
is automatically applied by the X300, for example
Command
Created file
#WRITEFILE,REPORT<R>
REPORT.EXT
#WRITEFILE,TICKET DATA 6 DEC 2010<R>
TICKET DATA 6 DEC 2010.EXT
If the file has been created effectively, OK<R> will be sent to the client. The client may now proceed to
send the file data. When the token #ENDFILE<R> is received, the file is closed, and the client will be
Содержание X300 Series
Страница 18: ...18 X300 DIGITAL RECORDER...