HAMQTT 0.1.0
ESP-IDF component for integrating devices with Home Assistant over MQTT
|
Internal representation of a Home Assistant MQTT binary sensor. More...
#include <hamqtt_binary_sensor.h>
Public Member Functions | |
HAMQTT_Binary_Sensor * | hamqtt_binary_sensor_create (HAMQTT_Binary_Sensor_Config *config, HAMQTT_Binary_Sensor_Get_State_Func get_state_func, void *get_state_func_args) |
Create a new HAMQTT binary sensor. | |
void | hamqtt_binary_sensor_destroy (HAMQTT_Binary_Sensor *sensor) |
Destroy a HAMQTT binary sensor and free all resources. | |
const HAMQTT_Binary_Sensor_Config * | hamqtt_binary_sensor_get_config (const HAMQTT_Binary_Sensor *sensor) |
Get the configuration used to initialize the binary sensor. |
Internal representation of a Home Assistant MQTT binary sensor.
HAMQTT_Binary_Sensor * hamqtt_binary_sensor_create | ( | HAMQTT_Binary_Sensor_Config * | config, |
HAMQTT_Binary_Sensor_Get_State_Func | get_state_func, | ||
void * | get_state_func_args ) |
Create a new HAMQTT binary sensor.
config | Pointer to a binary sensor configuration. Must remain valid for the lifetime of the binary sensor. |
get_state_func | Function pointer for retrieving the state of a binary sensor. (See HAMQTT_Binary_Sensor_Get_State_Func). |
get_state_func_args | A pointer to the arguments to be passed to the get_state_func. |
void hamqtt_binary_sensor_destroy | ( | HAMQTT_Binary_Sensor * | sensor | ) |
Destroy a HAMQTT binary sensor and free all resources.
sensor | Pointer to the binary sensor to destroy. Must not be NULL. |
const HAMQTT_Binary_Sensor_Config * hamqtt_binary_sensor_get_config | ( | const HAMQTT_Binary_Sensor * | sensor | ) |
Get the configuration used to initialize the binary sensor.
sensor | Pointer to the binary sensor. |