rfid_key.h 626 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "key_info.h"
  3. #include <array>
  4. class RfidKey {
  5. public:
  6. RfidKey();
  7. ~RfidKey();
  8. void set_type(LfrfidKeyType type);
  9. void set_data(const uint8_t* data, const uint8_t data_size);
  10. void set_name(const char* name);
  11. LfrfidKeyType get_type();
  12. const uint8_t* get_data();
  13. const char* get_type_text();
  14. uint8_t get_type_data_count() const;
  15. char* get_name();
  16. uint8_t get_name_length();
  17. void clear();
  18. RfidKey& operator=(const RfidKey& rhs);
  19. private:
  20. std::array<uint8_t, LFRFID_KEY_SIZE> data;
  21. LfrfidKeyType type;
  22. char name[LFRFID_KEY_NAME_SIZE + 1];
  23. };