pub struct Frequency(/* private fields */);Expand description
Radio frequency in Hz.
Stored as a u32, matching the firmware’s internal representation.
Range: 0 to 4,294,967,295 Hz (0 to ~4.295 GHz).
§TH-D75 band frequency ranges
Per service manual §2.1.2 (Table 1) and User Manual Chapter 28, the radio enforces hardware-specific frequency limits per band. The service manual frequency configuration points (A-E) map to the signal path in the receiver block diagrams (§2.1.3):
§TH-D75A (K type)
| Point | Frequency range | Function |
|---|---|---|
| A (TX/RX) | 144.000-147.995, 222.000-224.995, 430.000-449.995 MHz | VCO/PLL output → 1st mixer |
| B (RX) | 136.000-173.995, 216.000-259.995, 410.000-469.995 MHz | RF AMP → distribution circuit |
| C (RX) | 0.100-75.995, 108.000-523.995 MHz | Band B wideband RX input |
| D (1st IF) | 193.150-231.145, 158.850-202.845, 352.850-412.845 MHz | After 1st mixer (Band A) |
| E (1st IF) | 58.150-134.045, 166.050-465.945 MHz | After 1st mixer (Band B) |
§TH-D75E (E, T types)
| Point | Frequency range | Function |
|---|---|---|
| A (TX/RX) | 144.000-145.995, 430.000-439.995 MHz | VCO/PLL output → 1st mixer |
| B (RX) | 136.000-173.995, 410.000-469.995 MHz | RF AMP → distribution circuit |
| C (RX) | 0.100-75.995, 108.000-523.995 MHz | Band B wideband RX input |
Band A uses double super heterodyne (1st IF 57.15 MHz, 2nd IF 450 kHz). Band B uses triple super heterodyne (1st IF 58.05 MHz, 2nd IF 450 kHz, 3rd IF 10.8 kHz for AM/SSB/CW).
Frequencies outside these ranges will be rejected by the radio
when sent via CAT commands such as FQ or FO. The firmware
validates the frequency against the target band’s allowed range and
returns a ? error response if the value is out of bounds. This
library does not pre-validate frequencies to avoid duplicating
firmware logic that may vary by region or firmware version.
Implementations§
Source§impl Frequency
impl Frequency
Sourcepub const fn new(hz: u32) -> Self
pub const fn new(hz: u32) -> Self
Creates a new Frequency from a value in Hz.
No validation is performed; the full u32 range is accepted
to match firmware behaviour.
Sourcepub fn to_wire_string(self) -> String
pub fn to_wire_string(self) -> String
Formats the frequency as a 10-digit zero-padded decimal string for CAT protocol wire transmission.
Example: 145 MHz becomes "0145000000".
Sourcepub fn from_wire_string(s: &str) -> Result<Self, ProtocolError>
pub fn from_wire_string(s: &str) -> Result<Self, ProtocolError>
Parses a 10-digit decimal string from the CAT protocol into a
Frequency.
§Errors
Returns ProtocolError::FieldParse if the string is not
exactly 10 characters or contains non-numeric characters.
Sourcepub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_le_bytes(self) -> [u8; 4]
Returns the frequency as a 4-byte little-endian array.
Sourcepub const fn from_le_bytes(bytes: [u8; 4]) -> Self
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self
Creates a Frequency from a 4-byte little-endian array.