Dependency
Blocked by #300.
Goal
Project OpenFlight's parsed device-runtime snapshots into a shared, ordered, non-real-time control stream inside flight-service.
Current integration points
- T.Flight and VKB STECS service runtimes poll/parse reports and cache latest snapshots.
- T.Flight snapshots expose normalized axes plus a button bitmask and hat state.
flight-bus has allocation-free numeric axis/button events, filters, and routing primitives.
flight-service owns runtime lifecycle and is the correct non-RT orchestration boundary.
Required design
Descriptor registry
Build or populate a registry that maps device/runtime numeric IDs to the stable control descriptors defined in #300. Preserve raw IDs when a semantic role is not validated.
Snapshot/event projection
For each supported runtime in this first lane (at minimum simulated T.Flight and simulated STECS):
- establish a non-actionable initial baseline;
- emit button press/release edges;
- emit hat/D-pad changes including neutral;
- emit encoder deltas when the runtime exposes them;
- optionally emit selected axes only when configured/rate-limited;
- emit reset/disconnect when the device/input epoch changes;
- suppress unchanged state.
Non-RT ControlEventHub
Add a service-owned hub that:
- receives projected items outside the 250 Hz RT path;
- supports multiple read-only subscribers;
- uses bounded queues;
- never blocks the RT path;
- reports an explicit reset/gap or recoverable error when a consumer falls behind;
- integrates with service startup/shutdown and safe mode.
Safe mode must behave explicitly: either the stream is disabled by negotiation or it publishes only the controls allowed by the documented safe-mode policy.
Do not duplicate mapping logic
Reuse existing parsed snapshots, device metadata, and flight-bus numeric events where appropriate. Do not add another raw-HID parser or a second hardware owner.
Acceptance criteria
Test matrix
Include simulated-source tests for baseline, press/release, hat neutral, encoder bursts, duplicate snapshots, disconnect/reconnect, subscriber lag, safe mode, and service shutdown.
Non-goals
- External IPC.
- Application control claims.
- MFD/LED/tactile output.
- Real-device support claims.
Program link
Parent program: EffortlessMetrics/runbook-rs#32.
Dependency
Blocked by #300.
Goal
Project OpenFlight's parsed device-runtime snapshots into a shared, ordered, non-real-time control stream inside
flight-service.Current integration points
flight-bushas allocation-free numeric axis/button events, filters, and routing primitives.flight-serviceowns runtime lifecycle and is the correct non-RT orchestration boundary.Required design
Descriptor registry
Build or populate a registry that maps device/runtime numeric IDs to the stable control descriptors defined in #300. Preserve raw IDs when a semantic role is not validated.
Snapshot/event projection
For each supported runtime in this first lane (at minimum simulated T.Flight and simulated STECS):
Non-RT
ControlEventHubAdd a service-owned hub that:
Safe mode must behave explicitly: either the stream is disabled by negotiation or it publishes only the controls allowed by the documented safe-mode policy.
Do not duplicate mapping logic
Reuse existing parsed snapshots, device metadata, and
flight-busnumeric events where appropriate. Do not add another raw-HID parser or a second hardware owner.Acceptance criteria
cargo xtask validate(or current full validation) passes.Test matrix
Include simulated-source tests for baseline, press/release, hat neutral, encoder bursts, duplicate snapshots, disconnect/reconnect, subscriber lag, safe mode, and service shutdown.
Non-goals
Program link
Parent program:
EffortlessMetrics/runbook-rs#32.