ESPHome 2025.5.0
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace esphome {
6namespace sml {
7
8enum SmlType : uint8_t {
14 SML_HEX = 10,
15 SML_UNDEFINED = 255
16};
17
18enum SmlMessageType : uint16_t { SML_PUBLIC_OPEN_RES = 0x0101, SML_GET_LIST_RES = 0x701 };
19
20// masks with two-bit mapping 0x1b -> 0b01; 0x01 -> 0b10; 0x1a -> 0b11
21const uint16_t START_MASK = 0x55aa; // 0x1b 1b 1b 1b 01 01 01 01
22const uint16_t END_MASK = 0x0157; // 0x1b 1b 1b 1b 1a
23
24const std::vector<uint8_t> START_SEQ = {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01};
25
26} // namespace sml
27} // namespace esphome
const std::vector< uint8_t > START_SEQ
Definition constants.h:24
const uint16_t START_MASK
Definition constants.h:21
@ SML_PUBLIC_OPEN_RES
Definition constants.h:18
const uint16_t END_MASK
Definition constants.h:22
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7