Abstract base class.
More...
#include <MQTT.h>
|
bool | send (Client &client) |
| Send the message out.
|
|
message_type | type (void) const |
| Get the message type.
|
|
bool | has_stream (void) const |
| Does this message have a network stream for reading the (large) payload?
|
|
|
message_type | _type |
|
uint8_t | _flags |
|
uint16_t | _packet_id |
|
bool | _need_packet_id |
| Not all message types use a packet id, but most do.
|
|
Client * | _stream_client |
|
payload_callback_t | _payload_callback |
|
friend | PubSubClient |
|
uint8_t MQTT::Message::fixed_header_length |
( |
uint32_t |
rlength | ) |
const |
|
protected |
Length of the fixed header.
- Parameters
-
rlength | Remaining lengh i.e variable header + payload |
void MQTT::Message::write_fixed_header |
( |
uint8_t * |
buf, |
|
|
uint32_t & |
bufpos, |
|
|
uint32_t |
rlength |
|
) |
| const |
|
protected |
Write the fixed header to a buffer.
- Parameters
-
buf | Pointer to start of buffer (never advances) |
bufpos | Current position in buffer |
rlength | Remaining lengh i.e variable header + payload |
void MQTT::Message::write_packet_id |
( |
uint8_t * |
buf, |
|
|
uint32_t & |
bufpos |
|
) |
| const |
|
protected |
Write the packet id to a buffer.
- Parameters
-
buf | Pointer to start of buffer (never advances) |
bufpos | Current position in buffer |
virtual void MQTT::Message::write_payload |
( |
uint8_t * |
buf, |
|
|
uint32_t & |
bufpos |
|
) |
| const |
|
inlineprotectedvirtual |
Write payload.
- Parameters
-
buf | Pointer to start of buffer (never advances) |
bufpos | Current position in buffer |
virtual void MQTT::Message::write_variable_header |
( |
uint8_t * |
buf, |
|
|
uint32_t & |
bufpos |
|
) |
| const |
|
inlineprotectedvirtual |
Write variable header.
- Parameters
-
buf | Pointer to start of buffer (never advances) |
bufpos | Current position in buffer |
The documentation for this class was generated from the following files: