ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
canalsat_protocol.h
Go to the documentation of this file.
1#pragma once
2
3#include "remote_base.h"
4
5namespace esphome::remote_base {
6
8 uint8_t device : 7;
9 uint8_t address : 6;
10 uint8_t repeat : 1;
11 uint8_t command : 7;
12
13 bool operator==(const CanalSatData &rhs) const {
14 return device == rhs.device && address == rhs.address && command == rhs.command;
15 }
16};
17
18struct CanalSatLDData : public CanalSatData {};
19
20class CanalSatBaseProtocol : public RemoteProtocol<CanalSatData> {
21 public:
22 void encode(RemoteTransmitData *dst, const CanalSatData &data);
23 optional<CanalSatData> decode(RemoteReceiveData src);
24 void dump(const CanalSatData &data);
25
26 protected:
27 uint16_t frequency_;
28 uint16_t unit_;
29 const char *tag_;
30};
31
33 public:
35};
36
38 public:
40};
41
42DECLARE_REMOTE_PROTOCOL(CanalSat)
43
44DECLARE_REMOTE_PROTOCOL(CanalSatLD)
45
46} // namespace esphome::remote_base
optional< CanalSatData > decode(RemoteReceiveData src)
void encode(RemoteTransmitData *dst, const CanalSatData &data)
const void * src
Definition hal.h:68
bool operator==(const CanalSatData &rhs) const