GET_CTRL_MSG
Description
Request encoder to send the notification of DIs, motion, video loss and serial output data to the remote host..
The encoder monitors its levels of DIs, motion detection state, video losee state and serial output port in the runtime. It will be much helpful to the remote host to get these states from encoder without polling processes. The remote host just needs to send a single URL command to request the device to update them periordically or when one state of them was chaged.
Here is flow chare illusrated how this command works.
The message of the DIs is defined here. The DI=n;level=m; where n is the index of the DI ports started from 1 and the m is the signal level. In the following example, there are two DI ports, DI1 and DI2 and the DI1 level is low and DI2 level is high.
--------CtrlMsgBoundary\r\n
Content-Type: text/plain\r\n
Contenr-Length: 28\r\n\r\n
DI=1;level=0;\n
DI=2;level=1;The message of the MDs is defined here. The group=n;level=m;threshold=k; where n is the index of the motion region started form 1, m is the number of active micro-blocks in the motion region and k is the threshold of the number of micro-blocks in the motion region. The motion was treated triggered when the number of active micro-blocks is larger than or equal to the threshold of the number of micro-blocks.
In the following example, there are three motion regions in the encoder and the motion region 1 and 2 have motion triggered. The motion region 3 was not triggered.
--------CtrlMsgBoundary\r\n
Content-Type: text/plain\r\n
Contenr-Length: 92\r\n\r\n
group=1;level=98;threshold=83;\n
group=2;level=57;threshold=43;\n
group=3;level=5;threshold=10;The message of the VLOSS is defined here. VLOSS=n; where n is the state of the video loss. 0: there is no video signal. 1: video source is locked.
--------CtrlMsgBoundary\r\n
Content-Type: text/plain\r\n
Contenr-Length: 9\r\n\r\n
VLOSS=0;--------CtrlMsgBoundary\r\n
Content-Type: text/plain\r\n
Contenr-Length: 9\r\n\r\n
VLOSS=1;The message of the SERAIL is defined here. The format of the message body is in binary. The message is the raw data of the buffer in the serial input port. In the following example, the raw data in the message is the ascii character string, 123456789.
--------CtrlMsgBoundary\r\n
Content-Type: application/octet-stream\r\n
Contenr-Length: 9\r\n\r\n
123456789
Input Argument
MD,DI,VLOSS,SERIAL,TIME
MD: Register the motion detection state to the control message. The encoder will monitor the motion state to send the notification to the remote host. If host does not want to monitor them, this argument should not be in the argument.
DI: Register the levels of DIs to the control message. The encoder will monitor the DIs' level to send the notification to the remote host. If host does not want to monitor them, this argument should not be in the argument.
VLOSS: Register the video loss state to the control message. The encoder will monitor the video source state to send the notification to the remote host. If host does not want to monitor them, this argument should not be in the argument.
SERIAL: Register the serial input port to the control message. The encoder will monitor the buffer in the serial input port to send the notification to the remote host. If host does not want to monitor them, this argument should not be in the argument.
TIME: the notification timer in seconds. It is from 0 to 300 seconds. The encoder will send the notification to the remote host perodically event the monitoring states were not changed if this timer is not zero. If it is zero, the encoder sends the nodification if only if the monitor states were changed. Missing this argument will set the timer to 0.
Attribute
Return of Message
Notification message
or
ERROR: GET_CTRL_MSG is write-only
or
ERROR: invalid parameters
Applicability
Status
Valid
See Also
None
Example
1. Get motion detection and DI state with 3 seconds notification timer.
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&GET_CTRL_MSG=DI,MD,3
or
http://ip:port/cgi-bin/cmd/encoder?GET_CTRL_MSG=DI,MD,32. Get video loss state as the video loss state was changed.
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&GET_CTRL_MSG=VLOSS,0
or
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&GET_CTRL_MSG=VLOSS
or
http://ip:port/cgi-bin/cmd/encoder?GET_CTRL_MSG=VLOSS,0
or
http://ip:port/cgi-bin/cmd/encoder?GET_CTRL_MSG=VLOSS3. Get motion detection, DI, video loss states and serial input port data when these states were changed.
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&GET_CTRL_MSG=DI,MD,VLOSS,SERIAL,0
or
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&GET_CTRL_MSG=DI,MD,VLOSS,SERIAL
or
http://ip:port/cgi-bin/cmd/encoder?GET_CTRL_MSG=DI,MD,VLOSS,SERIAL,0
or
http://ip:port/cgi-bin/cmd/encoder?GET_CTRL_MSG=DI,MD,VLOSS,SERIAL
Back to