Ethernet Message Sending; Sending A Tcp Message (Ascii-Format); Sending A Tcp Text (Ascii-Format); Sending A Tcp Binary Message (Hex-Format) - Lightware RAP-B511-EU User Manual

Room automation panel
Table of Contents

Advertisement

 
7. LW3 Programmers' Reference
7.16. Ethernet Message Sending
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.
7.16.1. Sending a TCP Message (ASCII-format)
The command is for sending a command message in ASCII-format. This method allows escaping the control
characters. For more information see the
Command and Response
ç CALL·/MEDIA/ETHERNET:tcpMessage(<IP_address>:<port_no>=<message>)
æ mO·/MEDIA/ETHERNET:tcpMessage
Example
ç CALL /MEDIA/ETHERNET:tcpMessage(192.168.0.103:6107=C00)
æ mO /MEDIA/ETHERNET:tcpMessage
The 'C00' message is sent to the indicated IP:port address.
Example – Controlling a Lightware Device
ç CALL /MEDIA/ETHERNET:tcpMessage(192.168.0.17:6107=CALL /MEDIA/VIDEO/XP:switch\(I2:O1\)\\
x0d\\x0a)
æ mO /MEDIA/ETHERNET:tcpMessage
The switch command is executed in the target device; the switch command is closed by carriage return and
line feed (LW3 rule), and the control characters are escaped by the backslash.
Example with HEX codes
ç CALL /MEDIA/ETHERNET:tcpMessage(192.168.0.20:5555=C00\x0a\x0d)
æ mO /MEDIA/ETHERNET:tcpMessage
The 'C00' message with CrLf (Carriage return and Line feed) is sent to the indicated IP:port address. The
\x sequence indicates the HEXA code; see more information in the
7.16.2. Sending a TCP Text (ASCII-format)
The command is for sending a text message in ASCII-format. This method does not allow escaping or inserting
control characters.
Command and Response
ç CALL·/MEDIA/ETHERNET:tcpText(<IP_address>:<port_no>=<text>)
æ mO·/MEDIA/ETHERNET:tcpText
Example
ç CALL /MEDIA/ETHERNET:tcpText(192.168.0.103:6107=pwr_on)
æ mO /MEDIA/ETHERNET:tcpText
The 'pwr_on' text is sent to the indicated IP:port address.
Escaping
section.
Using Hexadecimal Codes
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
RAP-B511 series – User's Manual
7.16.3. Sending a TCP Binary Message (HEX-format)
The command is for sending a binary message in Hexadecimal format. This method does not require escaping
the control and non-printable characters.
Command and Response
ç CALL·/MEDIA/ETHERNET.tcpBinary(<IP_address>:<port_no>=<HEX_message>)
æ mO·/MEDIA/ETHERNET:tcpBinary
Example
ç CALL /MEDIA/ETHERNET:tcpBinary(192.168.0.103:6107=0100000061620000cdcc2c40)
æ mO /MEDIA/ETHERNET:tcpBinary
The '0100000061620000cdcc2c40' message is sent to the indicated IP:port address.
INFO:

There is no need to insert a space or other separator character between the binary messages.
7.16.4. Sending a UDP Message (ASCII-format)
The command is for sending a UDP message in ASCII-format. This method allows escaping the control characters.
For more information see the
Command and Response
ç CALL·/MEDIA/ETHERNET:udpMessage(<IP_address>:<port_no>=<message>)
æ mO·/MEDIA/ETHERNET:udpMessage
Example
ç CALL /MEDIA/ETHERNET:udpMessage(192.168.0.103:6107=C00)
æ mO /MEDIA/ETHERNET:udpMessage
The 'C00' message is sent to the indicated IP:port address.
Example with HEX codes
ç CALL /MEDIA/ETHERNET:udpMessage(192.168.0.20:9988=C00\x0a\x0d)
section.
æ mO /MEDIA/ETHERNET:udpMessage
The 'C00' message with CrLf (Carriage return and Line feed) is sent to the indicated IP:port address. The \x
sequence indicates the HEXA code; see more information in the
Escaping
section.
Using Hexadecimal Codes
90
section.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rap-b511-kRap-b511-wRap-b511-sRap-b511-ukRap-b511-us

Table of Contents