ESPHome
2026.10.0
Loading...
Searching...
No Matches
esphome
components
sx127x
automation.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/core/automation.h
"
5
#include "
esphome/components/sx127x/sx127x.h
"
6
7
namespace
esphome::sx127x
{
8
9
template
<
typename
... Ts>
class
SendPacketAction
final :
public
Action
<Ts...>,
public
Parented
<SX127x> {
10
TEMPLATABLE_BYTES(data)
11
12
public
:
13
void
play
(
const
Ts &...
x
)
override
{
14
this->data_.template visit<SX127X_MAX_PACKET_SIZE>(
15
[
this
](
const
uint8_t *data,
size_t
len
) { this->
parent_
->transmit_packet(data,
len
); },
x
...);
16
}
17
};
18
19
}
// namespace esphome::sx127x
esphome::Action
Definition
automation.h:554
esphome::Action< Ts... >::play
virtual void play(const Ts &...x)=0
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:2004
esphome::Parented< SX127x >::parent_
SX127x * parent_
Definition
helpers.h:2015
esphome::sx127x::SendPacketAction
Definition
automation.h:9
component.h
automation.h
esphome::sx127x
Definition
automation.h:7
esphome::len
const void size_t len
Definition
hal.h:64
sx127x.h
x
uint16_t x
Definition
tt21100.cpp:5
Generated by
1.12.0