ESPHome
2024.5.2
esphome
esphome
components
jsn_sr04t
jsn_sr04t.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
5
#include "
esphome/core/component.h
"
6
#include "
esphome/components/sensor/sensor.h
"
7
#include "
esphome/components/uart/uart.h
"
8
9
namespace
esphome
{
10
namespace
jsn_sr04t {
11
12
class
Jsnsr04tComponent
:
public
sensor::Sensor
,
public
PollingComponent
,
public
uart::UARTDevice
{
13
public
:
14
// Nothing really public.
15
16
// ========== INTERNAL METHODS ==========
17
void
update
()
override
;
18
void
loop
()
override
;
19
void
dump_config
()
override
;
20
21
protected
:
22
void
check_buffer_
();
23
24
std::vector<uint8_t>
buffer_
;
25
};
26
27
}
// namespace jsn_sr04t
28
}
// namespace esphome
uart.h
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition:
component.h:283
esphome::jsn_sr04t::Jsnsr04tComponent::loop
void loop() override
Definition:
jsn_sr04t.cpp:19
sensor.h
esphome::jsn_sr04t::Jsnsr04tComponent::dump_config
void dump_config() override
Definition:
jsn_sr04t.cpp:52
esphome::jsn_sr04t::Jsnsr04tComponent::buffer_
std::vector< uint8_t > buffer_
Definition:
jsn_sr04t.h:24
esphome::jsn_sr04t::Jsnsr04tComponent::check_buffer_
void check_buffer_()
Definition:
jsn_sr04t.cpp:35
esphome::uart::UARTDevice
Definition:
uart.h:12
esphome::jsn_sr04t::Jsnsr04tComponent
Definition:
jsn_sr04t.h:12
esphome
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition:
a01nyub.cpp:7
component.h
esphome::sensor::Sensor
Base-class for all sensors.
Definition:
sensor.h:57
esphome::jsn_sr04t::Jsnsr04tComponent::update
void update() override
Definition:
jsn_sr04t.cpp:14
Generated by
1.8.13