ESPHome
2025.5.0
Loading...
Searching...
No Matches
esphome
components
sml
automation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/automation.h
"
4
#include "
sml.h
"
5
6
#include <vector>
7
8
namespace
esphome
{
9
namespace
sml {
10
11
class
DataTrigger
:
public
Trigger
<const std::vector<uint8_t> &, bool> {
12
public
:
13
explicit
DataTrigger
(
Sml
*sml) {
14
sml->
add_on_data_callback
([
this
](
const
std::vector<uint8_t> &data,
bool
valid) { this->
trigger
(data, valid); });
15
}
16
};
17
18
}
// namespace sml
19
}
// namespace esphome
esphome::Trigger
Definition
automation.h:93
esphome::Trigger< const std::vector< uint8_t > &, bool >::trigger
void trigger(Ts... x)
Definition
automation.h:96
esphome::sml::DataTrigger
Definition
automation.h:11
esphome::sml::DataTrigger::DataTrigger
DataTrigger(Sml *sml)
Definition
automation.h:13
esphome::sml::Sml
Definition
sml.h:21
esphome::sml::Sml::add_on_data_callback
void add_on_data_callback(std::function< void(std::vector< uint8_t >, bool)> &&callback)
Definition
sml.cpp:64
automation.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
sml.h
Generated by
1.12.0