2021-06-28 14:42:30 +00:00
|
|
|
#pragma once
|
2022-01-05 16:10:18 +00:00
|
|
|
#include "key_info.h"
|
2021-06-28 14:42:30 +00:00
|
|
|
#include <array>
|
|
|
|
|
|
|
|
class RfidKey {
|
|
|
|
public:
|
|
|
|
RfidKey();
|
|
|
|
~RfidKey();
|
|
|
|
|
|
|
|
void set_type(LfrfidKeyType type);
|
2021-06-30 12:02:46 +00:00
|
|
|
void set_data(const uint8_t* data, const uint8_t data_size);
|
|
|
|
void set_name(const char* name);
|
2021-06-28 14:42:30 +00:00
|
|
|
|
|
|
|
LfrfidKeyType get_type();
|
2021-06-30 12:02:46 +00:00
|
|
|
const uint8_t* get_data();
|
2021-06-28 14:42:30 +00:00
|
|
|
const char* get_type_text();
|
2022-05-06 13:37:10 +00:00
|
|
|
uint8_t get_type_data_count() const;
|
2021-06-28 14:42:30 +00:00
|
|
|
char* get_name();
|
2021-06-30 12:02:46 +00:00
|
|
|
uint8_t get_name_length();
|
|
|
|
void clear();
|
|
|
|
RfidKey& operator=(const RfidKey& rhs);
|
2021-06-28 14:42:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::array<uint8_t, LFRFID_KEY_SIZE> data;
|
|
|
|
LfrfidKeyType type;
|
|
|
|
char name[LFRFID_KEY_NAME_SIZE + 1];
|
|
|
|
};
|