encode() Function

dlestxetx.encode(data: bytes) → bytes

Wrap data into a DLE/STX/ETX packet.

Parameters:data – the data to encode.
Returns:the packet containing the supplied data.