![Lightware HDMI20-OPTC-RX220-Pro Скачать руководство пользователя страница 51](http://html.mh-extra.com/html/lightware/hdmi20-optc-rx220-pro/hdmi20-optc-rx220-pro_user-manual_1915378051.webp)
6. LW3 Programmers’ Reference
HDMI20-OPTC series – User's Manual
51
6.8.7.
Enabling Command Injection Mode
Command format:
SET
●
/MEDIA/UART/<P
1
>.CommandInjectionEnable=true|false
Response format:
pw
●
/MEDIA/UART/<P
1
>.CommandInjectionEnable=true|false
Example:
˃
SET /MEDIA/UART/P1.CommandInjectionEnable=true
˂
pw /MEDIA/UART/P1.CommandInjectionEnable=true
ATTENTION! The Command injection status is stored in another read-only property:
/MEDIA/UART/<P
1
>.CommandInjectionStatus.
6.9.
Sending Message via the Communication Ports
6.9.1.
Sending Message via an RS-232 Port
The RS-232 ports can be used for sending a command message to a device which can be controlled over
serial port. Both local RS-232 and extended link RS-232 ports can be used. The three different commands
allow to use different message formats.
Sending Message
The command is for sending a command messages in ASCII-format with an option for escaping special charaters.
Command format:
CALL
●
/MEDIA/UART/<P
1
>.sendMessage(<message>)
Response format:
mO
●
/MEDIA/UART/<P
1
>:sendMessage
Example:
˃
CALL /MEDIA/UART/P1:sendMessage(PWR0\x0d\x0a)
˂
mO /MEDIA/UART/P1:sendMessage
Escaping in the Message
When commands need to be separated by <CR><LF> charaters to be recognized by the controlled device,
then they need to be escaped. You can use the following format for escaping:
<command
1
><\x0d\x0a><command
2
><\x0d\x0a>...<command
n
><\x0d\x0a>
Sending Text Message
The command is for sending a text message in ASCII-format.
INFO: Escaping will not be processed using the
sendText
command.
Command format:
CALL
●
/MEDIA/UART/<P
1
>.sendText(<message>)
Response format:
mO
●
/MEDIA/UART/<P
1
>:sendText
Example:
˃
CALL /MEDIA/UART/P1:sendText(pwr_on)
˂
mO /MEDIA/UART/P1:sendText
Sending Binary Message
The command is for sending a binary message in HEX format.
INFO: Escaping will not be processed using the
sendBinaryMessage
command.
Command format:
CALL
●
/MEDIA/UART/<P
1
>.sendBinaryMessage(<message>)
Response format:
mO
●
/MEDIA/UART/<P
1
>:sendBinaryMessage
Example:
˃
CALL /MEDIA/UART/P1:sendBinaryMessage(1100000061620000cdcc2c40)
˂
mO /MEDIA/UART/P1:sendBinaryMessage
6.9.2.
Sending Message via TCP Port
The device can be used for sending a message to a certain IP:port address. The three different commands
allow controlling the connected (third-party) devices.
Sending TCP Message
The command is for sending a command messages in ASCII-format with an option for escaping special charaters.
Command format:
CALL
●
/MEDIA/ETHERNET:tcpMessage(<IP_address>:<port_no>=<message>)
Response format:
mO
●
/MEDIA/ETHERNET:tcpMessage
Example:
˃
CALL /MEDIA/ETHERNET:tcpMessage(192.168.0.20:5555=PWR0\x0d\x0a)
˂
mO /MEDIA/ETHERNET:tcpMessage
Escaping in the Message
When commands need to be separated by <CR><LF> charaters to be recognized by the controlled device,
then they need to be escaped. You can use the following format for escaping:
<command
1
><\x0d\x0a><command
2
><\x0d\x0a>...<command
n
><\x0d\x0a>