ESPHome
2024.11.2
|
Data Structures | |
class | DataTrigger |
class | ObisInfo |
class | Sml |
class | SmlFile |
class | SmlListener |
class | SmlNode |
class | SmlSensor |
class | SmlTextSensor |
Typedefs | |
using | bytes = std::vector< uint8_t > |
Enumerations | |
enum | SmlType : uint8_t { SML_OCTET = 0, SML_BOOL = 4, SML_INT = 5, SML_UINT = 6, SML_LIST = 7, SML_HEX = 10, SML_UNDEFINED = 255 } |
enum | SmlMessageType : uint16_t { SML_PUBLIC_OPEN_RES = 0x0101, SML_GET_LIST_RES = 0x701 } |
Functions | |
bool | check_sml_data (const bytes &buffer) |
uint8_t | get_code (uint8_t byte) |
std::string | bytes_repr (const bytes &buffer) |
uint64_t | bytes_to_uint (const bytes &buffer) |
int64_t | bytes_to_int (const bytes &buffer) |
std::string | bytes_to_string (const bytes &buffer) |
Variables | |
const uint16_t | START_MASK = 0x55aa |
const uint16_t | END_MASK = 0x0157 |
const std::vector< uint8_t > | START_SEQ = {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01} |
const char | START_BYTES_DETECTED = 1 |
const char | END_BYTES_DETECTED = 2 |
using esphome::sml::bytes = typedef std::vector<uint8_t> |
Definition at line 12 of file sml_parser.h.
enum esphome::sml::SmlMessageType : uint16_t |
Enumerator | |
---|---|
SML_PUBLIC_OPEN_RES | |
SML_GET_LIST_RES |
Definition at line 18 of file constants.h.
enum esphome::sml::SmlType : uint8_t |
Enumerator | |
---|---|
SML_OCTET | |
SML_BOOL | |
SML_INT | |
SML_UINT | |
SML_LIST | |
SML_HEX | |
SML_UNDEFINED |
Definition at line 8 of file constants.h.
std::string esphome::sml::bytes_repr | ( | const bytes & | buffer | ) |
Definition at line 106 of file sml_parser.cpp.
int64_t esphome::sml::bytes_to_int | ( | const bytes & | buffer | ) |
Definition at line 122 of file sml_parser.cpp.
std::string esphome::sml::bytes_to_string | ( | const bytes & | buffer | ) |
Definition at line 138 of file sml_parser.cpp.
uint64_t esphome::sml::bytes_to_uint | ( | const bytes & | buffer | ) |
Definition at line 114 of file sml_parser.cpp.
const uint16_t esphome::sml::END_MASK = 0x0157 |
Definition at line 22 of file constants.h.
const uint16_t esphome::sml::START_MASK = 0x55aa |
Definition at line 21 of file constants.h.
const std::vector<uint8_t> esphome::sml::START_SEQ = {0x1b, 0x1b, 0x1b, 0x1b, 0x01, 0x01, 0x01, 0x01} |
Definition at line 24 of file constants.h.