SNode.C
|
#include <FixedHeader.h>
Public Member Functions | |
FixedHeader () | |
FixedHeader (uint8_t type, uint8_t flags, uint32_t remainingLength=0) | |
~FixedHeader () | |
std::size_t | deserialize (iot::mqtt::MqttContext *mqttContext) |
std::vector< char > | serialize () const |
uint8_t | getType () const |
uint8_t | getFlags () const |
void | setRemainingLength (uint32_t remainingLength) |
uint32_t | getRemainingLength () const |
bool | isComplete () const |
bool | isError () const |
void | reset () |
Private Attributes | |
types::UInt8 | typeFlags |
types::UIntV | remainingLength |
bool | complete = false |
bool | error = false |
int | state = 0 |
Definition at line 62 of file FixedHeader.h.
iot::mqtt::FixedHeader::FixedHeader | ( | ) |
Definition at line 50 of file FixedHeader.cpp.
iot::mqtt::FixedHeader::FixedHeader | ( | uint8_t | type, |
uint8_t | flags, | ||
uint32_t | remainingLength = 0 |
||
) |
Definition at line 53 of file FixedHeader.cpp.
References iot::mqtt::types::UIntV::operator=(), iot::mqtt::types::UInt8::operator=(), remainingLength, and typeFlags.
Referenced by iot::mqtt::ControlPacket::serialize().
iot::mqtt::FixedHeader::~FixedHeader | ( | ) |
Definition at line 58 of file FixedHeader.cpp.
std::size_t iot::mqtt::FixedHeader::deserialize | ( | iot::mqtt::MqttContext * | mqttContext | ) |
Definition at line 61 of file FixedHeader.cpp.
References complete, iot::mqtt::types::TypeBase< ValueTypeT >::deserialize(), iot::mqtt::types::UIntV::deserialize(), error, iot::mqtt::types::TypeBase< ValueTypeT >::isComplete(), iot::mqtt::types::UIntV::isError(), remainingLength, state, and typeFlags.
Referenced by iot::mqtt::Mqtt::onReceivedFromPeer().
uint8_t iot::mqtt::FixedHeader::getFlags | ( | ) | const |
Definition at line 89 of file FixedHeader.cpp.
References typeFlags.
Referenced by iot::mqtt::client::Mqtt::createControlPacketDeserializer(), iot::mqtt::server::Mqtt::createControlPacketDeserializer(), and iot::mqtt::Mqtt::printFixedHeader().
uint32_t iot::mqtt::FixedHeader::getRemainingLength | ( | ) | const |
Definition at line 97 of file FixedHeader.cpp.
References remainingLength.
Referenced by iot::mqtt::client::Mqtt::createControlPacketDeserializer(), iot::mqtt::server::Mqtt::createControlPacketDeserializer(), and iot::mqtt::Mqtt::printFixedHeader().
uint8_t iot::mqtt::FixedHeader::getType | ( | ) | const |
Definition at line 85 of file FixedHeader.cpp.
References typeFlags.
Referenced by iot::mqtt::client::Mqtt::createControlPacketDeserializer(), iot::mqtt::server::Mqtt::createControlPacketDeserializer(), and iot::mqtt::Mqtt::printFixedHeader().
bool iot::mqtt::FixedHeader::isComplete | ( | ) | const |
Definition at line 101 of file FixedHeader.cpp.
References complete.
bool iot::mqtt::FixedHeader::isError | ( | ) | const |
void iot::mqtt::FixedHeader::reset | ( | ) |
Definition at line 118 of file FixedHeader.cpp.
References complete, error, remainingLength, iot::mqtt::types::TypeBase< ValueTypeT >::reset(), iot::mqtt::types::UIntV::reset(), state, and typeFlags.
std::vector< char > iot::mqtt::FixedHeader::serialize | ( | ) | const |
Definition at line 109 of file FixedHeader.cpp.
References remainingLength, iot::mqtt::types::TypeBase< ValueTypeT >::serialize(), and typeFlags.
Referenced by iot::mqtt::Mqtt::printFixedHeader(), and iot::mqtt::ControlPacket::serialize().
void iot::mqtt::FixedHeader::setRemainingLength | ( | uint32_t | remainingLength | ) |
Definition at line 93 of file FixedHeader.cpp.
References iot::mqtt::types::UIntV::operator=(), and remainingLength.
|
private |
Definition at line 87 of file FixedHeader.h.
Referenced by deserialize(), isComplete(), and reset().
|
private |
Definition at line 88 of file FixedHeader.h.
Referenced by deserialize(), isError(), and reset().
|
private |
Definition at line 85 of file FixedHeader.h.
Referenced by deserialize(), FixedHeader(), getRemainingLength(), reset(), serialize(), and setRemainingLength().
|
private |
Definition at line 90 of file FixedHeader.h.
Referenced by deserialize(), and reset().
|
private |
Definition at line 84 of file FixedHeader.h.
Referenced by deserialize(), FixedHeader(), getFlags(), getType(), reset(), and serialize().