ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::pioneer_wt Namespace Reference

Data Structures

class  AttributeReader
 Walks the attribute list in a status body. Stops at the first ID whose size is unknown. More...
 
class  PioneerWT
 

Typedefs

using FrameLength = FrameLengthU8<LengthField{.offset = LEN_POS}>
 
using Frame = FrameFormat<FrameHeader<FRAME_START_1, FRAME_START_2>, FrameLength, FrameMinLength<HEADER_SIZE>>
 
using PacketReader = LengthFrameReader<MAX_FRAME_SIZE, Frame>
 

Enumerations

enum class  AttrKind : uint8_t {
  ATTR_KIND_UNKNOWN , ATTR_KIND_ONE_BYTE , ATTR_KIND_FOUR_BYTES , ATTR_KIND_COUNT_PREFIXED ,
  ATTR_KIND_LENGTH_PREFIXED
}
 

Functions

 ESPHOME_LOG_TAG (TAG, "pioneer_wt")
 
uint16_t frame_crc (const uint8_t *frame, size_t len)
 CRC-16/XMODEM over a whole frame, skipping the two checksum bytes at offset 8.
 
size_t build_frame (uint8_t *out, uint8_t flags, uint8_t type, uint8_t seq, uint8_t ack, uint8_t class_1, uint8_t class_2, const uint8_t *body, size_t len)
 Builds a frame into out, which must hold HEADER_SIZE + 2 + len bytes. Returns the frame length.
 
bool checksum_valid (const uint8_t *frame, size_t len)
 
uint8_t * put_attr (uint8_t *p, uint16_t id, uint8_t value)
 Writes a one-byte attribute (2-byte ID, then the value) at p. Returns the new end.
 

Typedef Documentation

◆ Frame

using esphome::pioneer_wt::Frame = FrameFormat<FrameHeader<FRAME_START_1, FRAME_START_2>, FrameLength, FrameMinLength<HEADER_SIZE>>

Definition at line 54 of file pioneer_wt_protocol.h.

◆ FrameLength

Definition at line 53 of file pioneer_wt_protocol.h.

◆ PacketReader

Definition at line 55 of file pioneer_wt_protocol.h.

Enumeration Type Documentation

◆ AttrKind

enum class esphome::pioneer_wt::AttrKind : uint8_t
strong
Enumerator
ATTR_KIND_UNKNOWN 
ATTR_KIND_ONE_BYTE 
ATTR_KIND_FOUR_BYTES 
ATTR_KIND_COUNT_PREFIXED 
ATTR_KIND_LENGTH_PREFIXED 

Definition at line 14 of file pioneer_wt_protocol.cpp.

Function Documentation

◆ build_frame()

size_t esphome::pioneer_wt::build_frame ( uint8_t * out,
uint8_t flags,
uint8_t type,
uint8_t seq,
uint8_t ack,
uint8_t class_1,
uint8_t class_2,
const uint8_t * body,
size_t len )

Builds a frame into out, which must hold HEADER_SIZE + 2 + len bytes. Returns the frame length.

Definition at line 103 of file pioneer_wt_protocol.cpp.

◆ checksum_valid()

bool esphome::pioneer_wt::checksum_valid ( const uint8_t * frame,
size_t len )
inline

Definition at line 57 of file pioneer_wt_protocol.h.

◆ ESPHOME_LOG_TAG()

esphome::pioneer_wt::ESPHOME_LOG_TAG ( TAG ,
"pioneer_wt"  )

◆ frame_crc()

uint16_t esphome::pioneer_wt::frame_crc ( const uint8_t * frame,
size_t len )

CRC-16/XMODEM over a whole frame, skipping the two checksum bytes at offset 8.

Definition at line 9 of file pioneer_wt_protocol.cpp.

◆ put_attr()

uint8_t * esphome::pioneer_wt::put_attr ( uint8_t * p,
uint16_t id,
uint8_t value )
inline

Writes a one-byte attribute (2-byte ID, then the value) at p. Returns the new end.

Definition at line 86 of file pioneer_wt_protocol.h.