LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
mifareultralightstoragecardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_MIFAREULTRALIGHTSTORAGECARDSERVICE_HPP
8#define LOGICALACCESS_MIFAREULTRALIGHTSTORAGECARDSERVICE_HPP
9
12
13#include <string>
14#include <vector>
15#include <iostream>
16
17namespace logicalaccess
18{
19#define STORAGECARDSERVICE_MIFARE_ULTRALIGHT "MifareUltralightStorage"
20
24class LLA_CARDS_MIFAREULTRALIGHT_API MifareUltralightStorageCardService
25 : public StorageCardService
26{
27 public:
32 explicit MifareUltralightStorageCardService(std::shared_ptr<Chip> chip);
33
38
39 std::string getCSType() override
40 {
42 }
43
49 void erase(std::shared_ptr<Location> location,
50 std::shared_ptr<AccessInfo> aiToUse) override;
51
60 void writeData(std::shared_ptr<Location> location,
61 std::shared_ptr<AccessInfo> aiToUse,
62 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
63 CardBehavior behaviorFlags) override;
64
73 ByteVector readData(std::shared_ptr<Location> location,
74 std::shared_ptr<AccessInfo> aiToUse, size_t length,
75 CardBehavior behaviorFlags) override;
76
85 ByteVector readDataHeader(std::shared_ptr<Location> location,
86 std::shared_ptr<AccessInfo> aiToUse) override;
87
88 protected:
89 /*
90 * \brief Get the associated Mifare Ultralight chip.
91 * \return The Mifare Ultralight chip.
92 */
93 std::shared_ptr<MifareUltralightChip> getMifareUltralightChip() const
94 {
95 return std::dynamic_pointer_cast<MifareUltralightChip>(getChip());
96 }
97};
98}
99
100#endif /* LOGICALACCESS_MIFAREULTRALIGHTSTORAGECARDSERVICE_HPP */
The Mifare Ultralight base profile class.
Definition: mifareultralightstoragecardservice.hpp:26
std::shared_ptr< MifareUltralightChip > getMifareUltralightChip() const
Definition: mifareultralightstoragecardservice.hpp:93
std::string getCSType() override
Definition: mifareultralightstoragecardservice.hpp:39
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 Ultralight chip.
#define STORAGECARDSERVICE_MIFARE_ULTRALIGHT
Definition: mifareultralightstoragecardservice.hpp:19
Definition: asn1.hpp:9
CardBehavior
The card behaviors.
Definition: storagecardservice.hpp:20
Storage Card service.