32 virtual const char*
what()
const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
64 CCardUID(
const uint64_t& number,
size_t nSize = 8);
71 CCardUID(
const void* pData,
size_t nSize);
80 CCardUID(uint8_t nEmSeries, uint16_t nEmNumber, uint16_t nFacility = 0);
86 memset(aBytes, 0,
sizeof(aBytes));
94 return (0 == nLength);
110 void Assign(
const void* pData,
size_t nSize) {
111 nLength =
static_cast<uint8_t
>((nSize >
sizeof(aBytes)) ?
sizeof(aBytes) : nSize);
113 memcpy(aBytes, pData, nLength);
123 Assign(&other,
sizeof(other));
133 Assign(&other,
sizeof(other));
142 int Compare(
const ilr_card_uid& other)
const {
143 int n = (nLength - other.nLength);
145 n = memcmp(aBytes, other.aBytes, nLength);
157 return (nLength == other.nLength) && (memcmp(aBytes, other.aBytes, nLength) == 0);
168 return (nLength != other.nLength) || (memcmp(aBytes, other.aBytes, nLength) != 0);
323 memset(
a, 0xff,
sizeof(
a));
328 return ll.lo & 0xffffffffffff;
347 ll.lo = other & 0xffffffffffff;
359 return memcmp(
a, other.
a,
sizeof(
a)) == 0;
369 return memcmp(
a, other.
a,
sizeof(
a)) != 0;
379 return memcmp(
a, other.
a,
sizeof(
a)) < 0;
389 return memcmp(
a, other.
a,
sizeof(
a)) > 0;
399 return memcmp(
a, other.
a,
sizeof(
a)) <= 0;
409 return memcmp(
a, other.
a,
sizeof(
a)) >= 0;
417 std::string
ToString(
const char* pPartDelimiter =
nullptr)
const;
473 explicit operator bool()
const;
561 inline void GetProgress(
size_t& nCurrent,
size_t& nTotal)
const;
625 void* pUserData =
nullptr);
695 inline void SetListenPorts(
const uint16_t* pPorts,
size_t nCount);
735 inline void Scan(
bool fReset =
false);
783 inline void SetAutoScan(
bool fEnable =
true,
bool fWait =
true);
941 return static_cast<bool>(f);
968 const char* pszPortName) {
979 const char* pszPortName,
int hPortFD) {
1038 void* pUserData =
nullptr);
1103 inline void Connect(
bool fReconnect =
false);
1166 inline void Scan(
bool fReset =
false,
bool fPowerOff =
true);
1204 inline void SetAutoScan(
bool fEnable =
true,
bool fWait =
true);
1242 inline void ReadMfUltralight(
size_t nPageIdx, uint32_t* pBuf,
size_t nPageCount,
1243 size_t* pRead =
nullptr);
1288 inline void WriteMfUltralight(
size_t nPageIdx,
const uint32_t* pData,
size_t nPageCount,
1289 size_t* pWritten =
nullptr);
1353 inline bool AuthMfCard(
size_t nAddress,
bool fKeyB);
1395 inline int AuthMfCard2(
size_t nAddress,
bool fKeyB, uint32_t nKeys = 0xFFFF);
1439 size_t* pRead =
nullptr);
1485 size_t* pWritten =
nullptr);
1501 size_t nBlockCount);
1530 bool fOpenText =
true,
size_t* pRead =
nullptr);
1577 bool fOpenText =
true,
size_t* pWritten =
nullptr);
1593 size_t nBlockCount,
bool fOpenText);
1619 inline void MfIncrement(
size_t nBlockIdx, uint32_t nValue);
1649 inline void MfDecrement(
size_t nBlockIdx, uint32_t nValue);
1703 inline void MfRestore(
size_t nBlockIdx);
1746 inline bool MfRas(
bool fWakeUp, uint8_t& nSAK, uint16_t& nATQ, ilr_card_uid& rUID);
1763 inline bool MfRR(
bool fWakeUp,
const ilr_card_uid& rUID);
1801 void MfRats(std::vector<uint8_t>& oAts);
1847 size_t* pWritten =
nullptr);
1894 size_t* pWritten =
nullptr);
1944 inline void ScanTemic(
int nScanParam = -1);
1995 inline void ReadTemic(
size_t nBlockIdx, uint32_t* pBuf,
size_t nBlockCount,
int nScanParam = -1,
1996 size_t* pRead =
nullptr);
2042 inline void WriteTemic(
size_t nBlockIdx,
const uint32_t* pData,
size_t nBlockCount,
2043 bool fLock =
false,
int nScanParam = -1,
size_t* pWritten =
nullptr);
2060 size_t nBlockCount,
bool fLock =
false,
2061 int nScanParam = -1);
2108 size_t nBlockCount);
2122 ilr_card_uid& rUID,
bool* pConfigOk =
nullptr);
2135 static inline void EncodeTemicHid(
const ilr_card_uid& rUID, uint32_t* pBuf4,
size_t nBlockCount,
2149 static inline void DecodeTemicHid(
const uint32_t* pData4,
size_t nBlockCount,
2150 ilr_card_uid& rUID,
int& nWiegand,
bool* pConfigOk =
nullptr);
2166 uint32_t nFwVersion);
2239 return (rInfo.
rUID.nLength != 0);
2255 return static_cast<bool>(res);
2280 size_t nPageCount) {
2301 return static_cast<bool>(res);
2313 fAuthOk =
static_cast<bool>(f);
2349 size_t nBlockCount,
size_t* pWritten) {
2354 size_t nBlockCount) {
2365 bool fOpenText,
size_t* pRead) {
2383 size_t nBlockCount,
bool fOpenText,
size_t* pWritten) {
2389 size_t nBlockCount,
bool fOpenText) {
2444inline bool CReader::MfRas(
bool fWakeUp, uint8_t& nSAK, uint16_t& nATQ, ilr_card_uid& rUID) {
2447 return static_cast<bool>(res);
2453 return static_cast<bool>(res);
2473 size_t nCount,
size_t* pWritten) {
2489 size_t nCount,
size_t* pWritten) {
2525 return static_cast<bool>(res);
2545 bool fLock,
int nScanParam,
size_t* pWritten) {
2551 size_t nBlockCount,
bool fLock,
int nScanParam) {
2554 nScanParam, &res.
m_h));
2573 size_t nBlockCount) {
2578 ilr_card_uid& rUID,
bool* pConfigOk) {
2582 *pConfigOk =
static_cast<bool>(fConfigOk);
2591 int& nWiegand,
bool* pConfigOk) {
2595 *pConfigOk =
static_cast<bool>(fConfigOk);
2614 CILR(
bool fInit =
true);
2677 void* pUserData =
nullptr);
2779#define GET_BIT(val, bitN) (bool)((val >> (bitN)) & 1)
2787#define SET_BIT(val, bitN, On) \
2788 { (On) ? ((val) |= (1 << (bitN))) : ((val) &= ~(1 << (bitN))); }
2791inline std::chrono::steady_clock::time_point
now() {
2792 return std::chrono::steady_clock::now();
2800template <
class result_t = std::chrono::milliseconds,
class clock_t = std::chrono::steady_clock,
2801 class duration_t = std::chrono::milliseconds>
2802inline auto since(std::chrono::time_point<clock_t, duration_t>
const& start) {
2803 return std::chrono::duration_cast<result_t>(clock_t::now() - start);
2820std::string SdkVersionToStr(uint32_t nVersion);
2827std::string ReaderVersionToStr(uint32_t nVersion);
2834std::string TimeToStr(
const int64_t& tTime);
2882 return nMemSize / 16;
2893 return (nBlockIdx < 128) ? (nBlockIdx / 4) : (32 + ((nBlockIdx - 128) / 16));
2904 return (nSectorIdx < 32) ? (nSectorIdx * 4) : (128 + ((nSectorIdx - 32) * 16));
2915 return (nSectorIdx < 32) ? 4 : 16;
2926void GetMfBlockInfo(
size_t nBlockIdx,
size_t& nSectorIdx,
size_t& nSBlockIdx,
size_t& nSBlockCount);
2936std::string CardUIDToStr(
ilr_card_type nType,
const CCardUID& rUID);
2960size_t GetMfAreaByBlockIdx(
size_t nBlockIdx);
2969bool TryGetMfAreaAccess(uint32_t nSectorAccess,
size_t nArea, uint32_t& nAreaAccess);
2978void SetMfAreaAccess(
size_t nArea, uint32_t nAreaAccess, uint32_t& nSectorAccess);
3002 memcpy(fKeyB ? &rTrailerData.
a[10] : rTrailerData.
a, &nKey, 6);
Класс команды SDK.
Definition: ilr_cpp_helpers.h:514
CAsyncCommand & operator=(CAsyncCommand &&other)
Оператор перемещения
Definition: ilr_cpp_helpers.cpp:252
void Cancel()
Отменяет команду. Устанавливает статус ILR_E_ABORT.
Definition: ilr_cpp_helpers.h:564
void GetProgress(size_t &nCurrent, size_t &nTotal) const
Возвращает состояние прогресса выполнения команды.
Definition: ilr_cpp_helpers.h:574
ilr_status GetStatus() const
Возвращает состояние команды.
Definition: ilr_cpp_helpers.h:568
CAsyncCommand()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:237
virtual ~CAsyncCommand()
Деструктор
Definition: ilr_cpp_helpers.cpp:249
Класс ID карты.
Definition: ilr_cpp_helpers.h:51
void Clear()
Очищает ID карты.
Definition: ilr_cpp_helpers.h:85
bool TryParse(const char *pStr)
Преобразует строку в номер карты.
Definition: ilr_cpp_helpers.cpp:54
void Assign(const void *pData, size_t nSize)
Устанавливает номера из байтов номера.
Definition: ilr_cpp_helpers.h:110
bool operator==(const ilr_card_uid &other) const
Оператор сравнения на равенство.
Definition: ilr_cpp_helpers.h:156
bool operator>=(const ilr_card_uid &other) const
Оператор сравнения "больше или равно".
Definition: ilr_cpp_helpers.h:189
std::string ToString() const
Преобразует номер карты в строку.
Definition: ilr_cpp_helpers.cpp:43
bool operator<=(const ilr_card_uid &other) const
Оператор сравнения "меньше или равно".
Definition: ilr_cpp_helpers.h:211
const CCardUID & operator=(const uint64_t &other)
Оператор копирования из 8-байтного числа.
Definition: ilr_cpp_helpers.h:132
bool operator!=(const ilr_card_uid &other) const
Оператор сравнения на не равенство.
Definition: ilr_cpp_helpers.h:167
bool IsEmpty() const
Проверяет пустой ли ID карты.
Definition: ilr_cpp_helpers.h:93
const CCardUID & operator=(const uint32_t &other)
Оператор копирования из 4-байтного числа.
Definition: ilr_cpp_helpers.h:122
bool operator>(const ilr_card_uid &other) const
Оператор сравнения "больше".
Definition: ilr_cpp_helpers.h:178
int Compare(const ilr_card_uid &other) const
Сравнивает ID номеров.
Definition: ilr_cpp_helpers.h:142
CCardUID()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:19
bool operator<(const ilr_card_uid &other) const
Оператор сравнения "меньше".
Definition: ilr_cpp_helpers.h:200
int GetLength() const
Возвращает размер ID карты в байтах.
Definition: ilr_cpp_helpers.h:100
Класс исключения SDK Readers.
Definition: ilr_cpp_helpers.h:22
CILRException(ilr_status nCode)
Конструктор из кода возврата SDK.
Definition: ilr_cpp_helpers.cpp:11
ilr_status m_nCode
Код возврата SDK.
Definition: ilr_cpp_helpers.h:35
virtual const char * what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW
Возвращает описание ошибки
Definition: ilr_cpp_helpers.cpp:15
Класс дескриптора SDK.
Definition: ilr_cpp_helpers.h:430
void Attach(ilr_handle h)
Присоединяет дескриптор к этому объекту.
Definition: ilr_cpp_helpers.cpp:225
ilr_handle Detach()
Отсоединяет дескриптор от этого объекту.
Definition: ilr_cpp_helpers.cpp:231
CILRHandle & operator=(const CILRHandle &)=delete
Запрещаем копирование этого класса (т.к. он содержит указатель = дескриптор).
void Close()
Закрывает дескриптор SDK.
Definition: ilr_cpp_helpers.cpp:218
virtual ~CILRHandle()
Деструктор
Definition: ilr_cpp_helpers.cpp:189
ilr_handle Get() const
Возвращает дескриптор SDK.
Definition: ilr_cpp_helpers.cpp:214
ilr_handle m_h
Дескриптор SDK.
Definition: ilr_cpp_helpers.h:506
CILRHandle(const CILRHandle &)=delete
Запрещаем копирование этого класса (т.к. он содержит указатель = дескриптор).
CILRHandle()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:176
void Swap(CILRHandle &other) noexcept
Обменивается значением с другим дескриптором.
Definition: ilr_cpp_helpers.cpp:210
Класс для инициализации/финализации библиотеки SDK.
Definition: ilr_cpp_helpers.h:2607
CReaderSearch GetSearch()
Создаёт дескриптор поиска считывателей.
Definition: ilr_cpp_helpers.h:2761
void SetFilterPortCallback(ilr_filter_port_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для фильтрации портов при поиске считывателей.
Definition: ilr_cpp_helpers.h:2749
void GetOptions(ilr_options &rOptions) const
Возвращает глобальные настройки библиотеки.
Definition: ilr_cpp_helpers.h:2757
bool m_fInit
Definition: ilr_cpp_helpers.h:2730
static bool CheckVersion()
Проверяет версию SDK.
Definition: ilr_cpp_helpers.h:2737
CReader GetReader(ilr_port_type nPortType, const char *pszPortName)
Создаёт дескриптор считывателя.
Definition: ilr_cpp_helpers.h:2767
static void SetLogLevel(ilr_log_level nLevel)
Устанавливает уровень лога отладки.
Definition: ilr_cpp_helpers.h:2741
static void SetLogCallback(ilr_logging_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для лога отладки.
Definition: ilr_cpp_helpers.h:2745
void SetOptions(const ilr_options &rOptions)
Устанавливает глобальные настройки библиотеки.
Definition: ilr_cpp_helpers.h:2753
void Init()
Definition: ilr_cpp_helpers.cpp:414
void Finalize()
Definition: ilr_cpp_helpers.cpp:421
~CILR()
Деструктор
Definition: ilr_cpp_helpers.cpp:409
static uint32_t GetVersion()
Возвращает номер версии библиотеки.
Definition: ilr_cpp_helpers.h:2733
CILR(bool fInit=true)
Конструктор по умолчанию
Definition: ilr_cpp_helpers.cpp:402
Класс ключа аутентификации Mifare Classic.
Definition: ilr_cpp_helpers.h:231
CMifareClassicKey()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:89
ilr_mf_classic_key m_nKey
Ключ аутентификации Mifare Classic.
Definition: ilr_cpp_helpers.h:286
std::string ToString() const
Преобразует номер ключа в строку.
Definition: ilr_cpp_helpers.cpp:105
static const ilr_mf_classic_key kDefault
Definition: ilr_cpp_helpers.h:283
const CMifareClassicKey & operator=(const ilr_mf_classic_key &other)
Оператор копирования ilr_mf_classic_key.
Definition: ilr_cpp_helpers.h:266
bool TryParse(const char *pStr)
Преобразует строку в номер ключа.
Definition: ilr_cpp_helpers.cpp:113
void Reset()
Устанавливает значение ключа по умолчанию.
Definition: ilr_cpp_helpers.h:252
Ключ аутентификации Mifare Plus.
Definition: ilr_cpp_helpers.h:294
std::string ToString(const char *pPartDelimiter=nullptr) const
Преобразует номер ключа в строку.
Definition: ilr_cpp_helpers.cpp:144
bool operator<(const CMifarePlusKey &other) const
Оператор сравнение ключей "меньше".
Definition: ilr_cpp_helpers.h:378
void Reset()
Устанавливает значение ключа по умолчанию
Definition: ilr_cpp_helpers.h:322
const CMifarePlusKey & operator=(const ilr_mf_plus_key &other)
Оператор присвоения ключа Mifare Plus.
Definition: ilr_cpp_helpers.h:336
const CMifarePlusKey & operator=(const ilr_mf_classic_key &other)
Оператор присвоения ключа Mifare Classic.
Definition: ilr_cpp_helpers.h:346
bool operator==(const CMifarePlusKey &other) const
Оператор сравнение ключей на равенство.
Definition: ilr_cpp_helpers.h:358
bool TryParse(const char *pStr)
Преобразует строку в номер ключа.
Definition: ilr_cpp_helpers.cpp:154
CMifarePlusKey()
Конструктор по умолчанию
Definition: ilr_cpp_helpers.cpp:123
bool operator!=(const CMifarePlusKey &other) const
Оператор сравнение ключей на неравенство.
Definition: ilr_cpp_helpers.h:368
bool operator>(const CMifarePlusKey &other) const
Оператор сравнение ключей "больше".
Definition: ilr_cpp_helpers.h:388
bool operator>=(const CMifarePlusKey &other) const
Оператор сравнение ключей "больше или равно".
Definition: ilr_cpp_helpers.h:408
bool operator<=(const CMifarePlusKey &other) const
Оператор сравнение ключей "меньше или равно".
Definition: ilr_cpp_helpers.h:398
Класс поиска считывателей.
Definition: ilr_cpp_helpers.h:583
void GetOptions(ilr_search_options &rOptions) const
Возвращает параметры поиска считывателей.
Definition: ilr_cpp_helpers.h:906
CAsyncCommand Begin_ClosePort(ilr_port_type nPortType, const char *pszPortName, int hPortFD)
Запускает асинхронную команду закрытия порта.
Definition: ilr_cpp_helpers.h:978
virtual ~CReaderSearch()
Деструктор
Definition: ilr_cpp_helpers.cpp:269
void GetListenPorts(std::vector< uint16_t > &oPorts) const
Возвращает список портов для прослушки конвертеров к режиме "Клиент".
Definition: ilr_cpp_helpers.cpp:277
CReaderSearch & operator=(CReaderSearch &&other)
Оператор перемещения
Definition: ilr_cpp_helpers.cpp:272
void SetOptions(const ilr_search_options &rOptions)
Устанавливает параметры поиска считывателей.
Definition: ilr_cpp_helpers.h:902
CAsyncCommand Begin_Scan(bool fReset=false)
Запускает асинхронную команду поиска считывателей.
Definition: ilr_cpp_helpers.h:955
CAsyncCommand Begin_OpenPort(ilr_port_type nPortType, const char *pszPortName)
Запускает асинхронную команду открытия порта.
Definition: ilr_cpp_helpers.h:967
bool GetMessage(ilr_search_msg &nMsg, const void *&pMsgData) const
Извлекает следующее сообщение из очереди.
Definition: ilr_cpp_helpers.h:896
void SetListenPorts(const uint16_t *pPorts, size_t nCount)
Устанавливает список портов для прослушки конвертеров к режиме "Клиент".
Definition: ilr_cpp_helpers.h:910
static void End_OpenPort(ilr_handle hCommand, int &PortFD, ilr_reader_info &rInfo)
Возвращает результат открытия порта.
Definition: ilr_cpp_helpers.h:974
ilr_status GetListenStatus(uint16_t nTcpPort) const
Возвращает состояние Tcp-порта, открытого для прослушки конвертеров в режиме "Клиент".
Definition: ilr_cpp_helpers.h:914
void Scan(bool fReset=false)
Ищет считыватели.
Definition: ilr_cpp_helpers.h:920
void GetReaderInfo(size_t nIdx, ilr_reader_info &rInfo) const
Возвращает информацию о найденном считывателе.
Definition: ilr_cpp_helpers.h:930
CAsyncCommand Begin_SetAutoScan(bool fEnable)
Запускает асинхронную команду вкл/выкл режим авто поиска считывателей.
Definition: ilr_cpp_helpers.h:961
void ClosePort(ilr_port_type nPortType, const char *pszPortName, int hPort)
Закрывает порт
Definition: ilr_cpp_helpers.h:951
bool GetAutoScan() const
Возвращает флаг авто поиска считывателей.
Definition: ilr_cpp_helpers.h:938
void SetAutoScan(bool fEnable=true, bool fWait=true)
Включает/выключает авто поиск считывателей.
Definition: ilr_cpp_helpers.h:934
int OpenPort(ilr_port_type nPortType, const char *pszPortName, ilr_reader_info *pInfo=nullptr)
Открывает порт и возвращает его дескриптор.
Definition: ilr_cpp_helpers.h:944
void SetMessageCallback(ilr_search_message_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для уведомлений поиска считывателей.
Definition: ilr_cpp_helpers.h:887
size_t GetReaderCount() const
Возвращает количество найденных считывателей.
Definition: ilr_cpp_helpers.h:924
CReaderSearch()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:257
void EnableMessageQueue(bool fEnable=true)
Включает/выключает очередь сообщений.
Definition: ilr_cpp_helpers.h:892
CReaderSearch Clone() const
Клонирует дескриптор поиска считывателей.
Definition: ilr_cpp_helpers.h:985
Класс считывателя.
Definition: ilr_cpp_helpers.h:996
void ReadMfUltralight(size_t nPageIdx, uint32_t *pBuf, size_t nPageCount, size_t *pRead=nullptr)
Читает данные карты Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2258
CAsyncCommand Begin_WriteMfCKey(size_t nIdx, bool fKeyB, const ilr_mf_classic_key *pKeys, size_t nCount)
Запускает асинхронную команду записи ключей аутентификации Mifare Classic в память считывателя.
Definition: ilr_cpp_helpers.h:2477
void MfWritePerso(uint32_t nAddress, const ilr_mf_plus_key &rKey)
Записывает ключи AES и всех блоков.
Definition: ilr_cpp_helpers.h:2464
void ReadMfClassic(size_t nBlockIdx, ilr_mf_block_data *pBuf, size_t nBlockCount, size_t *pRead=nullptr)
Читает данные карты Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2332
void WriteTemic(size_t nBlockIdx, const uint32_t *pData, size_t nBlockCount, bool fLock=false, int nScanParam=-1, size_t *pWritten=nullptr)
Пишет данные карты Temic.
Definition: ilr_cpp_helpers.h:2544
CAsyncCommand Begin_WriteTemic(size_t nBlockIdx, const uint32_t *pData, size_t nBlockCount, bool fLock=false, int nScanParam=-1)
Запускает асинхронную команду записи данных в карту Temic.
Definition: ilr_cpp_helpers.h:2550
void SetAutoScan(bool fEnable=true, bool fWait=true)
Включает/выключает автоматическое сканирование карт.
Definition: ilr_cpp_helpers.h:2242
bool GetAutoScan() const
Возвращает флаг автоматическое сканирование карт.
Definition: ilr_cpp_helpers.h:2252
CAsyncCommand Begin_SetAutoScan(bool fEnable=true)
Запускает асинхронную команду вкл/выкл автоматического сканирования карт.
Definition: ilr_cpp_helpers.h:2246
ilr_connection_status GetConnectionStatus() const
Возвращает состояние подключения к считывателю
Definition: ilr_cpp_helpers.h:2217
static void End_ReadMfUltralight(ilr_handle hCommand, const uint32_t *&pList, size_t &nRead)
Возвращает результат чтения данных из карты Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2269
CAsyncCommand Begin_ReadTemic(size_t nBlockIdx, size_t nBlockCount, int nScanParam=-1)
Запускает асинхронную команду чтения данных из карты Temic.
Definition: ilr_cpp_helpers.h:2533
void SetScanTemic(bool fEnable=true)
Вкл/выкл сканирование карт Temic (для Z-2 Rd-All и Z-2 EHR).
Definition: ilr_cpp_helpers.h:2518
bool GetScanTemic() const
Возвращает True если сканирование Temic включено.
Definition: ilr_cpp_helpers.h:2522
bool GetMessage(ilr_reader_msg &nMsg, const void *&pMsgData) const
Извлекает следующее сообщение из очереди.
Definition: ilr_cpp_helpers.h:2183
CAsyncCommand Begin_WriteMfPlus(size_t nAddress, const ilr_mf_block_data *pData, size_t nBlockCount, bool fOpenText)
Запускает асинхронную команду записи данных в карту Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2388
static void End_WriteMfPlus(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи данных в карту Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2396
CAsyncCommand Begin_AuthMfCard(size_t nAddress, bool fKeyB)
Запускает асинхронную команду авторизации сектора карты Mifare Classic / Plus используя ключ,...
Definition: ilr_cpp_helpers.h:2304
void SetMessageCallback(ilr_reader_message_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для уведомлений считывателя.
Definition: ilr_cpp_helpers.h:2175
void Disconnect()
Отключается от считывателя.
Definition: ilr_cpp_helpers.h:2207
void MfRestore(size_t nBlockIdx)
Перемещает содержимое блока в регистр данных Mifare.
Definition: ilr_cpp_helpers.h:2430
void Connect(bool fReconnect=false)
Подключается к считывателю.
Definition: ilr_cpp_helpers.h:2197
static void End_WriteMfUltralight(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи данных в карту Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2286
int AuthMfCard2(size_t nAddress, bool fKeyB, uint32_t nKeys=0xFFFF)
Авторизует сектор карты Mifare Classic / Plus, используя ключи считывателя.
Definition: ilr_cpp_helpers.h:2316
CAsyncCommand Begin_ReadMfUltralight(size_t nPageIdx, size_t nPageCount)
Запускает асинхронную команду чтения данных из карты Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2263
bool AuthMfCard(size_t nAddress, bool fKeyB)
Авторизует сектор карты Mifare Classic/Plus.
Definition: ilr_cpp_helpers.h:2298
CAsyncCommand Begin_MfRestore(size_t nBlockIdx)
Перемещает содержимое блока в регистр данных Mifare.
Definition: ilr_cpp_helpers.h:2434
void SetOptions(const ilr_reader_options &rOptions)
Устанавливает параметры считывателя.
Definition: ilr_cpp_helpers.h:2189
CAsyncCommand Begin_ReadMfPlus(size_t nAddress, size_t nBlockCount, bool fOpenText)
Запускает асинхронную команду чтения данных из карты Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2369
CAsyncCommand Begin_WriteMfPKey(size_t nIdx, bool fKeyB, const ilr_mf_plus_key *pKeys, size_t nCount)
Запускает асинхронную команду записи ключей аутентификации Mifare Plus в память считывателя.
Definition: ilr_cpp_helpers.h:2493
void MfDecrement(size_t nBlockIdx, uint32_t nValue)
Уменьшает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных.
Definition: ilr_cpp_helpers.h:2410
static void DecodeTemicEmMarine(const uint32_t *pData3, size_t nBlockCount, ilr_card_uid &rUID, bool *pConfigOk=nullptr)
Декодирует номер Em-Marine из данных блоков 0..2 карты Temic.
Definition: ilr_cpp_helpers.h:2577
CAsyncCommand Begin_MfIncrement(size_t nBlockIdx, uint32_t nValue)
Увеличивает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных...
Definition: ilr_cpp_helpers.h:2404
CAsyncCommand Begin_AuthMfCard2(size_t nAddress, bool fKeyB, uint32_t nKeys=0xFFFF)
Запускает асинхронную команду авторизации сектора карты Mifare Classic / Plus. используя ключи в памя...
Definition: ilr_cpp_helpers.h:2322
CAsyncCommand Begin_WriteMfUltralight(size_t nPageIdx, const uint32_t *pData, size_t nPageCount)
Запускает асинхронную команду записи данных в карту Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2279
static void EncodeTemicHid(const ilr_card_uid &rUID, uint32_t *pBuf4, size_t nBlockCount, int nWiegand)
Кодирует данные для эмуляции HID, для записи в блоки 0..3.
Definition: ilr_cpp_helpers.h:2585
void WriteMfUltralight(size_t nPageIdx, const uint32_t *pData, size_t nPageCount, size_t *pWritten=nullptr)
Пишет данные карты Mifare Ultralight.
Definition: ilr_cpp_helpers.h:2274
void WriteMfPKey(size_t nIdx, bool fKeyB, const ilr_mf_plus_key *pKeys, size_t nCount, size_t *pWritten=nullptr)
Записывает ключи аутентификации Mifare Plus в память считывателя
Definition: ilr_cpp_helpers.h:2488
void Scan(bool fReset=false, bool fPowerOff=true)
Ищет карты.
Definition: ilr_cpp_helpers.h:2227
CAsyncCommand Begin_ResetTemic()
Запускает асинхронную команду сброса TRES.
Definition: ilr_cpp_helpers.h:2566
void MfHalt()
Halt.
Definition: ilr_cpp_helpers.h:2456
static void End_WriteMfClassic(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи данных в карту Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2360
virtual ~CReader()
Деструктор
Definition: ilr_cpp_helpers.cpp:289
void WriteMfClassic(size_t nBlockIdx, const ilr_mf_block_data *pData, size_t nBlockCount, size_t *pWritten=nullptr)
Пишет данные карты Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2348
CAsyncCommand Begin_WriteMfClassic(size_t nBlockIdx, const ilr_mf_block_data *pData, size_t nBlockCount)
Запускает асинхронную команду записи данных в карту Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2353
CAsyncCommand Begin_ReadMfClassic(size_t nBlockIdx, size_t nBlockCount)
Запускает асинхронную команду чтения данных из карты Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2337
static void End_WriteMfCKey(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи ключей аутентификации Mifare Classic в память считывателя.
Definition: ilr_cpp_helpers.h:2484
void LoadTemicPassword(const int64_t nPassword)
Загружает пароль Temic в память объекта считывателя.
Definition: ilr_cpp_helpers.h:2504
CAsyncCommand Begin_MfDecrement(size_t nBlockIdx, uint32_t nValue)
Уменьшает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных.
Definition: ilr_cpp_helpers.h:2414
static void End_ReadMfClassic(ilr_handle hCommand, const ilr_mf_block_data *&pList, size_t &nRead)
Возвращает результат чтения данных из карты Mifare Classic или Mifare Plus SL1.
Definition: ilr_cpp_helpers.h:2343
void MfRats()
Переходит на ISO 14443-4.
Definition: ilr_cpp_helpers.h:2460
static uint32_t GetSupportedRewrittenCardTypes(ilr_reader_model nReaderModel, uint32_t nFwVersion)
Возвращает типы карт, данные которых умеет читать/писать считыватель
Definition: ilr_cpp_helpers.cpp:362
static void EncodeTemicEmMarine(const ilr_card_uid &rUID, uint32_t *pBuf3, size_t nBlockCount)
Кодирует данные для эмуляции Em-Marine, для записи в блоки 0..2.
Definition: ilr_cpp_helpers.h:2572
CAsyncCommand Begin_Scan(bool fReset=false, bool fPowerOff=true)
Запускает асинхронную команду поиска карты.
Definition: ilr_cpp_helpers.h:2231
void WriteMfCKey(size_t nIdx, bool fKeyB, const ilr_mf_classic_key *pKeys, size_t nCount, size_t *pWritten=nullptr)
Записывает ключи аутентификации Mifare Classic в память считывателя.
Definition: ilr_cpp_helpers.h:2472
CAsyncCommand Begin_MfTransfer(size_t nBlockIdx)
Записывает содержимое во временном регистре данных в блок-значение.
Definition: ilr_cpp_helpers.h:2424
CAsyncCommand Begin_ScanTemic(int nScanParam=-1)
Запускает асинхронную команду поиска карты Temic в поле считывателя.
Definition: ilr_cpp_helpers.h:2512
static void End_WriteMfPKey(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи ключей аутентификации Mifare Plus в память считывателя.
Definition: ilr_cpp_helpers.h:2500
CReader()
Конструктор по умолчанию.
Definition: ilr_cpp_helpers.cpp:286
void LoadMfCKey(const ilr_mf_classic_key &nKey)
Загружает ключ для авторизации сектора Mifare Classic / Plus SL1.
Definition: ilr_cpp_helpers.h:2290
static void DecodeTemicHid(const uint32_t *pData4, size_t nBlockCount, ilr_card_uid &rUID, int &nWiegand, bool *pConfigOk=nullptr)
Декодирует номер HID из данных блоков 0..3 карты Temic.
Definition: ilr_cpp_helpers.h:2590
void WriteMfPlus(size_t nAddress, const ilr_mf_block_data *pData, size_t nBlockCount, bool fOpenText=true, size_t *pWritten=nullptr)
Пишет данные карты Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2382
void ReadTemic(size_t nBlockIdx, uint32_t *pBuf, size_t nBlockCount, int nScanParam=-1, size_t *pRead=nullptr)
Читает данные карты Temic.
Definition: ilr_cpp_helpers.h:2528
void ReadMfPlus(size_t nAddress, ilr_mf_block_data *pBuf, size_t nBlockCount, bool fOpenText=true, size_t *pRead=nullptr)
Читает данные карты Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2364
CReader & operator=(CReader &&other)
Оператор перемещения
Definition: ilr_cpp_helpers.cpp:292
CAsyncCommand Begin_Connect(bool fReconnect=false)
Запускает асинхронную команду подключения к считывателю.
Definition: ilr_cpp_helpers.h:2201
void GetReaderInfo(ilr_reader_info &rInfo) const
Возвращает информацию о считывателе.
Definition: ilr_cpp_helpers.h:2223
void GetOptions(ilr_reader_options &rOptions) const
Возвращает параметры считывателя.
Definition: ilr_cpp_helpers.h:2193
static void End_ReadMfPlus(ilr_handle hCommand, const ilr_mf_block_data *&pList, size_t &nRead)
Возвращает результат чтения данных из карты Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2377
void LoadMfPKey(const ilr_mf_plus_key &rKey)
Загружает ключ для авторизации сектора Mifare Plus SL3.
Definition: ilr_cpp_helpers.h:2294
void ScanTemic(int nScanParam=-1)
Ищет карту Temic в поле считывателя.
Definition: ilr_cpp_helpers.h:2508
void MfCommitPerso()
Переключает Mifare Plus в SL1 или SL3(если SL1 нет).
Definition: ilr_cpp_helpers.h:2468
CReader Clone() const
Клонирует дескриптор считывателя.
Definition: ilr_cpp_helpers.h:2598
void ResetTemic(bool fWait=true)
Сброс TRES.
Definition: ilr_cpp_helpers.h:2562
bool MfRas(bool fWakeUp, uint8_t &nSAK, uint16_t &nATQ, ilr_card_uid &rUID)
R+A+S(Request+Anticollision+Select)
Definition: ilr_cpp_helpers.h:2444
void MfIncrement(size_t nBlockIdx, uint32_t nValue)
Увеличивает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных...
Definition: ilr_cpp_helpers.h:2400
bool MfRR(bool fWakeUp, const ilr_card_uid &rUID)
R+R(Request+Reselect(по известному номеру)).
Definition: ilr_cpp_helpers.h:2450
static void End_AuthMfCard2(ilr_handle hCommand, int &nFoundIdx)
Возвращает результат авторизации сектора карты.
Definition: ilr_cpp_helpers.h:2328
void MfTransfer(size_t nBlockIdx)
Записывает содержимое во временном регистре данных в блок-значение.
Definition: ilr_cpp_helpers.h:2420
static uint32_t GetSupportedCardTypes(ilr_reader_model nReaderModel)
Возвращает биты типов карт, UID которых умеет читать считыватель.
Definition: ilr_cpp_helpers.cpp:314
static void End_ReadTemic(ilr_handle hCommand, const uint *&pList, size_t &nRead)
Возвращает результат чтения данных из карты Temic.
Definition: ilr_cpp_helpers.h:2540
void EnableMessageQueue(bool fEnable=true)
Включает/выключает очередь сообщений.
Definition: ilr_cpp_helpers.h:2179
void MfPowerOff()
Выключает RF поле считывателя (после выключения нужно подождать 10 мс).
Definition: ilr_cpp_helpers.h:2440
CAsyncCommand Begin_Disconnect()
Запускает асинхронную команду отключения от считывателя.
Definition: ilr_cpp_helpers.h:2211
static void End_WriteTemic(ilr_handle hCommand, size_t &nWritten)
Возвращает результат записи данных в карту Temic.
Definition: ilr_cpp_helpers.h:2558
bool GetCardInfo(ilr_card_info &rInfo) const
Возвращает информацию о карте в поле считывателя.
Definition: ilr_cpp_helpers.h:2237
static void End_AuthMfCard(ilr_handle hCommand, bool &fAuthOk)
Возвращает результат авторизации сектора карты.
Definition: ilr_cpp_helpers.h:2310
ILR_API ilr_status ILR_CALL ilr_set_options(const ilr_options *pOptions)
Устанавливает глобальные настройки библиотеки.
bool ilr_check_version()
Проверяет версию SDK.
Definition: ilreaders.h:753
ILR_API ilr_status ILR_CALL ilr_set_log_level(ilr_log_level nLevel)
Устанавливает уровень лога отладки.
ILR_API uint32_t ILR_CALL ilr_get_version()
Возвращает номер версии библиотеки.
ILR_API ilr_status ILR_CALL ilr_get_options(ilr_options *pOptions)
Возвращает глобальные настройки библиотеки.
void(ILR_CALL * ilr_logging_callback)(ilr_log_level nLevel, const char *pContext, const char *pMessage, void *pUserData)
Тип функции обратного вызова для получения сообщений лога отладки библиотеки.
Definition: ilreaders.h:370
ilr_status
Коды ошибок.
Definition: ilreaders.h:121
ILR_API ilr_status ILR_CALL ilr_set_log_callback(ilr_logging_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для лога отладки.
ILR_API ilr_status ILR_CALL ilr_reader_auth_mf_card(ilr_handle hReader, size_t nAddress, ilr_bool fKeyB, ilr_bool *pAuthOk)
Авторизует сектор карты Mifare Classic/Plus.
ILR_API ilr_status ILR_CALL ilr_reader_set_auto_scan(ilr_handle hReader, ilr_bool fEnable=ILR_TRUE, ilr_bool fWait=ILR_TRUE)
Включает/выключает автоматическое сканирование карт.
ILR_API ilr_status ILR_CALL ilr_reader_read_mf_plus(ilr_handle hReader, size_t nAddress, ilr_mf_block_data *pBuf, size_t nBlockCount, ilr_bool fOpenText=ILR_TRUE, size_t *pRead=nullptr)
Читает данные карты Mifare Plus SL3.
ILR_API ilr_status ILR_CALL ilr_reader_get_auto_scan(ilr_handle hReader, ilr_bool *pEnabled)
Возвращает флаг автоматическое сканирование карт.
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_temic(ilr_handle hReader, size_t nBlockIdx, const uint32_t *pData, size_t nBlockCount, ilr_bool fLock, int nScanParam, ilr_handle *pCommand)
Запускает асинхронную команду записи данных в карту Temic.
ILR_API ilr_status ILR_CALL ilr_reader_get_options(ilr_handle hReader, ilr_reader_options *pOptions)
Возвращает параметры считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_mf_power_off(ilr_handle hReader)
Выключает RF поле считывателя (после выключения нужно подождать 10 мс).
ILR_API ilr_status ILR_CALL ilr_reader_read_mf_classic(ilr_handle hReader, size_t nBlockIdx, ilr_mf_block_data *pBuf, size_t nBlockCount, size_t *pRead=nullptr)
Читает данные карты Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_mf_transfer(ilr_handle hReader, size_t nBlockIdx)
Записывает содержимое во временном регистре данных в блок-значение.
ILR_API ilr_status ILR_CALL ilr_reader_get_info(ilr_handle hReader, ilr_reader_info *pInfo)
Возвращает информацию о считывателе.
ILR_API ilr_status ILR_CALL ilr_reader_set_options(ilr_handle hReader, const ilr_reader_options *pOptions)
Устанавливает параметры считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_write_mf_ultralight(ilr_handle hReader, size_t nPageIdx, const uint32_t *pData, size_t nPageCount, size_t *pWritten=nullptr)
Пишет данные карты Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_begin_auth_mf_card2(ilr_handle hReader, size_t nAddress, ilr_bool fKeyB, uint32_t nKeys, ilr_handle *pCommand)
Запускает асинхронную команду авторизации сектора карты Mifare Classic / Plus. используя ключи в памя...
ILR_API ilr_status ILR_CALL ilr_reader_begin_auth_mf_card(ilr_handle hReader, size_t nAddress, ilr_bool fKeyB, ilr_handle *pCommand)
Запускает асинхронную команду авторизации сектора карты Mifare Classic / Plus используя ключ,...
ILR_API ilr_status ILR_CALL ilr_reader_begin_connect(ilr_handle hReader, ilr_bool fReconnect, ilr_handle *pCommand)
Запускает асинхронную команду подключения к считывателю.
ILR_API ilr_status ILR_CALL ilr_reader_end_auth_mf_card2(ilr_handle hCommand, int *pFoundIdx)
Возвращает результат авторизации сектора карты.
ILR_API ilr_status ILR_CALL ilr_reader_get_card_info(ilr_handle hReader, ilr_card_info *pInfo)
Возвращает информацию о карте в поле считывателя.
ILR_API ilr_status ILR_CALL ilr_get_reader(ilr_port_type nPortType, const char *pszPortName, ilr_handle *pReader)
Создаёт дескриптор считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_begin_mf_increment(ilr_handle hReader, size_t nBlockIdx, uint32_t nValue, ilr_handle *pCommand)
Увеличивает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных...
ILR_API ilr_status ILR_CALL ilr_reader_begin_mf_restore(ilr_handle hReader, size_t nBlockIdx, ilr_handle *pCommand)
Перемещает содержимое блока в регистр данных Mifare.
ILR_API ilr_status ILR_CALL ilr_reader_end_read_temic(ilr_handle hCommand, const uint **ppList, size_t *pRead)
Возвращает результат чтения данных из карты Temic.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_mf_ultralight(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи данных в карту Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_begin_scan(ilr_handle hReader, ilr_bool fReset, ilr_bool fPowerOff, ilr_handle *pCommand)
Запускает асинхронную команду поиска карты.
ILR_API ilr_status ILR_CALL ilr_reader_end_auth_mf_card(ilr_handle hCommand, ilr_bool *pAuthOk)
Возвращает результат авторизации сектора карты.
ILR_API ilr_status ILR_CALL ilr_reader_get_connection_status(ilr_handle hReader, ilr_connection_status *pStatus)
Возвращает состояние подключения к считывателю.
ILR_API ilr_status ILR_CALL ilr_reader_begin_mf_decrement(ilr_handle hReader, size_t nBlockIdx, uint32_t nValue, ilr_handle *pCommand)
Уменьшает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных.
ilr_reader_msg
Сообщение считывателя.
Definition: ilreaders.h:502
ILR_API ilr_status ILR_CALL ilr_reader_begin_reset_temic(ilr_handle hReader, ilr_handle *pCommand)
Запускает асинхронную команду сброса TRES.
ILR_API ilr_status ILR_CALL ilr_reader_mf_rr(ilr_handle hReader, ilr_bool fWakeUp, const ilr_card_uid &rUID, ilr_bool *pFound)
R+R(Request+Reselect(по известному номеру)).
ILR_API ilr_status ILR_CALL ilr_reader_mf_write_perso(ilr_handle hReader, uint32_t nAddress, const ilr_mf_plus_key &rKey)
Записывает ключи AES и всех блоков.
ILR_API ilr_status ILR_CALL ilr_reader_mf_commit_perso(ilr_handle hReader)
Переключает Mifare Plus в SL1 или SL3(если SL1 нет).
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_mf_pkey(ilr_handle hReader, size_t nIdx, ilr_bool fKeyB, const ilr_mf_plus_key *pKeys, size_t nCount, ilr_handle *pCommand)
Запускает асинхронную команду записи ключей аутентификации Mifare Plus в память считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_begin_read_mf_plus(ilr_handle hReader, size_t nAddress, size_t nBlockCount, ilr_bool fOpenText, ilr_handle *pCommand)
Запускает асинхронную команду чтения данных из карты Mifare Plus SL3.
ilr_mf_plus_sl
Уровень безопасности Mifare Plus.
Definition: ilreaders.h:570
ILR_API ilr_status ILR_CALL ilr_reader_auth_mf_card2(ilr_handle hReader, size_t nAddress, ilr_bool fKeyB, uint32_t nKeys=0xFFFF, int *pFoundIdx=nullptr)
Авторизует сектор карты Mifare Classic / Plus, используя ключи считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_mf_increment(ilr_handle hReader, size_t nBlockIdx, uint32_t nValue)
Увеличивает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных...
ILR_API ilr_status ILR_CALL ilr_reader_write_mf_pkey(ilr_handle hReader, size_t nIdx, ilr_bool fKeyB, const ilr_mf_plus_key *pKeys, size_t nCount, size_t *pWritten=nullptr)
Записывает ключи аутентификации Mifare Plus в память считывателя
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_mf_ckey(ilr_handle hReader, size_t nIdx, ilr_bool fKeyB, const ilr_mf_classic_key *pKeys, size_t nCount, ilr_handle *pCommand)
Запускает асинхронную команду записи ключей аутентификации Mifare Classic в память считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_scan_temic(ilr_handle hReader, int nScanParam=-1)
Ищет карту Temic в поле считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_mf_ultralight(ilr_handle hReader, size_t nPageIdx, const uint32_t *pData, size_t nPageCount, ilr_handle *pCommand)
Запускает асинхронную команду записи данных в карту Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_load_mf_ckey(ilr_handle hReader, const ilr_mf_classic_key &nKey)
Загружает ключ для авторизации сектора Mifare Classic / Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_read_temic(ilr_handle hReader, size_t nBlockIdx, uint32_t *pBuf, size_t nBlockCount, int nScanParam=-1, size_t *pRead=nullptr)
Читает данные карты Temic.
ILR_API ilr_status ILR_CALL ilr_reader_write_mf_ckey(ilr_handle hReader, size_t nIdx, ilr_bool fKeyB, const ilr_mf_classic_key *pKeys, size_t nCount, size_t *pWritten=nullptr)
Записывает ключи аутентификации Mifare Classic в память считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_end_read_mf_plus(ilr_handle hCommand, const ilr_mf_block_data **ppList, size_t *pRead)
Возвращает результат чтения данных из карты Mifare Plus SL3.
ILR_API ilr_status ILR_CALL ilr_reader_begin_set_auto_scan(ilr_handle hReader, ilr_bool fEnable, ilr_handle *pCommand)
Запускает асинхронную команду вкл/выкл автоматического сканирования карт.
ILR_API ilr_status ILR_CALL ilr_reader_mf_decrement(ilr_handle hReader, size_t nBlockIdx, uint32_t nValue)
Уменьшает содержимое блока-значения карты Mifare и сохраняет результат во временном регистре данных.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_mf_pkey(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи ключей аутентификации Mifare Plus в память считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_mf_plus(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи данных в карту Mifare Plus SL3.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_mf_classic(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи данных в карту Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_mf_plus(ilr_handle hReader, size_t nAddress, const ilr_mf_block_data *pData, size_t nBlockCount, ilr_bool fOpenText, ilr_handle *pCommand)
Запускает асинхронную команду записи данных в карту Mifare Plus SL3.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_mf_ckey(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи ключей аутентификации Mifare Classic в память считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_disconnect(ilr_handle hReader)
Отключается от считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_begin_scan_temic(ilr_handle hReader, int nScanParam, ilr_handle *pCommand)
Запускает асинхронную команду поиска карты Temic в поле считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_scan(ilr_handle hReader, ilr_bool fReset=ILR_FALSE, ilr_bool fPowerOff=ILR_TRUE)
Ищет карту в поле считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_end_read_mf_classic(ilr_handle hCommand, const ilr_mf_block_data **ppList, size_t *pRead)
Возвращает результат чтения данных из карты Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_begin_read_mf_ultralight(ilr_handle hReader, size_t nPageIdx, size_t nPageCount, ilr_handle *pCommand)
Запускает асинхронную команду чтения данных из карты Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_begin_disconnect(ilr_handle hReader, ilr_handle *pCommand)
Запускает асинхронную команду отключения от считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_set_message_callback(ilr_handle hReader, ilr_reader_message_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для уведомлений считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_reset_temic(ilr_handle hReader, ilr_bool fWait=ILR_TRUE)
Сброс TRES.
ILR_API ilr_status ILR_CALL ilr_reader_mf_halt(ilr_handle hReader)
Halt.
int64_t ilr_mf_classic_key
Ключ аутентификации Mifare Classic.
Definition: ilreaders.h:610
ILR_API ilr_status ILR_CALL ilr_reader_read_mf_ultralight(ilr_handle hReader, size_t nPageIdx, uint32_t *pBuf, size_t nPageCount, size_t *pRead=nullptr)
Читает данные карты Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_load_temic_password(ilr_handle hReader, const int64_t &nPassword)
Загружает пароль Temic в память объекта считывателя.
ILR_API ilr_status ILR_CALL ilr_reader_mf_restore(ilr_handle hReader, size_t nBlockIdx)
Перемещает содержимое блока в регистр данных Mifare.
ILR_API ilr_status ILR_CALL ilr_reader_begin_read_mf_classic(ilr_handle hReader, size_t nBlockIdx, size_t nBlockCount, ilr_handle *pCommand)
Запускает асинхронную команду чтения данных из карты Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_end_read_mf_ultralight(ilr_handle hCommand, const uint32_t **ppList, size_t *pRead)
Возвращает результат чтения данных из карты Mifare Ultralight.
ILR_API ilr_status ILR_CALL ilr_reader_end_write_temic(ilr_handle hCommand, size_t *pWritten)
Возвращает результат записи данных в карту Temic.
ILR_API ilr_status ILR_CALL ilr_reader_mf_rats(ilr_handle hReader, uint8_t *pAtsBuf=nullptr, size_t *pSize=nullptr)
Переходит на ISO 14443-4.
ILR_API ilr_status ILR_CALL ilr_reader_get_message(ilr_handle hReader, ilr_reader_msg *pMsg, const void **pMsgData, ilr_bool *pFound)
Извлекает следующее сообщение из очереди.
ILR_API ilr_status ILR_CALL ilr_reader_begin_write_mf_classic(ilr_handle hReader, size_t nBlockIdx, const ilr_mf_block_data *pData, size_t nBlockCount, ilr_handle *pCommand)
Запускает асинхронную команду записи данных в карту Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_begin_read_temic(ilr_handle hReader, size_t nBlockIdx, size_t nBlockCount, int nScanParam, ilr_handle *pCommand)
Запускает асинхронную команду чтения данных из карты Temic.
ILR_API ilr_status ILR_CALL ilr_reader_load_mf_pkey(ilr_handle hReader, const ilr_mf_plus_key &rKey)
Загружает ключ для авторизации сектора Mifare Plus SL3.
ILR_API ilr_status ILR_CALL ilr_reader_enable_message_queue(ilr_handle hReader, ilr_bool fEnable=ILR_TRUE)
Включает/выключает очередь сообщений.
ILR_API ilr_status ILR_CALL ilr_reader_connect(ilr_handle hReader, ilr_bool fReconnect=ILR_FALSE)
Подключается к считывателю.
ILR_API ilr_status ILR_CALL ilr_reader_mf_ras(ilr_handle hReader, ilr_bool fWakeUp, uint8_t *pSAK, uint16_t *pATQ, ilr_card_uid *pUID, ilr_bool *pFound)
R+A+S(Request+Anticollision+Select)
ILR_API ilr_status ILR_CALL ilr_reader_set_scan_temic(ilr_handle hReader, ilr_bool fEnable=ILR_TRUE)
Вкл/выкл сканирование карт Temic (для Z-2 Rd-All и Z-2 EHR).
ILR_API ilr_status ILR_CALL ilr_reader_get_scan_temic(ilr_handle hReader, ilr_bool *pEnable)
Возвращает True если сканирование Temic включено.
void(ILR_CALL * ilr_reader_message_callback)(ilr_reader_msg nMsg, const void *pMsgData, void *pUserData)
Тип функции обратного вызова для получения уведомлений от дескриптора считывателя.
Definition: ilreaders.h:535
ILR_API ilr_status ILR_CALL ilr_reader_write_temic(ilr_handle hReader, size_t nBlockIdx, const uint32_t *pData, size_t nBlockCount, ilr_bool fLock=ILR_FALSE, int nScanParam=-1, size_t *pWritten=nullptr)
Пишет данные карты Temic.
ILR_API ilr_status ILR_CALL ilr_reader_begin_mf_transfer(ilr_handle hReader, size_t nBlockIdx, ilr_handle *pCommand)
Записывает содержимое во временном регистре данных в блок-значение.
ILR_API ilr_status ILR_CALL ilr_reader_write_mf_classic(ilr_handle hReader, size_t nBlockIdx, const ilr_mf_block_data *pData, size_t nBlockCount, size_t *pWritten=nullptr)
Пишет данные карты Mifare Classic или Mifare Plus SL1.
ILR_API ilr_status ILR_CALL ilr_reader_write_mf_plus(ilr_handle hReader, size_t nAddress, const ilr_mf_block_data *pData, size_t nBlockCount, ilr_bool fOpenText=ILR_TRUE, size_t *pWritten=nullptr)
Пишет данные карты Mifare Plus SL3.
ilr_connection_status
Состояние подключения к считывателю.
Definition: ilreaders.h:542
@ ILR_MF_PLUS_TYPE_SIZE
Размер списка.
Definition: ilreaders.h:589
ILR_API ilr_status ILR_CALL ilr_search_set_options(ilr_handle hSearch, const ilr_search_options *pOptions)
Устанавливает параметры поиска считывателей.
ILR_API ilr_status ILR_CALL ilr_search_get_options(ilr_handle hSearch, ilr_search_options *pOptions)
Возвращает параметры поиска считывателей.
void(ILR_CALL * ilr_search_message_callback)(ilr_search_msg nMsg, const void *pMsgData, void *pUserData)
Тип функции обратного вызова для получения уведомлений от дескриптора поиска.
Definition: ilreaders.h:444
ILR_API ilr_status ILR_CALL ilr_search_begin_scan(ilr_handle hSearch, ilr_bool fReset, ilr_handle *pCommand)
Запускает асинхронную команду поиска считывателей.
ILR_API ilr_status ILR_CALL ilr_search_enable_message_queue(ilr_handle hSearch, ilr_bool fEnable=ILR_TRUE)
Включает/выключает очередь сообщений.
ILR_API ilr_status ILR_CALL ilr_search_begin_set_auto_scan(ilr_handle hSearch, ilr_bool fEnable, ilr_handle *pCommand)
Запускает асинхронную команду вкл/выкл режим авто поиска считывателей.
ILR_API ilr_status ILR_CALL ilr_search_get_message(ilr_handle hSearch, ilr_search_msg *pMsg, const void **pMsgData, ilr_bool *pFound)
Извлекает следующее сообщение из очереди.
ILR_API ilr_status ILR_CALL ilr_set_filter_port_callback(ilr_filter_port_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для фильтрации портов при поиске считывателей.
ILR_API ilr_status ILR_CALL ilr_search_scan(ilr_handle hSearch, ilr_bool fReset=ILR_FALSE)
Ищет считыватели.
ILR_API ilr_status ILR_CALL ilr_search_set_message_callback(ilr_handle hSearch, ilr_search_message_callback pCallback, void *pUserData=nullptr)
Устанавливает функцию обратного вызова для уведомлений поиска считывателей.
ILR_API ilr_status ILR_CALL ilr_search_get_auto_scan(ilr_handle hSearch, ilr_bool *pEnabled)
Возвращает флаг авто поиска считывателей.
ilr_bool(ILR_CALL * ilr_filter_port_callback)(ilr_port_type nPortType, const char *pszPortName, void *pUserData)
Тип функции обратного вызова для фильтрации портов при поиске считывателей.
Definition: ilreaders.h:403
ILR_API ilr_status ILR_CALL ilr_get_search(ilr_handle *pSearch)
Создаёт дескриптор поиска считывателей.
ILR_API ilr_status ILR_CALL ilr_search_get_reader_info(ilr_handle hSearch, size_t nIdx, ilr_reader_info *pInfo)
Возвращает информацию о найденном считывателе.
ILR_API ilr_status ILR_CALL ilr_search_get_reader_count(ilr_handle hSearch, size_t *pCount)
Возвращает количество найденных считывателей.
ilr_search_msg
Сообщение поиска считывателей.
Definition: ilreaders.h:410
ILR_API ilr_status ILR_CALL ilr_search_set_listen_ports(ilr_handle hSearch, const uint16_t *pPorts, size_t nCount)
Устанавливает список портов для прослушки конвертеров к режиме "Клиент".
ILR_API ilr_status ILR_CALL ilr_search_set_auto_scan(ilr_handle hSearch, ilr_bool fEnable=ILR_TRUE, ilr_bool fWait=ILR_TRUE)
Включает/выключает авто поиск считывателей.
size_t GetMfSectorByBlock(size_t nBlockIdx)
Возвращает номер сектора по номеру блока карты Mifare Classic/Plus.
Definition: ilr_cpp_helpers.h:2892
size_t GetMfSectorBlockCount(size_t nSectorIdx)
Возвращает количество блоков в секторе.
Definition: ilr_cpp_helpers.h:2914
void SetMfClassicKey(ilr_mf_block_data &rTrailerData, bool fKeyB, const ilr_mf_classic_key &nKey)
Устанавливает ключ аутентификации в блок-прицеп Mifare Classic.
Definition: ilr_cpp_helpers.h:3000
size_t GetNumberOfMfBlocks(uint32_t nMemSize)
Вычисляет количество блоков карты Mifare Classic/Plus по размеру её памяти.
Definition: ilr_cpp_helpers.h:2881
auto since(std::chrono::time_point< clock_t, duration_t > const &start)
Возвращает интервал времени в миллисекундах от времени start до текущего времени.
Definition: ilr_cpp_helpers.h:2802
std::chrono::steady_clock::time_point now()
Definition: ilr_cpp_helpers.h:2791
CMifareClassicKey GetMfClassicKey(const ilr_mf_block_data &rTrailerData, bool fKeyB)
Извлекает ключ аутентификации из блока-прицепа Mifare Classic.
Definition: ilr_cpp_helpers.h:2989
size_t GetMfBlockBySector(size_t nSectorIdx)
Возвращает номер блока по номеру сектора.
Definition: ilr_cpp_helpers.h:2903
Заголовочный файл API SDK Readers.
ILR_API ilr_status ILR_CALL ilr_search_open_port(ilr_handle hSearch, ilr_port_type nPortType, const char *pszPortName, ilr_reader_info *pInfo, int *pPort)
Открывает порт и возвращает его дескриптор.
ILR_API ilr_status ILR_CALL ilr_command_get_status(ilr_handle hCommand, ilr_status *pStatus)
Возвращает состояние команды.
void * ilr_handle
Definition: ilreaders.h:108
ILR_API ilr_status ILR_CALL ilr_search_begin_close_port(ilr_handle hSearch, ilr_port_type nPortType, const char *pszPortName, int hPortFD, ilr_handle *pCommand)
Запускает асинхронную команду закрытия порта.
ILR_API ilr_status ILR_CALL ilr_search_get_listen_status(ilr_handle hSearch, uint16_t nTcpPort, ilr_status *pStatus)
Возвращает состояние Tcp-порта, открытого для прослушки конвертеров в режиме "Клиент".
ILR_API ilr_status ILR_CALL ilr_search_begin_open_port(ilr_handle hSearch, ilr_port_type nPortType, const char *pszPortName, ilr_handle *pCommand)
Запускает асинхронную команду открытия порта.
ILR_API ilr_status ILR_CALL ilr_search_close_port(ilr_handle hSearch, ilr_port_type nPortType, const char *pszPortName, int hPort)
Закрывает порт.
ILR_API ilr_status ILR_CALL ilr_clone_handle(ilr_handle h, ilr_handle *pNewHandle)
Клонирует дескриптор поиска считывателей или дескриптор считывателя.
ILR_API ilr_status ILR_CALL ilr_search_end_open_port(ilr_handle hCommand, int *pPortFD, ilr_reader_info *pInfo)
Возвращает результат открытия порта.
ILR_API ilr_status ILR_CALL ilr_encode_temic_emmarine(const ilr_card_uid &rUID, uint32_t *pBuf3, size_t nBlockCount)
Кодирует данные для эмуляции Em-Marine, для записи в блоки 0..2.
ILR_API ilr_status ILR_CALL ilr_command_get_progress(ilr_handle hCommand, size_t *pCurrent, size_t *pTotal)
Возвращает состояние прогресса выполнения команды.
ILR_API ilr_status ILR_CALL ilr_decode_temic_emmarine(const uint32_t *pData3, size_t nBlockCount, ilr_card_uid *pUID, ilr_bool *pConfigOk=nullptr)
Декодирует номер Em-Marine из данных блоков 0..2 карты Temic.
ilr_bool
Definition: ilreaders.h:111
ILR_API ilr_status ILR_CALL ilr_command_cancel(ilr_handle hCommand)
Отменяет команду. Устанавливает статус ILR_E_ABORT.
ILR_API ilr_status ILR_CALL ilr_encode_temic_hid(const ilr_card_uid &rUID, uint32_t *pBuf4, size_t nBlockCount, int nWiegand)
Кодирует данные для эмуляции HID, для записи в блоки 0..3.
ilr_log_level
Уровень лога.
Definition: ilreaders.h:319
ilr_card_type
Тип карты.
Definition: ilreaders.h:261
@ ILR_CARD_TYPE_SIZE
Размер списка.
Definition: ilreaders.h:286
ilr_port_type
Definition: ilreaders.h:243
@ ILR_PORT_TYPE_SIZE
Definition: ilreaders.h:257
ilr_reader_model
Модель считывателя.
Definition: ilreaders.h:211
@ ILR_READER_MODEL_SIZE
Definition: ilreaders.h:239
ILR_API ilr_status ILR_CALL ilr_decode_temic_hid(const uint32_t *pData4, size_t nBlockCount, ilr_card_uid *pUID, int *pWiegand, ilr_bool *pConfigOk=nullptr)
Декодирует номер HID из данных блоков 0..3 карты Temic.
Информация о карте.
Definition: ilreaders.h:596
ilr_card_uid rUID
Номер карты.
Definition: ilreaders.h:598
Данные блока Mifare Classic/Plus.
Definition: ilreaders.h:631
uint8_t a[16]
Байты блока.
Definition: ilreaders.h:632
Ключ аутентификации Mifare Plus.
Definition: ilreaders.h:616
uint8_t a[16]
Байты ключа.
Definition: ilreaders.h:618
uint64_t hi
Старшая часть ключа.
Definition: ilreaders.h:622
uint64_t lo
Младшая часть ключа.
Definition: ilreaders.h:621
Настройки библиотеки.
Definition: ilreaders.h:378
Информация о считывателе.
Definition: ilreaders.h:295
Настройки считывателя.
Definition: ilreaders.h:663
Настройки поиска считывателей.
Definition: ilreaders.h:474