ESPHome  2024.12.2
Data Structures | Enumerations | Functions | Variables
esphome::ld2410 Namespace Reference

Data Structures

class  BaudRateSelect
 
class  BluetoothPasswordSetAction
 
class  BluetoothSwitch
 
class  DistanceResolutionSelect
 
class  EngineeringModeSwitch
 
class  GateThresholdNumber
 
class  LD2410Component
 
class  LightOutControlSelect
 
class  LightThresholdNumber
 
class  MaxDistanceTimeoutNumber
 
class  QueryButton
 
class  ResetButton
 
class  RestartButton
 

Enumerations

enum  BaudRateStructure : uint8_t {
  BAUD_RATE_9600 = 1, BAUD_RATE_19200 = 2, BAUD_RATE_38400 = 3, BAUD_RATE_57600 = 4,
  BAUD_RATE_115200 = 5, BAUD_RATE_230400 = 6, BAUD_RATE_256000 = 7, BAUD_RATE_460800 = 8
}
 
enum  DistanceResolutionStructure : uint8_t { DISTANCE_RESOLUTION_0_2 = 0x01, DISTANCE_RESOLUTION_0_75 = 0x00 }
 
enum  LightFunctionStructure : uint8_t { LIGHT_FUNCTION_OFF = 0x00, LIGHT_FUNCTION_BELOW = 0x01, LIGHT_FUNCTION_ABOVE = 0x02 }
 
enum  OutPinLevelStructure : uint8_t { OUT_PIN_LEVEL_LOW = 0x00, OUT_PIN_LEVEL_HIGH = 0x01 }
 
enum  PeriodicDataStructure : uint8_t {
  DATA_TYPES = 6, TARGET_STATES = 8, MOVING_TARGET_LOW = 9, MOVING_TARGET_HIGH = 10,
  MOVING_ENERGY = 11, STILL_TARGET_LOW = 12, STILL_TARGET_HIGH = 13, STILL_ENERGY = 14,
  DETECT_DISTANCE_LOW = 15, DETECT_DISTANCE_HIGH = 16, MOVING_SENSOR_START = 19, STILL_SENSOR_START = 28,
  LIGHT_SENSOR = 37, OUT_PIN_SENSOR = 38
}
 
enum  PeriodicDataValue : uint8_t { HEAD = 0XAA, END = 0x55, CHECK = 0x00 }
 
enum  AckDataStructure : uint8_t { COMMAND = 6, COMMAND_STATUS = 7 }
 

Functions

std::string format_version (uint8_t *buffer)
 
const std::string UNKNOWN_MAC ("unknown")
 
const std::string NO_MAC ("08:05:04:03:02:01")
 
std::string format_mac (uint8_t *buffer)
 
std::function< void(void)> set_number_value (number::Number *n, float value)
 

Variables

const char VERSION_FMT [] = "%u.%02X.%02X%02X%02X%02X"
 
const char MAC_FMT [] = "%02X:%02X:%02X:%02X:%02X:%02X"
 

Enumeration Type Documentation

◆ AckDataStructure

Enumerator
COMMAND 
COMMAND_STATUS 

Definition at line 134 of file ld2410.h.

◆ BaudRateStructure

Enumerator
BAUD_RATE_9600 
BAUD_RATE_19200 
BAUD_RATE_38400 
BAUD_RATE_57600 
BAUD_RATE_115200 
BAUD_RATE_230400 
BAUD_RATE_256000 
BAUD_RATE_460800 

Definition at line 56 of file ld2410.h.

◆ DistanceResolutionStructure

Enumerator
DISTANCE_RESOLUTION_0_2 
DISTANCE_RESOLUTION_0_75 

Definition at line 72 of file ld2410.h.

◆ LightFunctionStructure

Enumerator
LIGHT_FUNCTION_OFF 
LIGHT_FUNCTION_BELOW 
LIGHT_FUNCTION_ABOVE 

Definition at line 79 of file ld2410.h.

◆ OutPinLevelStructure

Enumerator
OUT_PIN_LEVEL_LOW 
OUT_PIN_LEVEL_HIGH 

Definition at line 90 of file ld2410.h.

◆ PeriodicDataStructure

Enumerator
DATA_TYPES 
TARGET_STATES 
MOVING_TARGET_LOW 
MOVING_TARGET_HIGH 
MOVING_ENERGY 
STILL_TARGET_LOW 
STILL_TARGET_HIGH 
STILL_ENERGY 
DETECT_DISTANCE_LOW 
DETECT_DISTANCE_HIGH 
MOVING_SENSOR_START 
STILL_SENSOR_START 
LIGHT_SENSOR 
OUT_PIN_SENSOR 

Definition at line 116 of file ld2410.h.

◆ PeriodicDataValue

Enumerator
HEAD 
END 
CHECK 

Definition at line 132 of file ld2410.h.

Function Documentation

◆ format_mac()

std::string esphome::ld2410::format_mac ( uint8_t *  buffer)

Definition at line 303 of file ld2410.cpp.

◆ format_version()

std::string esphome::ld2410::format_version ( uint8_t *  buffer)

Definition at line 286 of file ld2410.cpp.

◆ NO_MAC()

const std::string esphome::ld2410::NO_MAC ( "08:05:04:03:02:01"  )

◆ set_number_value()

std::function<void(void)> esphome::ld2410::set_number_value ( number::Number n,
float  value 
)

Definition at line 319 of file ld2410.cpp.

◆ UNKNOWN_MAC()

const std::string esphome::ld2410::UNKNOWN_MAC ( "unknown"  )

Variable Documentation

◆ MAC_FMT

const char esphome::ld2410::MAC_FMT[] = "%02X:%02X:%02X:%02X:%02X:%02X"

Definition at line 298 of file ld2410.cpp.

◆ VERSION_FMT

const char esphome::ld2410::VERSION_FMT[] = "%u.%02X.%02X%02X%02X%02X"

Definition at line 284 of file ld2410.cpp.