Skip to main content

encode_npdu

Function encode_npdu 

Source
pub fn encode_npdu(buf: &mut BytesMut, npdu: &Npdu) -> Result<(), Error>
Expand description

Encode an NPDU to wire format, appending it to buf.

Nothing is appended when the NPDU is one the decoder would refuse: a DNET of 0, an SNET of 0 or 0xFFFF, an empty SADR, or a DADR or SADR past MAX_MAC_LEN.