encode_connect_link

Function encode_connect_link 

Source
pub fn encode_connect_link(
    out: &mut [u8],
    callsign: &Callsign,
    reflector_module: Module,
    client_module: Module,
) -> Result<usize, EncodeError>
Expand description

Encode an 11-byte LINK connect request.

Layout per ircDDBGateway/Common/ConnectData.cpp:278-296 (getDExtraData CT_LINK1):

  • [0..7]: first 7 chars of the callsign (from data[0..7])
  • [7]: space padding (from memset(data, ' ', 8))
  • [8]: 8th char of the callsign slot — the client module letter per the ircDDBGateway convention
  • [9]: reflector module letter
  • [10]: 0x00

§Errors

Returns EncodeError::BufferTooSmall if out.len() < 11.

§See also

ircDDBGateway/Common/ConnectData.cpp:278-296 (getDExtraData CT_LINK1 branch) for the reference encoder this function mirrors.