pub fn encode_voice_header(
out: &mut [u8],
stream_id: StreamId,
header: &DStarHeader,
) -> Result<usize, EncodeError>Expand description
Encode a 56-byte voice header.
Layout per ircDDBGateway/Common/HeaderData.cpp:590-635
(getDExtraData):
[0..4]:b"DSVT"(NOT preceded by a length prefix — unlikeDPlus)[4]:0x10(header indicator)[5..8]:0x00(reserved)[8]:0x20(config)[9..12]:0x00 0x01 0x02(band1/band2/band3)[12..14]:stream_idlittle-endian[14]:0x80(header indicator)[15..56]:DStarHeader::encode_for_dsvt(41 bytes: 3 zero flag bytes + RPT2 + RPT1 + YOUR + MY +MY_SUFFIX+ CRC)
§Errors
Returns EncodeError::BufferTooSmall if out.len() < 56.
§See also
ircDDBGateway/Common/HeaderData.cpp:590-635 (getDExtraData)
for the reference encoder. The 41-byte trailer is shared with
encode_voice_data below.