ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::daikin_madoka::MessageAssembler Class Reference

Reassembles notifications (one chunk id byte followed by payload) into a message. More...

#include <daikin_madoka_protocol.h>

Public Member Functions

ChunkResult feed (std::span< const uint8_t > chunk)
 
std::span< const uint8_t > message () const
 
void reset ()
 

Protected Attributes

std::array< uint8_t, MAX_CHUNKS *MAX_CHUNK_PAYLOAD > data_
 
std::array< uint8_t, MAX_CHUNKS > chunk_sizes_ {}
 
uint8_t message_size_ {0}
 

Detailed Description

Reassembles notifications (one chunk id byte followed by payload) into a message.

Chunks may arrive in any order: each is kept in the slot of its id, and the message is complete once chunk 0 is in and the chunks from 0 on add up to its length byte. After CHUNK_RESULT_COMPLETE, message() holds the message until reset() or the next feed().

Definition at line 44 of file daikin_madoka_protocol.h.

Member Function Documentation

◆ feed()

ChunkResult esphome::daikin_madoka::MessageAssembler::feed ( std::span< const uint8_t > chunk)
inline

Definition at line 46 of file daikin_madoka_protocol.h.

◆ message()

std::span< const uint8_t > esphome::daikin_madoka::MessageAssembler::message ( ) const
inline

Definition at line 85 of file daikin_madoka_protocol.h.

◆ reset()

void esphome::daikin_madoka::MessageAssembler::reset ( )
inline

Definition at line 87 of file daikin_madoka_protocol.h.

Field Documentation

◆ chunk_sizes_

std::array<uint8_t, MAX_CHUNKS> esphome::daikin_madoka::MessageAssembler::chunk_sizes_ {}
protected

Definition at line 95 of file daikin_madoka_protocol.h.

◆ data_

std::array<uint8_t, MAX_CHUNKS * MAX_CHUNK_PAYLOAD> esphome::daikin_madoka::MessageAssembler::data_
protected

Definition at line 93 of file daikin_madoka_protocol.h.

◆ message_size_

uint8_t esphome::daikin_madoka::MessageAssembler::message_size_ {0}
protected

Definition at line 96 of file daikin_madoka_protocol.h.


The documentation for this class was generated from the following file: