2021-06-28 14:42:30 +00:00
|
|
|
#pragma once
|
|
|
|
#include "key-info.h"
|
|
|
|
#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();
|
|
|
|
const uint8_t get_type_data_count();
|
|
|
|
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];
|
|
|
|
};
|