pub fn encode_voice_header(
out: &mut [u8],
stream_id: StreamId,
header: &DStarHeader,
) -> Result<usize, EncodeError>Expand description
Encode a 58-byte voice header.
Layout per ircDDBGateway/Common/HeaderData.cpp:637-684
(getDPlusData):
[0]0x3A (length byte)[1]0x80 (type byte)[2..6]“DSVT”[6]0x10 (header type)[7..10]0x00 0x00 0x00 (reserved)[10]0x20 (config)[11..14]0x00 0x01 0x02 (band1/2/3)[14..16]stream_idlittle-endian[16]0x80 (header indicator)[17..58]DStarHeader::encode_for_dsvt()(flag bytes zeroed, 41 bytes)
§Errors
Returns EncodeError::BufferTooSmall if out.len() < 58.
§See also
ircDDBGateway/Common/HeaderData.cpp:637-684 (getDPlusData)
for the reference encoder this function mirrors. The
DStarHeader::encode_for_dsvt helper mirrors the same file’s
CRC logic.