LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
keyboardreaderunit.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_KEYBOARDREADERUNIT_HPP
8#define LOGICALACCESS_KEYBOARDREADERUNIT_HPP
9
13#include <logicalaccess/plugins/readers/keyboard/lla_readers_private_keyboard_api.hpp>
14
15namespace logicalaccess
16{
17class Profile;
18class KeyboardReaderProvider;
19
23class LLA_READERS_PRIVATE_KEYBOARD_API KeyboardReaderUnit : public ReaderUnit
24{
25 public:
30
34 virtual ~KeyboardReaderUnit();
35
40 std::string getName() const override;
41
46 std::string getConnectedName() override;
47
52 void setCardType(std::string cardType) override;
53
63 bool waitInsertion(unsigned int maxwait) override;
64
73 bool waitRemoval(unsigned int maxwait) override;
74
80 std::shared_ptr<Chip> createChip(std::string type) override;
81
86 std::shared_ptr<Chip> getSingleChip() override;
87
92 std::vector<std::shared_ptr<Chip>> getChipList() override;
93
101 bool connect() override;
102
109 void disconnect() override;
110
115 bool isConnected() override;
116
121 bool connectToReader() override;
122
126 void disconnectFromReader() override;
127
132 std::string getReaderSerialNumber() override;
133
138 void serialize(boost::property_tree::ptree &parentNode) override;
139
144 void unSerialize(boost::property_tree::ptree &node) override;
145
150 std::shared_ptr<KeyboardReaderUnitConfiguration> getKeyboardConfiguration()
151 {
152 return std::dynamic_pointer_cast<KeyboardReaderUnitConfiguration>(
153 getConfiguration());
154 }
155
160 std::shared_ptr<KeyboardReaderProvider> getKeyboardReaderProvider() const;
161
168 ByteVector getChipInAir(unsigned int maxwait);
169
170 bool waitInputChar(char &c, unsigned int maxwait) const;
171
172 void setKeyboard(const std::string &devicename, unsigned int vendorId,
173 unsigned int productId);
174
175 unsigned int getVendorId() const;
176
177 unsigned int getProductId() const;
178
179 protected:
180 std::string d_devicename;
181
182 unsigned int d_vendorId;
183
184 unsigned int d_productId;
185
187
189};
190}
191
192#endif
The Keyboard reader unit class.
Definition: keyboardreaderunit.hpp:24
std::string d_devicename
Definition: keyboardreaderunit.hpp:180
ByteVector d_removalIdentifier
Definition: keyboardreaderunit.hpp:186
unsigned int d_productId
Definition: keyboardreaderunit.hpp:184
std::shared_ptr< KeyboardReaderUnitConfiguration > getKeyboardConfiguration()
Get the Elatec reader unit configuration.
Definition: keyboardreaderunit.hpp:150
unsigned int d_vendorId
Definition: keyboardreaderunit.hpp:182
bool d_instanceConnected
Definition: keyboardreaderunit.hpp:188
The card types.
Definition: readerunit.hpp:42
Keyboard Reader unit configuration.
Keyboard shared struct.
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
Reader unit.