ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::haier_water_heater::water_heater_protocol::FrameParser Class Reference

#include <hon_parser.h>

Public Member Functions

void reset ()
 
bool complete () const
 
const uint8_t * data () const
 The stored head of the frame, at most MAX_STORED_FRAME bytes; valid until the next feed or reset.
 
size_t size () const
 Logical bytes received, including the checksum and CRC; may exceed MAX_STORED_FRAME.
 
size_t stored_size () const
 
bool feed (uint8_t value)
 Returns true once a valid frame is complete. A complete but invalid frame leaves complete() set.
 

Protected Attributes

std::array< uint8_t, MAX_STORED_FRAME > buffer_ {}
 
uint16_t crc_ {0}
 
uint16_t received_crc_ {0}
 
uint8_t size_ {0}
 
uint8_t separators_ {0}
 
uint8_t checksum_ {0}
 
uint8_t received_checksum_ {0}
 
bool escape_ {false}
 
bool complete_ {false}
 

Detailed Description

Definition at line 43 of file hon_parser.h.

Member Function Documentation

◆ complete()

bool esphome::haier_water_heater::water_heater_protocol::FrameParser::complete ( ) const
inline

Definition at line 53 of file hon_parser.h.

◆ data()

const uint8_t * esphome::haier_water_heater::water_heater_protocol::FrameParser::data ( ) const
inline

The stored head of the frame, at most MAX_STORED_FRAME bytes; valid until the next feed or reset.

Definition at line 55 of file hon_parser.h.

◆ feed()

bool esphome::haier_water_heater::water_heater_protocol::FrameParser::feed ( uint8_t value)
inline

Returns true once a valid frame is complete. A complete but invalid frame leaves complete() set.

Definition at line 61 of file hon_parser.h.

◆ reset()

void esphome::haier_water_heater::water_heater_protocol::FrameParser::reset ( )
inline

Definition at line 45 of file hon_parser.h.

◆ size()

size_t esphome::haier_water_heater::water_heater_protocol::FrameParser::size ( ) const
inline

Logical bytes received, including the checksum and CRC; may exceed MAX_STORED_FRAME.

Definition at line 57 of file hon_parser.h.

◆ stored_size()

size_t esphome::haier_water_heater::water_heater_protocol::FrameParser::stored_size ( ) const
inline

Definition at line 58 of file hon_parser.h.

Field Documentation

◆ buffer_

std::array<uint8_t, MAX_STORED_FRAME> esphome::haier_water_heater::water_heater_protocol::FrameParser::buffer_ {}
protected

Definition at line 124 of file hon_parser.h.

◆ checksum_

uint8_t esphome::haier_water_heater::water_heater_protocol::FrameParser::checksum_ {0}
protected

Definition at line 129 of file hon_parser.h.

◆ complete_

bool esphome::haier_water_heater::water_heater_protocol::FrameParser::complete_ {false}
protected

Definition at line 132 of file hon_parser.h.

◆ crc_

uint16_t esphome::haier_water_heater::water_heater_protocol::FrameParser::crc_ {0}
protected

Definition at line 125 of file hon_parser.h.

◆ escape_

bool esphome::haier_water_heater::water_heater_protocol::FrameParser::escape_ {false}
protected

Definition at line 131 of file hon_parser.h.

◆ received_checksum_

uint8_t esphome::haier_water_heater::water_heater_protocol::FrameParser::received_checksum_ {0}
protected

Definition at line 130 of file hon_parser.h.

◆ received_crc_

uint16_t esphome::haier_water_heater::water_heater_protocol::FrameParser::received_crc_ {0}
protected

Definition at line 126 of file hon_parser.h.

◆ separators_

uint8_t esphome::haier_water_heater::water_heater_protocol::FrameParser::separators_ {0}
protected

Definition at line 128 of file hon_parser.h.

◆ size_

uint8_t esphome::haier_water_heater::water_heater_protocol::FrameParser::size_ {0}
protected

Definition at line 127 of file hon_parser.h.


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