Expand description
High-level session management and connection lifecycle.
ProtocolSession is the central state machine for communicating with a
RØDECaster. It manages device discovery, keeps track of the active layout,
decodes incoming payloads into DeviceEvents, and encodes Commands
into wire payloads.
§The Session Lifecycle
- Initialization: Create a new session with
ProtocolSession::new. At this stage, the session is waiting for the device to introduce itself. - Full Sync: When first connected (or after a handshake), the device sends
a full state snapshot (
fullSync). Ingesting this yieldsSessionUpdate::Ready, which populatesDeviceCapabilitiesand yieldsinitial_eventsdescribing the current state of all faders, mutes, and routing. - Steady State: While connected, incoming messages yield
SessionUpdate::Eventfor real-time updates (fader movements, knob adjustments, button presses). You can also callProtocolSession::encodeto send commands to the device. - Resync: If the device tree topology changes (e.g. major mode switch),
the session yields
SessionUpdate::NeedsFullSyncand resets its layout. Your transport should request a fresh full sync before resuming commands.
Structs§
- Protocol
Session - Stateful, transport-independent RODECaster protocol session.
Enums§
- Session
Error - Failure to decode a payload, establish a layout, or encode a command.
- Session
Update - Result of ingesting one complete JUCE change-frame payload.