8#include <esp_gattc_api.h>
21static const uint8_t ACCESS_CONTROL_POINT_COMMAND = 0x6d;
22static const auto CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_UUID = espbt::ESPBTUUID::from_uint16(0x2902);
31 esp_ble_gattc_cb_param_t *param)
override;
47 virtual void read_sensors(uint8_t *raw_value, uint16_t value_len) = 0;
This class simplifies creating components that periodically check a state.
espbt::ESPBTUUID service_uuid_
SUB_SENSOR(temperature) SUB_SENSOR(humidity) SUB_SENSOR(pressure) SUB_SENSOR(tvoc) void set_battery_voltage(sensor
void read_battery_(uint8_t *raw_value, uint16_t value_len)
void response_received_()
uint8_t responses_pending_
void set_battery_update_interval(uint32_t interval)
bool is_valid_voc_value_(uint16_t voc)
bool request_read_values_()
espbt::ESPBTUUID sensors_data_characteristic_uuid_
AirthingsWaveBase()=default
void set_response_timeout_()
uint32_t battery_update_interval_
espbt::ESPBTUUID access_control_point_characteristic_uuid_
virtual void read_sensors(uint8_t *raw_value, uint16_t value_len)=0
bool read_battery_next_update_
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
sensor::Sensor * battery_voltage_
Base-class for all sensors.