Event Notifications
The SDK delivers event data as one JSON object per callback. The top-level key identifies the event.
The examples use the camelCase field names returned by the C interface. Treat a missing field as its type’s default value.
printStarted
Reports the result of a print-start request.
| Field | Type | Description |
|---|---|---|
success | bool | High-voltage enable succeeded. false means startup failed |
message | string | Additional status information. A successful result may also include this field when some heads report an abnormal state |
{"printStarted":{"success":true}}
{"printStarted":{"message":"High-voltage enable failed"}}
Some successful results may include a message:
{"printStarted":{"success":true,"message":"Some print heads reported an abnormal state"}}
upgradeStatus
Reports upgrade processing state.
| Field | Type | Description |
|---|---|---|
key | string | Upgrade target |
status | string | parsing, progress, ready, or failed |
message | string | Progress, result, or failure information; may be present with any status |
{"upgradeStatus":{"key":"SYSTEM","status":"parsing"}}
{"upgradeStatus":{"key":"SYSTEM","status":"ready"}}
{"upgradeStatus":{"key":"SYSTEM","status":"failed","message":"Invalid upgrade file"}}
For driver-board upgrades, status may be progress and message may contain a percentage such as "42%".
Status progression:
- System upgrade:
parsing→readyorfailed - Driver-board upgrade:
parsing→ zero or moreprogress→readyorfailed
For ready, a system upgrade file is ready for the next steps in the product manual. A driver-board upgrade has finished writing the firmware.
triggerSignal
Reports trigger-signal state.
| Field | Type | Description |
|---|---|---|
status | string | on or off |
{"triggerSignal":{"status":"on"}}
encoderSpeed
Reports encoder pulse-rate information.
| Field | Type | Description |
|---|---|---|
speed | int | Encoder pulse rate in pulses per second (pps) |
pprA | int | Encoder phase-A pulses per revolution (PPR) |
pprB | int | Encoder phase-B pulses per revolution (PPR) |
{"encoderSpeed":{"speed":123,"pprA":100,"pprB":200}}
fpgaStatus
Reports an FPGA status code.
| Field | Type | Description |
|---|---|---|
code | int | FPGA status code |
{"fpgaStatus":{"code":12}}
printComplete
Reports that printing completed. This event has no fields.
{"printComplete":{}}
Handling Recommendations
- Use the top-level event name to select the handler.
- Use default values when optional fields are absent.
- Ignore unknown event types so newer events remain compatible.
- Do not perform long blocking work inside the callback.