RadioCommand

Enum RadioCommand 

Source
pub(crate) enum RadioCommand {
Show 35 variants ReadMemory, WriteMemory(Vec<u8>), TuneChannel { band: Band, channel: u16, }, FreqUp(Band), FreqDown(Band), TuneFreq { band: Band, freq: u32, }, SetSquelch { band: Band, level: SquelchLevel, }, SetAttenuator { band: Band, enabled: bool, }, SetMode { band: Band, mode: Mode, }, SetLock(bool), SetDualBand(bool), SetBluetooth(bool), SetVox(bool), SetVoxGain(VoxGain), SetVoxDelay(VoxDelay), SetTncBaud(TncBaud), SetBeaconType(BeaconMode), SetGpsConfig(bool, bool), SetFmRadio(bool), SetCallsignSlot(CallsignSlot), SetDstarSlot(DstarSlot), SetStepSize { band: Band, step: StepSize, }, SetScanResumeCat(ScanResumeMethod), McpWriteByte { offset: u16, value: u8, }, SetPower { band: Band, level: PowerLevel, }, SetUrcall { callsign: String, suffix: String, }, ConnectReflector { name: String, module: char, }, DisconnectReflector, SetCQ, EnterDStar { config: DStarGatewayConfig, }, ExitDStar, EnterAprs { config: Box<AprsClientConfig>, }, ExitAprs, SendAprsMessage { addressee: String, text: String, }, BeaconPosition { lat: f64, lon: f64, comment: String, },
}
Expand description

Commands sent from the app to the radio task.

Variants§

§

ReadMemory

Trigger a full MCP memory read from the radio.

§

WriteMemory(Vec<u8>)

Trigger a full MCP memory write to the radio.

§

TuneChannel

Tune the given band to a memory channel number.

Fields

§band: Band

The band to tune.

§channel: u16

The memory channel number (0–1199).

§

FreqUp(Band)

Step frequency up by one increment on the given band.

§

FreqDown(Band)

Step frequency down by one increment on the given band.

§

TuneFreq

Tune to a specific frequency on the given band.

Fields

§band: Band

The band to tune.

§freq: u32

The frequency in Hz.

§

SetSquelch

Set the squelch level for the given band (SQ write — verified working).

Fields

§band: Band
§level: SquelchLevel
§

SetAttenuator

Toggle the attenuator for the given band (RA write — verified working).

Fields

§band: Band
§enabled: bool
§

SetMode

Set the operating mode for the given band (MD write — may return N in some modes).

Fields

§band: Band
§mode: Mode
§

SetLock(bool)

Toggle lock on/off (LC write — verified working, value inverted on D75).

§

SetDualBand(bool)

Toggle dual band on/off (DL write — verified working, value inverted on D75).

§

SetBluetooth(bool)

Toggle bluetooth on/off (BT write — verified working).

§

SetVox(bool)

Toggle VOX on/off (VX write — verified working).

§

SetVoxGain(VoxGain)

Set VOX gain (VG write — verified working).

§

SetVoxDelay(VoxDelay)

Set VOX delay (VD write — verified working).

§

SetTncBaud(TncBaud)

Set TNC baud rate (AS write — verified working).

§

SetBeaconType(BeaconMode)

Set beacon type (PT write — verified working).

§

SetGpsConfig(bool, bool)

Set GPS config (GP write — verified working).

§

SetFmRadio(bool)

Set FM radio on/off (FR write — verified working).

§

SetCallsignSlot(CallsignSlot)

Set D-STAR callsign slot (CS write — verified working). Not yet wired to adjust_setting (requires polling current slot first).

§

SetDstarSlot(DstarSlot)

Set D-STAR slot (DS write — verified working). Not yet wired to adjust_setting (requires polling current slot first).

§

SetStepSize

Set the step size for the given band (SF write — verified working).

Fields

§band: Band
§step: StepSize
§

SetScanResumeCat(ScanResumeMethod)

Set the scan resume method (SR write — write-only on D75).

§

McpWriteByte

Write a single byte to MCP memory via modify_memory_page. Enters MCP mode, modifies one byte, exits. USB drops and reconnects. Used for settings where CAT writes are rejected by D75 firmware.

Fields

§offset: u16
§value: u8
§

SetPower

Set the transmit power level for the given band.

Fields

§band: Band

The band to adjust.

§level: PowerLevel

The desired power level.

§

SetUrcall

Set D-STAR URCALL callsign via CAT (works in normal CAT mode).

Fields

§callsign: String

Callsign (up to 8 chars).

§suffix: String

Suffix (up to 4 chars).

§

ConnectReflector

Connect to a D-STAR reflector via CAT (sets URCALL to link command).

Fields

§name: String

Reflector callsign (e.g. “REF030”).

§module: char

Reflector module letter (e.g. ‘C’).

§

DisconnectReflector

Disconnect from the current D-STAR reflector via CAT.

§

SetCQ

Set URCALL to CQCQCQ via CAT.

§

EnterDStar

Enter D-STAR gateway mode (MMDVM/DStarGateway).

Fields

§config: DStarGatewayConfig

D-STAR gateway configuration.

§

ExitDStar

Exit D-STAR gateway mode.

§

EnterAprs

Enter APRS/KISS mode. The radio task enters KISS mode and starts processing APRS packets instead of CAT polling.

Fields

§config: Box<AprsClientConfig>

APRS client configuration (callsign, SSID, etc.).

Boxed because AprsClientConfig contains vector and option fields that make it significantly larger than other variants.

§

ExitAprs

Exit APRS/KISS mode. Returns to CAT polling.

§

SendAprsMessage

Send an APRS message to a station while in APRS mode.

Fields

§addressee: String

Destination callsign.

§text: String

Message text.

§

BeaconPosition

Transmit a manual position beacon while in APRS mode.

Fields

§lat: f64

Latitude in decimal degrees.

§lon: f64

Longitude in decimal degrees.

§comment: String

Beacon comment text.

Trait Implementations§

Source§

impl Debug for RadioCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more