pub struct DstarAccess<'a> { /* private fields */ }Expand description
Read-only access to the D-STAR configuration region.
Provides raw byte access and typed field accessors for D-STAR settings
stored in the system settings area (channel info at 0x03F0) and the
repeater/callsign list starting at page 0x02A1.
§Known sub-regions
| MCP Offset | Content |
|---|---|
0x003F0 | D-STAR channel info (16 bytes) |
0x01300 | MY callsign (8 bytes) + suffix (4 bytes) |
0x2A100 | Repeater list (108-byte records) |
| varies | Callsign list (8-byte entries, up to 120) |
Implementations§
Source§impl<'a> DstarAccess<'a>
impl<'a> DstarAccess<'a>
Sourcepub fn channel_info(&self) -> Option<&[u8]>
pub fn channel_info(&self) -> Option<&[u8]>
Get the D-STAR channel info bytes (16 bytes at offset 0x03F0).
Contains the active D-STAR slot configuration.
Sourcepub fn repeater_callsign_region(&self) -> Option<&[u8]>
pub fn repeater_callsign_region(&self) -> Option<&[u8]>
Get the raw repeater/callsign list region.
This region spans from page 0x02A1 to page 0x04D0 (before
the Bluetooth data). It contains both the repeater list and the
callsign list.
Sourcepub const fn region_size(&self) -> usize
pub const fn region_size(&self) -> usize
Get the total size of the D-STAR repeater/callsign region in bytes.
Sourcepub fn repeater_record(&self, index: usize) -> Option<&[u8]>
pub fn repeater_record(&self, index: usize) -> Option<&[u8]>
Read a repeater record by index (raw 108 bytes).
Each record is 108 bytes. Returns None if the index is out of
bounds or the record extends past the region.
Sourcepub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
pub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
Read an arbitrary byte range from the D-STAR region.
The offset is an absolute MCP byte address. Returns None if
the range extends past the image.
Sourcepub fn my_callsign(&self) -> String
pub fn my_callsign(&self) -> String
Sourcepub fn my_callsign_typed(&self) -> Option<DstarCallsign>
pub fn my_callsign_typed(&self) -> Option<DstarCallsign>
Read the D-STAR MY callsign as a typed DstarCallsign.
Returns None if the callsign is empty or invalid.
§Offset
Located at 0x1300.
§Verification
Offset is estimated, not hardware-verified.
Sourcepub fn repeater_entry(&self, index: u16) -> Option<RepeaterEntry>
pub fn repeater_entry(&self, index: u16) -> Option<RepeaterEntry>
Read a repeater entry by index, parsed into a RepeaterEntry.
Returns None if the index is out of range, the record is
all-0xFF (empty), or the record cannot be parsed.
§Offset
Repeater records start at 0x2A100 (page 0x02A1), each 108
bytes. Record N is at offset 0x2A100 + N * 108.
§Verification
Region boundary confirmed. Internal field layout from firmware RE offset is estimated, not hardware-verified.
Sourcepub fn repeater_count(&self) -> u16
pub fn repeater_count(&self) -> u16
Count the number of non-empty repeater entries.
Iterates through the repeater list region and counts entries that
are not all-0xFF or all-0x00.