|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Go to the documentation of this file.
14 #include "spsp/random.hpp"
16 namespace SPSP::LocalLayers::ESPNOW
79 static uint8_t
checksumRaw(uint8_t* data,
size_t dataLen,
80 uint8_t existingChecksum = 0) noexcept;
93 void encryptRaw(uint8_t* data,
size_t dataLen,
const uint8_t* nonce)
const noexcept;
ESP-NOW packet structures.
bool decryptAndValidatePacketPayload(uint8_t *data, size_t dataLen) const noexcept
Decrypts and validates packet's payload.
static size_t getPacketLength(const LocalMessageT &msg) noexcept
Calculates total packet length.
void encryptRaw(uint8_t *data, size_t dataLen, const uint8_t *nonce) const noexcept
Encryption provider for raw data (bytes)
Serializer and deserializer of ESP-NOW packets.
void serialize(const LocalMessageT &msg, std::string &data) const noexcept
Serializes local message to raw data.
bool deserialize(const LocalAddrT &src, std::string &data, LocalMessageT &msg) const noexcept
Deserializes raw data to local message.
Types for ESPNOW classes.
bool validatePacketHeader(const Packet *p) const noexcept
Validates packet's header.
Local layer address container for MAC address.
static uint8_t checksumRaw(uint8_t *data, size_t dataLen, uint8_t existingChecksum=0) noexcept
Checksums the given raw data (bytes)
Local message representation.
SerDes(const Config &conf) noexcept
Construct a new serializer/deserializer.