IO-Link master with EtherCAT interface DataLine 4 ports IP 65 / IP 66 / IP 67
63
Example: Checking subscriptions
61164
Task: Information about the existing subscription (
Example: Subscribing to notifications
(
)Show
Example: Subscribing to notifications
(
Solution: Use the service getsubscriptioninfo and the parameter values cid, "adr" and "callback" of the
existing subscription to retrieve the information.
•
Request:
{
"code":"request",
"cid":4711,
"adr":"/timer[1]/counter/datachanged/getsubscriptioninfo",
"data":{
"callback":"http://192.168.0.4:80/temp"}
}
•
Response:
{
"cid." 4711,
"data":{
"callback":"http://192.168.0.4:80/temp",
"datatosend":[
"/iolinkmaster/port[2]/iolinkdevice/productname",
"/iolinkmaster/port[2]/iolinkdevice/pdin",
"/processdatamaster/temperature"]},
"code":200
}
>
9.2.22
Using Web Socket
61165
The IoT Core supports communication via WebSocket protocol. With Web Sockets, the user can
establish a full-duplex communication channel via a TCP connection.
WebSockets can be used for the following services:
•
subscribe / unsubscribe
Maximum number of WebSocket connections: 8
Fail-safe WebSocket connections (wss://) are not supported.
To transmit notifications via a WebSockets connection:
► Establish the WebSocket connection (e.g.
"ws://192.168.0.55:80/websocket"
)
•
Option 1: without parameter "callback”
► make subscribe/unsubscribe request without parameter "callback".
>
IoT-Core sends notifications about existing WebSocket connections.
•
Option 2. with parameter "callback”
► make subscribe/unsubscribe requests with parameter "callback" (
"ws:///myTopic"
).
>
IoT-Core sends notifications about existing WebSocket connections to the topic
myTopic
.
>
Example: Subscribing notifications via WebSocket
61166
Task
: The current values of the following parameters are to be sent regularly to the data sink
myTopic
via an existing WebSocket connection: