7. LW3 Programmers’ Reference
MMX4x2 series – User's Manual
116
Applied firmware package: v1.6.0b19 | LDC software: v2.5.13b5
7.15.
HTTP Messaging
DIFFERENCE:
This feature and the commands below are available from firmware v1.6.0b19.
Http
post
and
put
messages can be sent from the Lightware device for more integration with third-party
devices.
#http
ATTENTION!
This feature means posting or putting
HTTP
messages from the Lightware device to another
device. Encrypted transmission (
HTTPS
) is not supported.
7.15.1.
Setting the Target IP Address
Command and Response
ç
SET·/CTRL/HTTP/C1.ServerIP=
<IP_address>
æ
pw·/CTRL/HTTP/C1.ServerIP=
<IP_address>
Example
ç
SET /CTRL/HTTP/C1.ServerIP=192.168.0.220
æ
pw /CTRL/HTTP/C1.ServerIP=192.168.0.220
7.15.2.
Setting the TCP Port
Command and Response
ç
SET·/CTRL/HTTP/C1.ServerPort=
<port_no>
æ
pw·/CTRL/HTTP/C1.ServerPort=
<port_no>
Example
ç
SET /CTRL/HTTP/C1.ServerPort=80
æ
pw /CTRL/HTTP/C1.ServerIP=80
7.15.3.
Setting the Target Path
This property sets the path in the target device where the post/put message is to be sent.
Command and Response
ç
SET·/CTRL/HTTP/C1.File=
<path>
æ
pw·/CTRL/HTTP/C1.File=
<path>
Example
ç
SET /CTRL/HTTP/C1.File=/putxml
æ
pw /CTRL/HTTP/C1.File=/putxml
7.15.4.
Setting the Message Header
Command and Response
ç
SET·/CTRL/HTTP/C1.Header=
<header_text>
æ
pw·/CTRL/HTTP/C1.Header=
<header_text>
Example
ç
SET /CTRL/HTTP/C1.Header=Host: 192.168.0.220\r\nContent-Type: text/xml\r\nAuthorization: Basic
YWRtaW46TGlnaHR3YXJlMDE=
æ
pw /CTRL/HTTP/C1.Header=Host: 192.168.0.220\r\nContent-Type: text/xml\r\nAuthorization: Basic
YWRtaW46TGlnaHR3YXJlMDE=
7.15.5.
Sending a Post Message
Command and Response
ç
CALL·/CTRL/HTTP/C1:post(
<body_text>
)
æ
mO·/CTRL/HTTP/C1:post
Example
ç
CALL /CTRL/HTTP/C1:post(<Command><Message><Send><Text>LI1R_P</Text></Send></
Message></Command>)
æ
mO /CTRL/HTTP/C1:post
7.15.6.
Sending a Put Message
Command and Response
ç
CALL·/CTRL/HTTP/C1:put(
<body_text>
)
æ
mO·/CTRL/HTTP/C1:put
Example
ç
CALL /CTRL/HTTP/C1:put(<Command><Message><Send><Text>LI1R_P</Text></Send></Message></
Command>)
æ
mO /CTRL/HTTP/C1:put