Skip to main content

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.

FieldNote
serviceNameService Name
versionThe version reported by this device's service. The version number, in the form of 主版本.次版本.修订+提交号, is included with the shipment.
connectedHas the data for the cycle been updated?
everConnectedWas once connected. true and connected=false = disconnected
stateOperational 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.
errorCode0 = None; non-zero = native stack / platform fault code
waitReason / statusMessageReasons for Not Being Connected Yet
alarmCount / criticalAlarmCountActivity Alerts
ioEpochProcess Data Generations
outputSyncedToDriverQ: 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.
masterAssignedIpIO 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}