ESPHome 2025.5.0
Loading...
Searching...
No Matches
wl_134.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
8
9namespace esphome {
10namespace wl_134 {
11
13 public:
23
25 uint16_t country;
26 uint64_t id;
27 bool isData;
29 uint16_t reserved0;
30 uint32_t reserved1;
31 };
32 // Nothing really public.
33
34 // ========== INTERNAL METHODS ==========
35 void setup() override;
36 void loop() override;
37 void dump_config() override;
38
39 void set_do_reset(bool do_reset) { this->do_reset_ = do_reset; }
40
41 private:
42 enum DfMp3Packet {
43 RFID134_PACKET_START_CODE,
44 RFID134_PACKET_ID = 1,
45 RFID134_PACKET_COUNTRY = 11,
46 RFID134_PACKET_DATA_FLAG = 15,
47 RFID134_PACKET_ANIMAL_FLAG = 16,
48 RFID134_PACKET_RESERVED0 = 17,
49 RFID134_PACKET_RESERVED1 = 21,
50 RFID134_PACKET_CHECKSUM = 27,
51 RFID134_PACKET_CHECKSUM_INVERT = 28,
52 RFID134_PACKET_END_CODE = 29,
53 RFID134_PACKET_SIZE
54 };
55
56 bool do_reset_;
57
58 Rfid134Error read_packet_();
59 uint64_t hex_lsb_ascii_to_uint64_(const uint8_t *text, uint8_t text_size);
60};
61
62} // namespace wl_134
63} // namespace esphome
void set_do_reset(bool do_reset)
Definition wl_134.h:39
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7