LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
iso7816readerunitconfiguration.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_ISO7816READERUNITCONFIGURATION_HPP
8#define LOGICALACCESS_ISO7816READERUNITCONFIGURATION_HPP
9
11#include <logicalaccess/plugins/readers/iso7816/lla_readers_iso7816_api.hpp>
12
13namespace logicalaccess
14{
15#define READER_ISO7816 "iso7816"
16
17class DESFireKey;
18
22class LLA_READERS_ISO7816_API ISO7816ReaderUnitConfiguration
24{
25 public:
30
35 explicit ISO7816ReaderUnitConfiguration(std::string rpt);
36
41
45 void resetConfiguration() override;
46
51 void setSAMType(std::string t);
52
56 std::string getSAMType() const;
57
62 void setSAMReaderName(std::string t);
63
67 std::string getSAMReaderName() const;
68
73 void serialize(boost::property_tree::ptree &parentNode) override;
74
79 void unSerialize(boost::property_tree::ptree &node) override;
80
85 std::string getDefaultXmlNodeName() const override;
86
91 void setSAMUnlockKey(std::shared_ptr<DESFireKey> key, unsigned char keyno)
92 {
93 d_sam_key_unlock = key;
94 d_keyno_unlock = keyno;
95 }
96
100 std::shared_ptr<DESFireKey> getSAMUnLockKey() const
101 {
102 return d_sam_key_unlock;
103 }
104
108 unsigned char getSAMUnLockkeyNo() const
109 {
110 return d_keyno_unlock;
111 }
112
114 {
115 return d_check_sam_reader_available;
116 }
117
119 {
120 d_check_sam_reader_available = check;
121 }
122
124 {
125 return d_auto_connect_sam_reader;
126 }
127
128 void setAutoConnectToSAMReader(bool auto_connect)
129 {
130 d_auto_connect_sam_reader = auto_connect;
131 }
132
133 bool getSkipCSN() const
134 {
135 return d_skipCSN;
136 }
137
138 void setSkipCSN(bool skipCSN)
139 {
140 d_skipCSN = skipCSN;
141 }
142
143 protected:
147 std::string d_sam_type;
148
152 std::string d_sam_reader_name;
153
157 std::shared_ptr<DESFireKey> d_sam_key_unlock;
158
162 unsigned char d_keyno_unlock;
163
169
174
179};
180}
181
182#endif
The PC/SC reader unit configuration base class.
Definition: iso7816readerunitconfiguration.hpp:24
bool d_auto_connect_sam_reader
Auto-connect to SAM reader at reader connection.
Definition: iso7816readerunitconfiguration.hpp:173
bool d_check_sam_reader_available
Check associated SAM reader is available before use.
Definition: iso7816readerunitconfiguration.hpp:168
bool getCheckSAMReaderIsAvailable() const
Definition: iso7816readerunitconfiguration.hpp:113
unsigned char getSAMUnLockkeyNo() const
Get SAM Security Check KeyNo.
Definition: iso7816readerunitconfiguration.hpp:108
void setCheckSAMReaderIsAvailable(bool check)
Definition: iso7816readerunitconfiguration.hpp:118
void setSkipCSN(bool skipCSN)
Definition: iso7816readerunitconfiguration.hpp:138
bool d_skipCSN
Skip to get CSN.
Definition: iso7816readerunitconfiguration.hpp:178
bool getAutoConnectToSAMReader() const
Definition: iso7816readerunitconfiguration.hpp:123
void setSAMUnlockKey(std::shared_ptr< DESFireKey > key, unsigned char keyno)
Set the SAM Key and Keyno for check if the SAM is the SAM we are waiting and for AV2 enable communica...
Definition: iso7816readerunitconfiguration.hpp:91
std::shared_ptr< DESFireKey > getSAMUnLockKey() const
Get SAM Security Check Key.
Definition: iso7816readerunitconfiguration.hpp:100
void setAutoConnectToSAMReader(bool auto_connect)
Definition: iso7816readerunitconfiguration.hpp:128
bool getSkipCSN() const
Definition: iso7816readerunitconfiguration.hpp:133
std::string d_sam_reader_name
The SAM reader name.
Definition: iso7816readerunitconfiguration.hpp:152
unsigned char d_keyno_unlock
The SAM Key to see if it is the SAM we are waiting.
Definition: iso7816readerunitconfiguration.hpp:162
std::string d_sam_type
The SAM type.
Definition: iso7816readerunitconfiguration.hpp:147
std::shared_ptr< DESFireKey > d_sam_key_unlock
The SAM Key to see if it is the SAM we are waiting.
Definition: iso7816readerunitconfiguration.hpp:157
The reader unit configuration base class. Describe the configuration for a reader unit.
Definition: readerunitconfiguration.hpp:20
Definition: asn1.hpp:9
Reader unit configuration.