pub struct DStarHeader {
pub flag1: u8,
pub flag2: u8,
pub flag3: u8,
pub rpt2: Callsign,
pub rpt1: Callsign,
pub ur_call: Callsign,
pub my_call: Callsign,
pub my_suffix: Suffix,
}Expand description
D-STAR radio header.
Fields§
§flag1: u8Control flag byte 1.
flag2: u8Reserved flag byte 2.
flag3: u8Reserved flag byte 3.
rpt2: CallsignRepeater 2 callsign (gateway).
rpt1: CallsignRepeater 1 callsign (access).
ur_call: CallsignDestination callsign (YOUR).
my_call: CallsignOrigin callsign (MY).
my_suffix: SuffixOrigin suffix.
Implementations§
Source§impl DStarHeader
impl DStarHeader
Sourcepub fn encode_for_dsvt(&self) -> [u8; 41]
pub fn encode_for_dsvt(&self) -> [u8; 41]
Encode the header for embedding in a DSVT voice header packet.
Identical to Self::encode except the three flag bytes are
forced to zero BEFORE CRC computation. Matches
ircDDBGateway/Common/HeaderData.cpp:665-667 (getDPlusData).
DCS voice packets carry real flag bytes — use Self::encode
for those.
Sourcepub fn decode(data: &[u8; 41]) -> Self
pub fn decode(data: &[u8; 41]) -> Self
Decode a 41-byte header.
Infallible. Mirrors ircDDBGateway’s setDPlusData /
setDExtraData / setDCSData reference implementations,
which do raw memcpy of the callsign fields with zero
validation and skip the CRC check. Real reflectors emit
headers with bad CRCs and non-printable callsign bytes; a
strict decoder would silently drop real-world traffic.
Trait Implementations§
Source§impl Clone for DStarHeader
impl Clone for DStarHeader
Source§fn clone(&self) -> DStarHeader
fn clone(&self) -> DStarHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more