Module dispatch
Expand description
Unified SOP event dispatch helpers.
Structs§
- SopCron
Cache - Pre-parsed cron schedules for SOP triggers. Built once at daemon startup to avoid re-parsing cron expressions on every scheduler tick.
Enums§
- Dispatch
Result - Outcome of attempting to dispatch an event to the SOP engine.
Functions§
- check_
sop_ cron_ triggers - Check all cached cron SOP triggers for firings in the window
(last_check, now]and dispatch events for each. Uses window-based evaluation so ticks between polls are never missed. - dispatch_
peripheral_ signal - Convenience wrapper for peripheral hardware callbacks.
Builds a
SopEventwith sourcePeripheraland topic"{board}/{signal}"then dispatches it through the standard path. - dispatch_
sop_ event - dispatch_
sop_ event_ to - Dispatch an incoming event to one named SOP, after normal trigger matching. This is useful for channel routers that already selected a configured SOP name, while still requiring that SOP to declare a matching trigger.
- dispatch_
untrusted_ fan_ in - Headless fan-in chokepoint for untrusted external events (channel
messages, AMQP deliveries, …): caps oversized topic/payload at the
configured
untrusted_payload_max_bytes(with an explicit truncation marker), stamps the event, dispatches it against loaded SOP triggers, and audits the results. Callers should gate onSopEngine::wants_sourcefirst to skip the work when no SOP listens. - process_
headless_ results - results_
need_ redelivery - True when at least one matched SOP is backpressured and no SOP has already
started from this delivery. A durable transport (e.g. AMQP with
durable_ack) can safely nack/requeue only when redelivery cannot replay a started SOP’s side effects.