LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
ok5553readerunit.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_OK5553READERUNIT_HPP
8#define LOGICALACCESS_OK5553READERUNIT_HPP
9
13#include <logicalaccess/plugins/readers/ok5553/lla_readers_ok5553_api.hpp>
14#include <boost/asio/ip/tcp.hpp>
15
16namespace logicalaccess
17{
18class Profile;
19class OK5553ReaderCardAdapter;
20class OK5553ReaderProvider;
21
25typedef enum { MIFARE = 0x02, MIFAREULTRALIGHT = 0x05, DESFIRE = 0x06 } ChipType;
26
30class LLA_READERS_OK5553_API OK5553ReaderUnit : public ReaderUnit
31{
32 public:
37
41 virtual ~OK5553ReaderUnit();
42
47 std::string getName() const override;
48
53 std::string getConnectedName() override;
54
59 void setCardType(std::string cardType) override;
60
70 bool waitInsertion(unsigned int maxwait) override;
71
80 bool waitRemoval(unsigned int maxwait) override;
81
87 std::shared_ptr<Chip> createChip(std::string type) override;
88
93 std::shared_ptr<Chip> getSingleChip() override;
94
99 std::vector<std::shared_ptr<Chip>> getChipList() override;
100
105 std::shared_ptr<Chip> getChipInAir(unsigned int maxwait = 2000);
106
111 virtual std::shared_ptr<OK5553ReaderCardAdapter> getDefaultOK5553ReaderCardAdapter();
112
120 bool connect() override;
121
128 void disconnect() override;
129
134 bool isConnected() override;
135
140 bool connectToReader() override;
141
145 void disconnectFromReader() override;
146
151 std::string getReaderSerialNumber() override;
152
157 void serialize(boost::property_tree::ptree &parentNode) override;
158
163 void unSerialize(boost::property_tree::ptree &node) override;
164
169 std::shared_ptr<OK5553ReaderUnitConfiguration> getOK5553Configuration()
170 {
171 return std::dynamic_pointer_cast<OK5553ReaderUnitConfiguration>(
172 getConfiguration());
173 }
174
179 std::shared_ptr<OK5553ReaderProvider> getOK5553ReaderProvider() const;
180
186 static ByteVector asciiToHex(const ByteVector &source);
187
192 ByteVector reqA();
193
198 ByteVector rats();
199
200 protected:
205
211};
212}
213
214#endif
The OK5553 reader unit class.
Definition: ok5553readerunit.hpp:31
std::shared_ptr< OK5553ReaderUnitConfiguration > getOK5553Configuration()
Get the OK5553 reader unit configuration.
Definition: ok5553readerunit.hpp:169
ByteVector removalIdentifier
The new identifier that will be used for the next waitInsertion after the waitRemoval.
Definition: ok5553readerunit.hpp:210
ByteVector d_successedRATS
Last successed RATS result.
Definition: ok5553readerunit.hpp:204
The card types.
Definition: readerunit.hpp:42
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
ChipType
ChipType code in OK5553 protocol.
Definition: ok5553readerunit.hpp:25
@ MIFARE
Definition: ok5553readerunit.hpp:25
@ MIFAREULTRALIGHT
Definition: ok5553readerunit.hpp:25
@ DESFIRE
Definition: ok5553readerunit.hpp:25
OK55553 Reader unit configuration.
Reader unit.
A serial port class.