pub struct MmdvmSession<T: Transport + Unpin + 'static> { /* private fields */ }Expand description
An MMDVM session that owns the radio transport via an
mmdvm::AsyncModem.
While this session is active, the transport speaks the MMDVM binary
framing protocol and all I/O is funneled through the spawned
modem-loop task. CAT commands are unavailable until
MmdvmSession::exit is called.
The session is consumed on entry (via Radio::enter_mmdvm) and
returned on exit.
Implementations§
Source§impl<T: Transport + Unpin + 'static> MmdvmSession<T>
impl<T: Transport + Unpin + 'static> MmdvmSession<T>
Sourcepub const fn modem_mut(&mut self) -> &mut AsyncModem<MmdvmTransportAdapter<T>>
pub const fn modem_mut(&mut self) -> &mut AsyncModem<MmdvmTransportAdapter<T>>
Mutable access to the underlying mmdvm::AsyncModem.
Consumers that need low-level MMDVM control (custom status polls,
mode changes, raw frame send) work with the handle directly.
Higher-level D-STAR orchestration (headers, voice frames, EOT)
is wrapped by crate::mmdvm::DStarGateway.
Sourcepub async fn exit(self) -> Result<Radio<T>, Error>
pub async fn exit(self) -> Result<Radio<T>, Error>
Exit MMDVM mode and return the Radio.
Shuts down the mmdvm::AsyncModem, recovering the transport,
sends TN 0,0 on the raw transport to return the radio’s TNC to
normal APRS mode, then rebuilds the Radio from saved state.
§Errors
Returns Error::Transport if the TN 0,0 write fails, or
translates mmdvm::ShellError into Error::Transport /
Error::Protocol as appropriate.