LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
mifarestidstrcommands.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_MIFARESTIDSTRCOMMANDS_HPP
8#define LOGICALACCESS_MIFARESTIDSTRCOMMANDS_HPP
9
12
13#include <string>
14#include <vector>
15#include <iostream>
16
17namespace logicalaccess
18{
19#define CMD_MIFARESTIDSTR "MifareSTidSTR"
20
24class LLA_READERS_STIDSTR_API MifareSTidSTRCommands : public MifareCommands
25{
26 public:
31
32 explicit MifareSTidSTRCommands(std::string ct);
33
37 virtual ~MifareSTidSTRCommands();
38
43 std::shared_ptr<STidSTRReaderCardAdapter> getSTidSTRReaderCardAdapter() const
44 {
45 return std::dynamic_pointer_cast<STidSTRReaderCardAdapter>(
46 getReaderCardAdapter());
47 }
48
53 ByteVector scanMifare() const;
54
58 void releaseRFIDField() const;
59
66 void loadKey(std::shared_ptr<Location> location, MifareKeyType keytype,
67 std::shared_ptr<MifareKey> key) override;
68
77 bool loadKey(unsigned char keyno, MifareKeyType keytype,
78 std::shared_ptr<MifareKey> key, bool vol = true) override;
79
86 void authenticate(unsigned char blockno, unsigned char keyno,
87 MifareKeyType keytype) override;
88
95 void authenticate(unsigned char blockno, std::shared_ptr<KeyStorage> key_storage,
96 MifareKeyType keytype) override;
97
106 ByteVector readBinary(unsigned char blockno, size_t len) override;
107
115 void updateBinary(unsigned char blockno, const ByteVector &buf) override;
116
122 void increment(unsigned char blockno, uint32_t value) override;
123
129 void decrement(unsigned char blockno, uint32_t value) override;
130
131 protected:
141 virtual ByteVector readBinaryIndex(unsigned char keyindex, unsigned char blockno,
142 size_t len);
143
152 virtual void updateBinaryIndex(unsigned char keyindex, unsigned char blockno,
153 const ByteVector &buf);
154
159
163 unsigned char d_skbIndex;
164
169};
170}
171
172#endif /* LOGICALACCESS_MIFARESTIDSTRCOMMANDS_H */
The Mifare commands class.
Definition: mifarecommands.hpp:24
The Mifare commands class for STidSTR reader.
Definition: mifarestidstrcommands.hpp:25
std::shared_ptr< STidSTRReaderCardAdapter > getSTidSTRReaderCardAdapter() const
Get the STidSTR reader/card adapter.
Definition: mifarestidstrcommands.hpp:43
bool d_useSKB
Use SKB for read/write operation, or not.
Definition: mifarestidstrcommands.hpp:158
MifareKeyType d_lastKeyType
The last key type used;.
Definition: mifarestidstrcommands.hpp:168
unsigned char d_skbIndex
The SKB key index if SKB use.
Definition: mifarestidstrcommands.hpp:163
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Mifare commands.
Definition: asn1.hpp:9
MifareKeyType
Mifare Key Type.
Definition: mifareaccessinfo.hpp:18
Default STidSTR reader/card adapter.