ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::CheckFirstBytes< BYTES, CHECK > Struct Template Reference

FrameFormat option: CHECK(frame) runs once the first BYTES bytes are in; a frame it fails is not a frame. More...

#include <frame_reader.h>

Inheritance diagram for esphome::CheckFirstBytes< BYTES, CHECK >:
esphome::FrameOption

Static Public Member Functions

static bool check (const uint8_t *buf)
 
- Static Public Member Functions inherited from esphome::FrameOption
static constexpr bool check (const uint8_t *)
 
static constexpr bool fits (size_t)
 

Static Public Attributes

static constexpr size_t CHECK_AT = BYTES
 
- Static Public Attributes inherited from esphome::FrameOption
static constexpr size_t MIN = 0
 
static constexpr size_t CHECK_AT = 0
 
static constexpr size_t WARN_MAX = 0
 

Detailed Description

template<size_t BYTES, bool(*)(const uint8_t *) CHECK>
struct esphome::CheckFirstBytes< BYTES, CHECK >

FrameFormat option: CHECK(frame) runs once the first BYTES bytes are in; a frame it fails is not a frame.

Definition at line 147 of file frame_reader.h.

Member Function Documentation

◆ check()

template<size_t BYTES, bool(*)(const uint8_t *) CHECK>
static bool esphome::CheckFirstBytes< BYTES, CHECK >::check ( const uint8_t * buf)
inlinestatic

Definition at line 149 of file frame_reader.h.

Field Documentation

◆ CHECK_AT

template<size_t BYTES, bool(*)(const uint8_t *) CHECK>
size_t esphome::CheckFirstBytes< BYTES, CHECK >::CHECK_AT = BYTES
staticconstexpr

Definition at line 148 of file frame_reader.h.


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