ESPHome
2026.10.2
Loading...
Searching...
No Matches
esphome
components
sx126x
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/sx126x/sx126x.h
"
6
7
namespace
esphome::sx126x
{
8
9
template
<
typename
... Ts>
class
SendPacketAction
final :
public
Action
<Ts...>,
public
Parented
<SX126x> {
10
TEMPLATABLE_BYTES(data)
11
12
void
play
(
const
Ts &...
x
)
override
{
13
this->data_.template visit<SX126X_MAX_PACKET_SIZE>(
14
[
this
](
const
uint8_t *data,
size_t
len
) { this->
parent_
->transmit_packet(data,
len
); },
x
...);
15
}
16
};
17
18
}
// namespace esphome::sx126x
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< SX126x >::parent_
SX126x * parent_
Definition
helpers.h:2015
esphome::sx126x::SendPacketAction
Definition
automation.h:9
component.h
automation.h
esphome::sx126x
Definition
automation.h:7
esphome::len
const void size_t len
Definition
hal.h:64
sx126x.h
x
uint16_t x
Definition
tt21100.cpp:5
Generated by
1.12.0