Real-time Data Push
Prerequisites: The box needs to call OpenFGateMonitoringPoint every time it comes online.
Listening Method Name:dMonUpdateValue
When the monitoring point data changes or when the open point is called, the server pushes the message.
Parameter Correspondence
Field | Type | Description |
---|---|---|
boxSessionId | int | Currently can be ignored |
values | JSON array | Collection of monitoring point values, details of single attribute see the table below |
boxUid | string | Find it in Get FGate list interface: boxRegs->box->uid |
Corresponding Attributes in value
Field | Type | Description |
---|---|---|
id | string | Monitoring point entry UID |
name | string | Monitoring point name |
msg | string | Box serial number BoxNo |
value | string | Value, if the item is configured with decimal places, the program needs to convert it itself, the server does not do any intermediate processing |
status | int | If the item is normal, this attribute does not exist, 1: no data, 2: timeout, 3: error, 4: Socket exception, 5: FDS error, 16: incomplete |
t | int | Timestamp of the push (in UTC format (milliseconds), timestamp when the monitoring point data changes) |
gname | string | Group name |
Note: Status indicates the communication status between the monitoring point under the box and the PLC. When communicating with the PLC normally, the status value parsed by Json is 0.