Digital Video Recorder
117
Appendix 9 — Protocol for Remote Controlling DVR
Message Format
<BOM><ID>:<Class>:<Code>[:Operands]:<Checksum>[EOM]
where
Symbol
Value
Description
: :
Field
delimiter
@
Beginning of message (for command)
<BOM>
<
Beginning of message (for reply)
<ID> 00~99
Device
ID
<Class>
DR
Device Class (“DR” for DVR systems)
<Code>
AA~zz
Op-code (see below)
<Operands>
Optional operands defined for each operation
00~99
Checksum (sum of ASCII codes before checksum discarding overflow)
i
<Checksum>
* No
checksum
[EOM]
^J^M
End of message (optional: only for convenience of users using general terminal)
*All digits are used in decimal format.
*Example
buffer = “@01:DR:SF:0:”;
= checksum(buffer);
*Letters are case sensitive.
Control Flow
y
Every transaction consists of one command and one reply.
y
Characters transmitted before <BOM> are ignored.
y
The format of operands is defined independently for each op-code.
y
The <BOM> received before <Checksum> of the previous message resets interpretation: i.e., discards the
previous message. EXCEPTION: in case of text input, none of characters within specified length has special
interpretation.
Common Reply
Reply code
Reply data
Description
ok
er
0000~9999
Error: return error number
General Functions
Function
Code
Operands
ii
Reply
Reply data
Power Off
PO
Time Setting
TM
YYYYMMDDHHMMSS
iii
LogIn LI
01~16:****:01~08:****
iv
LogOut LO
v
Cursor Control
Function
Code
Operands
Reply
Reply data
Tab TB
F/B(direction)
Enter EN
Text Input
TI
01~99(length):string
vi