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