Operating State
Alignment SDK: Connected / State / WaitReason / EverConnected / ErrorCode.
GET /api/status
GET /api/status HTTP/1.1
Host: 127.0.0.1:18840
{
"serviceName": "DarraPnSService",
"version": "1.6.4+<提交号>",
"state": "DataExchange",
"connected": true,
"everConnected": true,
"errorCode": 0,
"waitReason": "已连接",
"statusMessage": "已连接",
"alarmCount": 0,
"criticalAlarmCount": 0,
"ioEpoch": 1204,
"outputSyncedToDriver": true,
"masterAssignedIp": ""
}
All response fields are read-only.
| Field | Note |
|---|---|
| serviceName | Service Name |
| version | The version reported by this device's service. The version number, in the form of 主版本.次版本.修订+提交号, is included with the shipment. |
| connected | Has the data for the cycle been updated? |
| everConnected | Was once connected. true and connected=false = disconnected |
| state | Operational string names: Unknown / STOP / Initialized / ConfigError / DataExchange / Aborted / Resetting. Only "DataExchange" indicates a periodic exchange. "Resetting(Device is resetting)" is a reserved ST name; the server's current version does not enter this ST during a reset. |
| errorCode | 0 = None; non-zero = native stack / platform fault code |
| waitReason / statusMessage | Reasons for Not Being Connected Yet |
| alarmCount / criticalAlarmCount | Activity Alerts |
| ioEpoch | Process Data Generations |
| outputSyncedToDriver | Q: Has the content in this section been submitted? Always false when process data is not ready; once ready, check whether the current content has been sent. false = the controller cannot retrieve it. Simply poll this field to determine whether the write has been sent; there is no need to rely solely on the single response of POST /api/io. It has the same origin and value as inputSyncedToDriver in GET /api/io. |
| masterAssignedIp | IO Controller DCP Assigned IP. Empty = Not assigned |
POST /api/reset(mode communication After returning factory or ok), state the program enters the waiting controller (Initialized) or the failure ST (ConfigError). Validation failure (HTTP 400) does not change the current ST. ST lines are string names.
POST /api/high-resolution-timer
Toggle the high-resolution 1ms timer held by the service process (write-only: the current value is held by the service; this interface does not return historical or current ST queries).
POST /api/high-resolution-timer HTTP/1.1
Host: 127.0.0.1:18840
Content-Type: application/json
{"highResolutionTimer": true}