bus v0.1.4 Bus.Encoder
Provides functions for encoding Message structs to bytes(binary)
Summary
Functions
Calculates the remaining length (as specified in MQTT spec) for a given Message struct
Encodes the fixed header (as specified in MQTT spec) for a given Message struct
Encodes remaining length using a variable length encoding scheme specified in MQTT 3.1.1 spec section 2.2.3
Encodes the payload for a given Message struct
Encodes variable header for a given Message struct
Types
dup :: 0 | 1
packet_value ::
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14
qos :: 0 | 1 | 2
retain :: 0 | 1
Functions
Calculates the remaining length (as specified in MQTT spec) for a given Message struct
Encodes the fixed header (as specified in MQTT spec) for a given Message struct
Specs
encode_fixed_header_remaining_length(number) :: binary
Encodes remaining length using a variable length encoding scheme specified in MQTT 3.1.1 spec section 2.2.3