ESPHome
2024.12.2
esphome
esphome
components
remote_base
jvc_protocol.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
remote_base.h
"
4
5
#include <cinttypes>
6
7
namespace
esphome
{
8
namespace
remote_base {
9
10
struct
JVCData
{
11
uint32_t
data
;
12
13
bool
operator==
(
const
JVCData
&rhs)
const
{
return
data == rhs.
data
; }
14
};
15
16
class
JVCProtocol
:
public
RemoteProtocol
<JVCData> {
17
public
:
18
void
encode(
RemoteTransmitData
*dst,
const
JVCData
&
data
)
override
;
19
optional<JVCData>
decode(
RemoteReceiveData
src)
override
;
20
void
dump(
const
JVCData
&data)
override
;
21
};
22
23
DECLARE_REMOTE_PROTOCOL
(JVC)
24
25
template
<
typename
... Ts>
class
JVCAction :
public
RemoteTransmitterActionBase
<Ts...> {
26
public
:
27
TEMPLATABLE_VALUE(uint32_t,
data
)
28
29
void
encode(
RemoteTransmitData
*dst, Ts...
x
)
override
{
30
JVCData
data
{};
31
data
.data = this->data_.value(
x
...);
32
JVCProtocol
().
encode
(dst,
data
);
33
}
34
};
35
36
}
// namespace remote_base
37
}
// namespace esphome
esphome::remote_base::DECLARE_REMOTE_PROTOCOL
DECLARE_REMOTE_PROTOCOL(AEHA) template< typename... Ts > class AEHAAction
Definition:
aeha_protocol.h:27
x
uint16_t x
Definition:
tt21100.cpp:17
esphome::remote_base::JVCData::data
uint32_t data
Definition:
jvc_protocol.h:11
esphome::remote_base::RemoteTransmitData
Definition:
remote_base.h:25
esphome::remote_base::RemoteProtocol
Definition:
remote_base.h:225
esphome::remote_base::JVCData
Definition:
jvc_protocol.h:10
esphome::remote_base::JVCData::operator==
bool operator==(const JVCData &rhs) const
Definition:
jvc_protocol.h:13
esphome::remote_base::RemoteTransmitterActionBase
Definition:
remote_base.h:279
esphome::remote_base::RemoteReceiveData
Definition:
remote_base.h:48
esphome::optional
Definition:
optional.h:36
esphome::remote_base::JVCProtocol::encode
void encode(RemoteTransmitData *dst, const JVCData &data) override
Definition:
jvc_protocol.cpp:16
remote_base.h
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
esphome::remote_base::JVCProtocol
Definition:
jvc_protocol.h:16
Generated by
1.8.13