LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
omnikeyxx21readerunit.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_OMNIKEYXX21READERUNIT_HPP
8#define LOGICALACCESS_OMNIKEYXX21READERUNIT_HPP
9
13
14#include <string>
15#include <vector>
16#include <iostream>
17#include <cassert>
18
19namespace logicalaccess
20{
24class LLA_READERS_PCSC_API OmnikeyXX21ReaderUnit : public OmnikeyReaderUnit
25{
26 public:
33 {
35 {
36 assert(st == READ || st == WRITE || st == DISABLED);
37 value_ = st;
38 }
39
40 enum
41 {
44 DISABLED
45 };
46
47 explicit operator bool() const
48 {
49 return value_ != DISABLED;
50 }
51
52 explicit operator int() const
53 {
54 return value_;
55 }
56
57 LLA_READERS_PCSC_API friend std::ostream &operator<<(std::ostream &os,
58 const SecureModeStatus &s);
59
60 private:
61 int value_;
62 };
66 explicit OmnikeyXX21ReaderUnit(const std::string &name);
67
71 virtual ~OmnikeyXX21ReaderUnit();
72
73 ReaderServicePtr getService(const ReaderServiceType &type) override;
74
78 SecureModeStatus getSecureConnectionStatus();
79
83 void setSecureConnectionStatus(SecureModeStatus st);
84
89 void setSecureConnectionStatus(int v);
90
91
96 PCSCReaderUnitType getPCSCType() const override;
97
106 bool waitRemoval(unsigned int maxwait) override;
107
113 std::shared_ptr<ReaderCardAdapter> getReaderCardAdapter(std::string type) override;
114
119 std::shared_ptr<OmnikeyXX21ReaderUnitConfiguration> getOmnikeyXX21Configuration()
120 {
121 return std::dynamic_pointer_cast<OmnikeyXX21ReaderUnitConfiguration>(
122 getPCSCConfiguration());
123 }
124
130 void changeReaderKey(std::shared_ptr<ReaderMemoryKeyStorage> keystorage,
131 const ByteVector &key) override;
132
140 void getT_CL_ISOType(bool &isTypeA, bool &isTypeB) override;
141
147 void setCardTechnologies(const TechnoBitset &bitset) override;
148
154 TechnoBitset getCardTechnologies() override;
155
156 TechnoBitset getPossibleCardTechnologies() override;
157
158 protected:
164 static std::map<std::string, SecureModeStatus> secure_connection_status_;
165
166 private:
175 bool fetchCardTechoLinux(const std::vector<std::string> &lines,
176 const std::string &techno);
177
181 bool replaceCardTechnoLinux(std::vector<std::string> &lines,
182 const std::map<std::string, bool> technos);
183};
184}
185
186#endif
The Omnikey reader unit base class.
Definition: omnikeyreaderunit.hpp:23
The Omnikey XX21 reader unit class.
Definition: omnikeyxx21readerunit.hpp:25
std::shared_ptr< OmnikeyXX21ReaderUnitConfiguration > getOmnikeyXX21Configuration()
Get the Omnikey XX21 reader unit configuration.
Definition: omnikeyxx21readerunit.hpp:119
static std::map< std::string, SecureModeStatus > secure_connection_status_
Is secure connection mode ?
Definition: omnikeyxx21readerunit.hpp:164
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
PCSCReaderUnitType
The reader unit types.
Definition: pcscreaderunitconfiguration.hpp:54
ReaderServiceType
Definition: reader_service.hpp:10
LLA_CORE_API std::ostream & operator<<(std::ostream &os, const Key &key)
Output to stream operator.
Definition: key.cpp:298
uint32_t TechnoBitset
Definition: techno.hpp:25
std::shared_ptr< ReaderService > ReaderServicePtr
Definition: lla_fwd.hpp:67
Omnikey Reader unit.
Omnikey XX21 Reader unit configuration.
Reader/card adapter.
Definition: omnikeyxx21readerunit.hpp:33
SecureModeStatus(int st)
Definition: omnikeyxx21readerunit.hpp:34
int value_
Definition: omnikeyxx21readerunit.hpp:61
@ WRITE
Definition: omnikeyxx21readerunit.hpp:43
@ READ
Definition: omnikeyxx21readerunit.hpp:42