DstarAccess

Struct DstarAccess 

Source
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 OffsetContent
0x003F0D-STAR channel info (16 bytes)
0x01300MY callsign (8 bytes) + suffix (4 bytes)
0x2A100Repeater list (108-byte records)
variesCallsign list (8-byte entries, up to 120)

Implementations§

Source§

impl<'a> DstarAccess<'a>

Source

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.

Source

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.

Source

pub const fn region_size(&self) -> usize

Get the total size of the D-STAR repeater/callsign region in bytes.

Source

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.

Source

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.

Source

pub fn my_callsign(&self) -> String

Read the D-STAR MY callsign (up to 8 characters, space-padded).

§Offset

Located at 0x1300 (confirmed from D74 development notes as the callsign data region). The first 8 bytes are the MY callsign.

§Verification

Field boundary is estimated, not hardware-verified within the callsign data region.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl<'a> Debug for DstarAccess<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DstarAccess<'a>

§

impl<'a> RefUnwindSafe for DstarAccess<'a>

§

impl<'a> Send for DstarAccess<'a>

§

impl<'a> Sync for DstarAccess<'a>

§

impl<'a> Unpin for DstarAccess<'a>

§

impl<'a> UnwindSafe for DstarAccess<'a>

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, 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