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