LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
osdpreaderunit.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_OSDPREADERUNIT_HPP
8#define LOGICALACCESS_OSDPREADERUNIT_HPP
9
14
15namespace logicalaccess
16{
17class Profile;
18class OSDPRReaderProvider;
19
23class LLA_READERS_OSDP_API OSDPReaderUnit : public ReaderUnit
24{
25 public:
30
34 virtual ~OSDPReaderUnit();
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
81 bool waitKeypadInputs(unsigned int maxwait);
82
87 std::shared_ptr<Chip> getSingleChip() override;
88
93 std::vector<std::shared_ptr<Chip>> getChipList() override;
94
102 bool connect() override;
103
110 void disconnect() override;
111
116 bool isConnected() override;
117
122 bool connectToReader() override;
123
127 void disconnectFromReader() override;
128
133 std::string getReaderSerialNumber() override;
134
139 void serialize(boost::property_tree::ptree &parentNode) override;
140
145 void unSerialize(boost::property_tree::ptree &node) override;
146
147 std::shared_ptr<Chip> createChip(std::string type) override;
148
153 std::shared_ptr<OSDPReaderUnitConfiguration> getOSDPConfiguration()
154 {
155 return std::dynamic_pointer_cast<OSDPReaderUnitConfiguration>(getConfiguration());
156 }
157
158
159 void checkPDAuthentication(std::shared_ptr<OSDPChannel> challenge);
160
161 std::shared_ptr<LCDDisplay> getLCDDisplay() override;
162
163 std::shared_ptr<LEDBuzzerDisplay> getLEDBuzzerDisplay() override;
164
165 std::shared_ptr<OSDPCommands> &getOSDPCommands()
166 {
167 return m_commands;
168 }
169
170 void onCardEvent(uint8_t readerAddress, ByteVector data, uint16_t bitCount);
171
172 void onKeypadEvent(uint8_t readerAddress, ByteVector data, uint16_t bitCount);
173
174 void onTamperEvent(bool tamperStatus, bool powerFailure);
175
176 bool getTamperStatus() const
177 {
178 return m_tamperStatus;
179 }
180
182 {
183 return m_last_keypad;
184 }
185
186 private:
187 std::shared_ptr<OSDPCommands> m_commands;
188
190
192
194
196};
197}
198
199#endif
The OSDP reader unit class.
Definition: osdpreaderunit.hpp:24
bool m_tamperStatus
Definition: osdpreaderunit.hpp:195
std::shared_ptr< OSDPCommands > & getOSDPCommands()
Definition: osdpreaderunit.hpp:165
ByteVector m_current_csn
Definition: osdpreaderunit.hpp:191
ByteVector getLastKeypadInputs() const
Definition: osdpreaderunit.hpp:181
std::shared_ptr< OSDPCommands > m_commands
Definition: osdpreaderunit.hpp:187
bool m_inserted
Definition: osdpreaderunit.hpp:189
ByteVector m_last_keypad
Definition: osdpreaderunit.hpp:193
std::shared_ptr< OSDPReaderUnitConfiguration > getOSDPConfiguration()
Get the STidSTR reader unit configuration.
Definition: osdpreaderunit.hpp:153
bool getTamperStatus() const
Definition: osdpreaderunit.hpp:176
The card types.
Definition: readerunit.hpp:42
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
OSDP channel.
OSDP commands.
STidSTR Reader unit configuration.
Reader unit.