Expand description
Events returned as values.
Publish/subscribe needs listener storage (allocation), runs foreign code
inside a calculation (unbounded time, possible panic, half-updated state
visible) and makes delivery order incidental. Instead, a state-changing
operation returns what happened in an EventList alongside its result;
the caller alarms, logs or forwards. The list is #[must_use] and has fixed
capacity with an explicit EventList::overflowed flag: a lost navigation
event is worse than a late one.
The kernel’s events (fix acquired or lost, observation rejected, integrity
or sensor health changed) are NavigationEvent. Other contexts define
their own enums (guidance: waypoint reached; traffic: target lost) in their
own EventList. The Event trait defines an event: a timestamp and a
placeholder for unused slots. The kernel does not know outer contexts’
events; the integrating crate (alert board, application) defines the union.
Structs§
- Event
List - Events of one operation, in order.
- Sensor
Id - Observation source identifier: the source’s name, truncated to
SENSOR_NAME_BYTESso events stay plain values. - Target
Id - Target identifier: radar track number or AIS MMSI.
Enums§
- Navigation
Event - Kernel event.
- Navigation
Integrity - Integrity of the navigation solution as a whole.
- Position
Source - Position source.
- Rejection
Reason - Observation rejection reason.
- Sensor
Health - Health of one observation source, as judged by its consumer.
Constants§
- MAX_
EVENTS - Default per-operation event capacity.
- SENSOR_
NAME_ BYTES - Maximum sensor name length in an event, bytes.