LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
mifarestoragecardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_MIFARESTORAGECARDSERVICE_HPP
8#define LOGICALACCESS_MIFARESTORAGECARDSERVICE_HPP
9
10#include <logicalaccess/key.hpp>
14
15#include <string>
16#include <vector>
17#include <iostream>
18
19namespace logicalaccess
20{
21#define STORAGECARDSERVICE_MIFARE "MifareStorage"
22
26class LLA_CARDS_MIFARE_API MifareStorageCardService : public StorageCardService
27{
28 public:
33 explicit MifareStorageCardService(std::shared_ptr<Chip> chip);
34
39
40 std::string getCSType() override
41 {
43 }
44
50 void erase(std::shared_ptr<Location> location,
51 std::shared_ptr<AccessInfo> aiToUse) override;
52
61 void writeData(std::shared_ptr<Location> location,
62 std::shared_ptr<AccessInfo> aiToUse,
63 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
64 CardBehavior behaviorFlags) override;
65
75 ByteVector readData(std::shared_ptr<Location> location,
76 std::shared_ptr<AccessInfo> aiToUse, size_t length,
77 CardBehavior behaviorFlags) override;
78
87 ByteVector readDataHeader(std::shared_ptr<Location> location,
88 std::shared_ptr<AccessInfo> aiToUse) override;
89
90 protected:
91 /*
92 * \brief Get the associated Mifare chip.
93 * \return The Mifare chip.
94 */
95 std::shared_ptr<MifareChip> getMifareChip() const
96 {
97 return std::dynamic_pointer_cast<MifareChip>(getChip());
98 }
99};
100}
101
102#endif /* LOGICALACCESS_MIFARESTORAGECARDSERVICE_HPP */
The Mifare storage card service base class.
Definition: mifarestoragecardservice.hpp:27
std::string getCSType() override
Definition: mifarestoragecardservice.hpp:40
std::shared_ptr< MifareChip > getMifareChip() const
Definition: mifarestoragecardservice.hpp:95
The base storage card service class for all storage services.
Definition: storagecardservice.hpp:30
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Mifare chip.
MifareLocation.
#define STORAGECARDSERVICE_MIFARE
Definition: mifarestoragecardservice.hpp:21
Definition: asn1.hpp:9
CardBehavior
The card behaviors.
Definition: storagecardservice.hpp:20
Storage Card service.