ESPHome
2026.2.3
Loading...
Searching...
No Matches
esphome
components
sml
constants.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
#include <cstdint>
5
6
namespace
esphome
{
7
namespace
sml {
8
9
enum
SmlType
: uint8_t {
10
SML_OCTET
= 0,
11
SML_BOOL
= 4,
12
SML_INT
= 5,
13
SML_UINT
= 6,
14
SML_LIST
= 7,
15
SML_HEX
= 10,
16
SML_UNDEFINED
= 255
17
};
18
19
enum
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
22
const
uint16_t
START_MASK
= 0x55aa;
// 0x1b 1b 1b 1b 01 01 01 01
23
const
uint16_t
END_MASK
= 0x0157;
// 0x1b 1b 1b 1b 1a
24
25
constexpr
std::array<uint8_t, 8>
START_SEQ
= {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01};
26
27
}
// namespace sml
28
}
// namespace esphome
esphome::sml::START_MASK
const uint16_t START_MASK
Definition
constants.h:22
esphome::sml::START_SEQ
constexpr std::array< uint8_t, 8 > START_SEQ
Definition
constants.h:25
esphome::sml::SmlMessageType
SmlMessageType
Definition
constants.h:19
esphome::sml::SML_PUBLIC_OPEN_RES
@ SML_PUBLIC_OPEN_RES
Definition
constants.h:19
esphome::sml::SML_GET_LIST_RES
@ SML_GET_LIST_RES
Definition
constants.h:19
esphome::sml::SmlType
SmlType
Definition
constants.h:9
esphome::sml::SML_LIST
@ SML_LIST
Definition
constants.h:14
esphome::sml::SML_UNDEFINED
@ SML_UNDEFINED
Definition
constants.h:16
esphome::sml::SML_OCTET
@ SML_OCTET
Definition
constants.h:10
esphome::sml::SML_BOOL
@ SML_BOOL
Definition
constants.h:11
esphome::sml::SML_HEX
@ SML_HEX
Definition
constants.h:15
esphome::sml::SML_UINT
@ SML_UINT
Definition
constants.h:13
esphome::sml::SML_INT
@ SML_INT
Definition
constants.h:12
esphome::sml::END_MASK
const uint16_t END_MASK
Definition
constants.h:23
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
Generated by
1.12.0