LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
desfirestoragecardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_DESFIRESTORAGECARDSERVICE_HPP
8#define LOGICALACCESS_DESFIRESTORAGECARDSERVICE_HPP
9
12
13namespace logicalaccess
14{
15class DESFireChip;
16
17#define STORAGE_CARDSERVICE_DESFIRE "DESFireStorage"
18
22class LLA_CARDS_DESFIRE_API DESFireStorageCardService : public StorageCardService
23{
24 public:
29 explicit DESFireStorageCardService(std::shared_ptr<Chip> chip);
30
31 std::string getCSType() override
32 {
34 }
35
39 virtual void erase();
40
48 void erase(std::shared_ptr<Location> location,
49 std::shared_ptr<AccessInfo> aiToUse) override;
50
59 void writeData(std::shared_ptr<Location> location,
60 std::shared_ptr<AccessInfo> aiToUse,
61 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
62 CardBehavior behaviorFlags) override;
63
71 ByteVector readData(std::shared_ptr<Location> location,
72 std::shared_ptr<AccessInfo> aiToUse, size_t dataLength,
73 CardBehavior behaviorFlags) override;
74
83 ByteVector readDataHeader(std::shared_ptr<Location> location,
84 std::shared_ptr<AccessInfo> aiToUse) override;
85
86 protected:
87 std::shared_ptr<DESFireChip> getDESFireChip() const
88 {
89 return std::dynamic_pointer_cast<DESFireChip>(getChip());
90 }
91};
92}
93
94#endif /* LOGICALACCESS_DESFIRESTORAGECARDSERVICE_HPP */
The DESFire storage card service bas class.
Definition: desfirestoragecardservice.hpp:23
std::shared_ptr< DESFireChip > getDESFireChip() const
Definition: desfirestoragecardservice.hpp:87
std::string getCSType() override
Definition: desfirestoragecardservice.hpp:31
The base storage card service class for all storage services.
Definition: storagecardservice.hpp:30
DESFire chip.
#define STORAGE_CARDSERVICE_DESFIRE
Definition: desfirestoragecardservice.hpp:17
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
CardBehavior
The card behaviors.
Definition: storagecardservice.hpp:20
Storage Card service.