ESPHome
2024.11.1
esphome
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::sml::DataTrigger::DataTrigger
DataTrigger(Sml *sml)
Definition:
automation.h:13
automation.h
sml.h
esphome::Trigger< const std::vector< uint8_t > &, bool >::trigger
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
Definition:
automation.h:95
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:65
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
esphome::Trigger
Definition:
automation.h:92
esphome::sml::DataTrigger
Definition:
automation.h:11
Generated by
1.8.13