JSON Messages for WebSocket Connections

PCo supports the following six JSON messages:

Message

Description

GetTemplates

This message lists all notification templates for the running agent instances for which you have created a WebSocket destination system.

GetFeatures

This message lists all functions that are supported by the running agent instance.

Subscribe

With this message, you can subscribe to the current WebSocket to receive notifications by using the given template.

Unsubscribe

With the Unsubscribe message you can remove subscriptions. You can specify that the WebSocket is no longer subscribed to specific tags or entire notifications.

If you want the WebSocket client to remove the subscription for the entire notification, the parameters must not be set.

To reduce the load on the source system, the Web clients need to send this command before the WebSocket closes (when you leave the website). Otherwise, the subscription for the notification is maintained.

Reconnect

With the Reconnect message, you can reconnect the WebSocket with an existing notification using the given handle.

Retrieve

With this message you can read tag values for the query process.

Retrieve (with Metadata and Secondaries)

With this message you can read tag values (with metadata and secondaries) for the query process.

Response

With this message you can respond to retrieve commands. The response contains metadata and secondaries.

Store

With this message, you can write tag values using the given time stamp.