Bus and events

Modules don't call each other directly. They publish events on the internal bus and subscribe to events they care about. This keeps the dependency graph shallow and means new modules can plug in without modifying existing ones.

How it works

A single in-process pub/sub bus, one topic per named event. When something publishes an event, every subscriber to that topic is called in turn, in the order they subscribed. Delivery is synchronous — the publisher waits for the handlers to run — but a handler that raises an error is caught and logged, so one misbehaving subscriber can never stop the others (or block the publisher).


publisher.publish("solo.reading", payload, source="solo")
  ↓
bus dispatches to every subscriber of "solo.reading"
  ↓
SafetySupervisor handler updates the verdict
  ↓
audit handler writes a row
  ↓
web server forwards to connected WebSocket clients

A subscriber can also listen on the special topic * to receive every event that flows through the bus, which is handy for logging and audit.

Topics in use today

Safety and sources

Response Engine

Equipment

Console and long-running jobs

Sequencer and blockscript

Displays and files

Extending

Adding a new module means: instantiate a driver, publish its events on the bus, write a small status reader for module_status(), and add a handler in the web server that subscribes to the new topic and forwards it to WebSocket clients. There's no central registry to update — modules find each other only through the topics they publish and subscribe to.

Astroworx Starship v22.2.10 · this page is the in-app help of that buildDownload · HTTP API