Skip to main content

Start/Stop and Reset

Alignment SDK Start / Stop / Reset. The response field is read-only; mode the write field is writable.

POST /api/start​

No request body. It's already RUN; RUN it again will also succeed.

POST /api/start HTTP/1.1
Host: 127.0.0.1:18840
Content-Length: 0
{ "ok": true, "message": "从站已启动", "errorCode": 0 }

When it fails, set it to ok false, message and return it directly. Reasons for Not Getting Up(Describe the specific rung where the process is stuck, not general ST terms like “not started.”) Only use “satellite not in operation” as a fallback when the specific cause cannot be determined. errorCode Copy the fault code corresponding to the current operational ST exactly as it appears: 0 = None; non-zero = native stack / platform fault code.

{ "ok": false, "message": "启动从站失败: <原因>", "errorCode": 0 }

POST /api/stop​

No request body. Idempotent.

POST /api/reset​

Request Body mode(Write, Required):

POST /api/reset HTTP/1.1
Host: 127.0.0.1:18840
Content-Type: application/json

{"mode": "communication"}
modeWhat are you doing?
communicationStop and then restart; application settings are preserved
factoryClear the app settings and restart

mode If either of these values is missing or not equal to = HTTP 400, the system does not enter reset mode. Response: ok / mode / message / timestamp.

ok After returning, GET /api/status the ST state transitions to the waiting controller (Initialized) or the failure ST (ConfigError). Resetting (Device Reset) is a reserved ST name in the ST tree; this ST is not triggered when the server is reset in the current version.