#[non_exhaustive]pub enum Event {
Show 13 variants
Version(VersionResponse),
Status(ModemStatus),
Ack {
command: u8,
},
Nak {
command: u8,
reason: NakReason,
},
DStarHeaderRx {
bytes: [u8; 41],
},
DStarDataRx {
bytes: [u8; 12],
},
DStarLost,
DStarEot,
Debug {
level: u8,
text: String,
},
SerialData(Vec<u8>),
TransparentData(Vec<u8>),
UnhandledResponse {
command: u8,
payload: Vec<u8>,
},
TransportClosed,
}Expand description
Events emitted by the modem loop to the consumer via
super::AsyncModem::next_event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Version(VersionResponse)
Modem firmware version + capabilities (one-shot, typically at init).
Status(ModemStatus)
Modem status update — periodic (from internal 250 ms poll) OR unsolicited (from the modem itself after TX transitions etc.).
Ack
Positive acknowledgement for a sent command.
Nak
Negative acknowledgement for a sent command.
DStarHeaderRx
D-STAR header received from the radio’s MMDVM TX (41 bytes).
DStarDataRx
D-STAR voice data received from the radio (9 AMBE + 3 slow data = 12 bytes).
DStarLost
D-STAR signal lost from the radio side.
DStarEot
D-STAR end-of-transmission from the radio side.
Debug
Debug text from the modem firmware
(MMDVM_DEBUG1..DEBUG5).
Fields
SerialData(Vec<u8>)
Serial passthrough data from the modem.
TransparentData(Vec<u8>)
Transparent data from the modem.
UnhandledResponse
The modem sent a mode we don’t fully model yet (DMR/YSF/P25/NXDN/POCSAG/FM), but the raw frame was accepted — payload preserved verbatim.
TransportClosed
The transport closed gracefully (e.g. serial device unplug).