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.

FieldTypeDescription
successboolHigh-voltage enable succeeded. false means startup failed
messagestringAdditional 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.

FieldTypeDescription
keystringUpgrade target
statusstringparsing, progress, ready, or failed
messagestringProgress, 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 → ready or failed
  • Driver-board upgrade: parsing → zero or more progress → ready or failed

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.

FieldTypeDescription
statusstringon or off
{"triggerSignal":{"status":"on"}}

encoderSpeed

Reports encoder pulse-rate information.

FieldTypeDescription
speedintEncoder pulse rate in pulses per second (pps)
pprAintEncoder phase-A pulses per revolution (PPR)
pprBintEncoder phase-B pulses per revolution (PPR)
{"encoderSpeed":{"speed":123,"pprA":100,"pprB":200}}

fpgaStatus

Reports an FPGA status code.

FieldTypeDescription
codeintFPGA 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.