Response

Enum Response 

Source
pub enum Response {
Show 67 variants Frequency { band: Band, channel: ChannelMemory, }, FrequencyFull { band: Band, channel: ChannelMemory, }, FirmwareVersion { version: String, }, PowerStatus { on: bool, }, RadioId { model: String, }, PowerLevel { band: Band, level: PowerLevel, }, BandResponse { band: Band, }, VfoMemoryMode { band: Band, mode: VfoMemoryMode, }, FmRadio { enabled: bool, }, AfGain { level: AfGainLevel, }, Squelch { band: Band, level: SquelchLevel, }, Smeter { band: Band, level: SMeterReading, }, Mode { band: Band, mode: Mode, }, FineStep { step: FineStep, }, FunctionType { enabled: bool, }, FilterWidth { mode: FilterMode, width: FilterWidthIndex, }, Attenuator { band: Band, enabled: bool, }, AutoInfo { enabled: bool, }, Busy { band: Band, busy: bool, }, DualBand { enabled: bool, }, FrequencyDown, Beep { enabled: bool, }, Lock { locked: bool, }, IoPort { value: DetectOutputMode, }, BatteryLevel { level: BatteryLevel, }, VoxDelay { delay: VoxDelay, }, VoxGain { gain: VoxGain, }, Vox { enabled: bool, }, MemoryChannel { channel: u16, data: ChannelMemory, }, MemoryRecall { band: Band, channel: u16, }, CurrentChannel { band: Band, channel: u16, }, ProgrammingMode, TncMode { mode: TncMode, setting: TncBaud, }, DstarCallsign { slot: DstarSlot, callsign: String, suffix: String, }, RealTimeClock { datetime: String, }, StepSize { band: Band, step: StepSize, }, BandScope { band: Band, }, TncBaud { rate: TncBaud, }, SerialInfo { serial: String, model_code: String, }, BeaconType { mode: BeaconMode, }, PositionSource { source: u8, }, DstarSlot { slot: DstarSlot, }, ActiveCallsignSlot { slot: CallsignSlot, }, Gateway { value: DvGatewayMode, }, GpsConfig { gps_enabled: bool, pc_output: bool, }, GpsMode { mode: GpsRadioMode, }, GpsSentences { gga: bool, gll: bool, gsa: bool, gsv: bool, rmc: bool, vtg: bool, }, Bluetooth { enabled: bool, }, SdCard { present: bool, }, UserSettings { value: u8, }, RadioType { region: String, variant: u8, }, McpStatus { value: String, }, ServiceMode { data: String, }, ServiceCalibrationData { data: String, }, ServiceCalibrationWrite { data: String, }, ServiceCalibrationParam { mnemonic: String, data: String, }, ServiceWriteConfig { data: String, }, ServiceBandSelect { data: String, }, ServiceWriteId { data: String, }, ServiceFlash { data: String, }, ServiceEepromData { data: String, }, ServiceEepromAddr { data: String, }, ServiceVersion { data: String, }, ServiceHardware { data: String, }, Ok, Error, NotAvailable,
}
Expand description

A parsed response from the radio.

Variants§

§

Frequency

Frequency response (FQ).

Fields

§band: Band

Band the frequency is on.

§channel: ChannelMemory

Channel memory data.

§

FrequencyFull

Full frequency and settings response (FO).

Fields

§band: Band

Band the data is for.

§channel: ChannelMemory

Channel memory data.

§

FirmwareVersion

Firmware version response (FV).

Fields

§version: String

Version string.

§

PowerStatus

Power status response (PS).

Fields

§on: bool

Whether the radio is on.

§

RadioId

Radio model ID response (ID).

Fields

§model: String

Model identification string.

§

PowerLevel

Power level response (PC).

Fields

§band: Band

Band the level is for.

§level: PowerLevel

Current power level.

§

BandResponse

Band response (BC read).

Fields

§band: Band

Current active band.

§

VfoMemoryMode

VFO/Memory mode response (VM).

Mode values: 0 = VFO, 1 = Memory, 2 = Call, 3 = WX.

Fields

§band: Band

Band the mode is for.

§mode: VfoMemoryMode

VFO/Memory mode.

§

FmRadio

FM radio on/off response (FR).

Fields

§enabled: bool

Whether FM radio is enabled.

§

AfGain

AF gain response (AG).

Per KI4LAX CAT reference: gain range 000-099.

Fields

§level: AfGainLevel

Gain level (0-99). Global, not per-band.

§

Squelch

Squelch level response (SQ).

Fields

§band: Band

Band the squelch is for.

§level: SquelchLevel

Squelch level (0-6).

§

Smeter

S-meter reading response (SM).

Fields

§band: Band

Band the reading is for.

§level: SMeterReading

S-meter level (0-5).

§

Mode

Operating mode response (MD).

Fields

§band: Band

Band the mode is for.

§mode: Mode

Current operating mode.

§

FineStep

Fine step response (FS).

Firmware-verified: bare FS\r returns FS value (single value, no band).

Fields

§step: FineStep

Current fine step setting.

§

FunctionType

Function type response (FT).

Fields

§enabled: bool

Fine tune enabled (0=off, 1=on).

§

FilterWidth

Filter width response (SH).

Fields

§mode: FilterMode

Receiver filter mode queried.

§width: FilterWidthIndex

Filter width index (0-4 for SSB/CW, 0-3 for AM).

§

Attenuator

Attenuator state response (RA).

Fields

§band: Band

Band the state is for.

§enabled: bool

Whether attenuator is enabled.

§

AutoInfo

Auto-info mode response (AI).

Fields

§enabled: bool

Whether auto-info is enabled.

§

Busy

Busy state response (BY).

Fields

§band: Band

Band the state is for.

§busy: bool

Whether the channel is busy.

§

DualBand

Dual-band mode response (DL).

Fields

§enabled: bool

Whether dual-band is enabled.

§

FrequencyDown

Frequency down acknowledgement (DW).

§

Beep

Beep setting response (BE).

D75 RE: BE x (x: 0=off, 1=on).

Fields

§enabled: bool

Whether key beep is enabled.

§

Lock

Key lock state response (LC).

The locked field uses wire semantics: on the D75 the wire value is inverted (true = unlocked on wire). Radio::set_lock() and Radio::get_lock() handle the inversion so callers see logical lock state.

Fields

§locked: bool

Whether key lock is engaged (wire semantics — inverted on D75).

§

IoPort

AF/IF/Detect output mode response (IO).

Fields

§value: DetectOutputMode

Output mode.

§

BatteryLevel

Battery level response (BL).

0=Empty (Red), 1=1/3 (Yellow), 2=2/3 (Green), 3=Full (Green), 4=Charging (USB power connected).

Fields

§level: BatteryLevel

Battery charge level (0–4, where 4 = charging).

§

VoxDelay

VOX delay response (VD).

Fields

§delay: VoxDelay

Current VOX delay (0-30, in 100ms units).

§

VoxGain

VOX gain response (VG).

Fields

§gain: VoxGain

Current VOX gain (0-9).

§

Vox

VOX state response (VX).

Fields

§enabled: bool

Whether VOX is enabled.

§

MemoryChannel

Memory channel data response (ME).

Fields

§channel: u16

Channel number.

§data: ChannelMemory

Channel memory data.

§

MemoryRecall

Memory recall echo response (MR write acknowledgment).

When MR band,channel is sent as a write/recall, the radio echoes back the band and channel as acknowledgment.

Fields

§band: Band

Target band.

§channel: u16

Channel number.

§

CurrentChannel

Current channel number response (MR read).

Hardware-verified: MR band\r returns MR bandCCC (no comma). Example: MR 0\r returns MR 021 = band A, channel 21.

Fields

§band: Band

Band queried.

§channel: u16

Current channel number on that band.

§

ProgrammingMode

Programming mode acknowledgment (0M).

The radio enters MCP programming mode and stops responding to normal CAT commands. This response should never actually be received in practice.

§

TncMode

TNC mode response (TN).

Hardware-verified: bare TN\r returns TN mode,setting. Example: TN 0,0.

Valid mode values per firmware validation: 0, 1, 2, 3. Mode 3 may correspond to MMDVM or Reflector Terminal mode.

Fields

§mode: TncMode

TNC operating mode.

§setting: TncBaud

TNC data speed setting.

§

DstarCallsign

D-STAR callsign data response (DC).

Hardware-verified: DC slot\r returns DC slot,callsign,suffix. Example: DC 1,KQ4NIT ,D75A.

Fields

§slot: DstarSlot

Callsign slot (1-6).

§callsign: String

Callsign string (may be space-padded).

§suffix: String

Callsign suffix/module.

§

RealTimeClock

Real-time clock response (RT).

Hardware-verified: bare RT\r returns RT YYMMDDHHmmss. Example: RT 240104095700.

Fields

§datetime: String

Raw datetime string in YYMMDDHHmmss format.

§

StepSize

Step size response (SF).

Firmware-verified: SF = Step Size. Format: band,step where band is 0/1 and step is the step size index (0-11).

Fields

§band: Band

Band the step is for.

§step: StepSize

Current step size.

§

BandScope

Band scope data response (BS).

BS echoes the band number when queried.

Fields

§band: Band

Band the scope is for.

§

TncBaud

TNC baud rate response (AS).

Values: 0 = 1200 baud, 1 = 9600 baud.

Fields

§rate: TncBaud

Baud rate.

§

SerialInfo

Serial number and model code response (AE).

Despite the AE mnemonic (historically “APRS Extended”), this command returns the radio’s serial number and model code. Format: serial,model_code (e.g., C3C10368,K01).

Fields

§serial: String

Radio serial number.

§model_code: String

Model code (e.g., “K01”).

§

BeaconType

Beacon TX control mode response (PT).

Fields

§mode: BeaconMode

Beacon transmission mode.

§

PositionSource

APRS position source response (MS read).

Fields

§source: u8

Position source index (0-based).

§

DstarSlot

Active D-STAR callsign slot response (DS).

Fields

§slot: DstarSlot

Active D-STAR memory slot (1-6).

§

ActiveCallsignSlot

Active callsign slot number response (CS).

CS returns a slot number, NOT the callsign text. The actual callsign text is accessible via DC (D-STAR callsign) slots 1-6.

Fields

§slot: CallsignSlot

Active callsign slot (0-10).

§

Gateway

DV Gateway mode response (GW).

Fields

§value: DvGatewayMode

DV Gateway mode.

§

GpsConfig

GPS configuration response (GP).

Two boolean fields: GPS enabled and PC output enabled. Format: gps_enabled,pc_output (e.g., 0,0).

Fields

§gps_enabled: bool

Whether GPS is enabled.

§pc_output: bool

Whether GPS PC output is enabled.

§

GpsMode

GPS/Radio mode status response (GM).

0 = Normal transceiver mode, 1 = GPS receiver mode. Firmware-verified: cat_gm_handler guard local_18 < 2.

Fields

§mode: GpsRadioMode

GPS/Radio operating mode.

§

GpsSentences

GPS NMEA sentence enable flags response (GS).

Six boolean fields controlling which NMEA sentences are output: GGA, GLL, GSA, GSV, RMC, VTG.

Fields

§gga: bool

GGA (Global Positioning System Fix Data) enabled.

§gll: bool

GLL (Geographic Position - Latitude/Longitude) enabled.

§gsa: bool

GSA (GNSS DOP and Active Satellites) enabled.

§gsv: bool

GSV (GNSS Satellites in View) enabled.

§rmc: bool

RMC (Recommended Minimum Navigation Information) enabled.

§vtg: bool

VTG (Course Over Ground and Ground Speed) enabled.

§

Bluetooth

Bluetooth state response (BT).

Fields

§enabled: bool

Whether Bluetooth is enabled.

§

SdCard

SD card / programming interface status response (SD).

The firmware’s SD handler primarily checks for SD PROGRAM to enter MCP programming mode. The bare SD read response (SD 0/1) appears to indicate programming interface readiness, not SD card presence.

Fields

§present: bool

Programming interface readiness flag.

§

UserSettings

User settings response (US).

Note: US returns ? on all tested formats on the TH-D75 and may not be implemented. This variant exists for completeness but may never be received from the radio.

Fields

§value: u8

User settings value.

§

RadioType

Radio type/region code response (TY).

Returns the radio’s region code and hardware variant. Example: TY K,2 (K = US region, variant 2).

Fields

§region: String

Region code string (e.g., “K” for US).

§variant: u8

Hardware variant number.

§

McpStatus

MCP status response (0E).

Placeholder — always returns N (not available) in normal mode.

Fields

§value: String

Raw status value.

§

ServiceMode

Service mode entry/exit response (0G).

Fields

§data: String

Raw response data.

§

ServiceCalibrationData

Factory calibration data response (0S).

Fields

§data: String

Hex-encoded 200-byte calibration data.

§

ServiceCalibrationWrite

Calibration data write acknowledgment (0R).

Fields

§data: String

Response data (typically echo).

§

ServiceCalibrationParam

Individual calibration parameter response (1A, 1D, 1E, 1N, 1V, 1W, 1C, 1U).

Fields

§mnemonic: String

The command mnemonic that generated this response.

§data: String

Raw response data.

§

ServiceWriteConfig

Write config acknowledgment (0W).

Fields

§data: String

Response data.

§

ServiceBandSelect

Band select response (0Y).

Fields

§data: String

Response data.

§

ServiceWriteId

Factory ID write acknowledgment (1I).

Fields

§data: String

Response data.

§

ServiceFlash

Flash read/write response (1F).

Fields

§data: String

Hex-encoded flash data or write acknowledgment.

§

ServiceEepromData

EEPROM bulk data response (9E).

Fields

§data: String

Hex-encoded EEPROM/calibration data.

§

ServiceEepromAddr

EEPROM targeted read response (9R).

Fields

§data: String

4-byte formatted calibration data.

§

ServiceVersion

Internal version/variant response (2V).

Fields

§data: String

Version/variant information string.

§

ServiceHardware

Hardware register/GPIO status response (1G).

Fields

§data: String

Hex-encoded register values.

§

Ok

Write acknowledgment (radio echoes the command).

§

Error

Error response (?\r).

§

NotAvailable

Not available response (N\r) — command not supported in current mode.

Trait Implementations§

Source§

impl Clone for Response

Source§

fn clone(&self) -> Response

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Response

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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