6. LW3 Programmers’ Reference
HDMI20-OPTC series – User's Manual
53
6.7. Sending Message via the Communication Ports
6.7.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
characters.
Command and Response
Ý
CALL•/MEDIA/UART/P1:sendMessage(
<message>
)
Ü
mO•/MEDIA/UART/P1: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> characters 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>
See more details in
section.
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 and Response
Ý
CALL•/MEDIA/UART/P1:sendText(
<message>
)
Ü
mO•/MEDIA/UART/P1: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.
Command and Response
Ý
CALL•/MEDIA/UART/<P1>.sendBinaryMessage(
<message>
)
Ü
mO•/MEDIA/UART/<P1>:sendBinaryMessage
Example
Ý
CALL /MEDIA/UART/P1:sendBinaryMessage(1100000061620000cdcc2c40)
Ü
mO /MEDIA/UART/P1:sendBinaryMessage
6.7.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
characters.
Command and Response
Ý
CALL•/MEDIA/ETHERNET:tcpMessage(
<IP_address>
:
<port_no>
=
<message>
)
Ü
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> characters 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>
See more details in
section.