LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
topazstoragecardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_TOPAZSTORAGECARDSERVICE_HPP
8#define LOGICALACCESS_TOPAZSTORAGECARDSERVICE_HPP
9
12
13#include <string>
14#include <vector>
15#include <iostream>
16
17namespace logicalaccess
18{
19#define STORAGECARDSERVICE_TOPAZ "TopazStorage"
20
24class LLA_CARDS_TOPAZ_API TopazStorageCardService : public StorageCardService
25{
26 public:
31 explicit TopazStorageCardService(std::shared_ptr<Chip> chip);
32
37
38 std::string getCSType() override
39 {
41 }
42
46 virtual void erase();
47
53 void erase(std::shared_ptr<Location> location,
54 std::shared_ptr<AccessInfo> aiToUse) override;
55
64 void writeData(std::shared_ptr<Location> location,
65 std::shared_ptr<AccessInfo> aiToUse,
66 std::shared_ptr<AccessInfo> aiToWrite, const ByteVector &data,
67 CardBehavior behaviorFlags) override;
68
77 ByteVector readData(std::shared_ptr<Location> location,
78 std::shared_ptr<AccessInfo> aiToUse, size_t length,
79 CardBehavior behaviorFlags) override;
80
89 ByteVector readDataHeader(std::shared_ptr<Location> location,
90 std::shared_ptr<AccessInfo> aiToUse) override;
91
92 protected:
93 /*
94 * \brief Get the associated Topaz chip.
95 * \return The Topaz chip.
96 */
97 std::shared_ptr<TopazChip> getTopazChip() const
98 {
99 return std::dynamic_pointer_cast<TopazChip>(getChip());
100 }
101};
102}
103
104#endif /* LOGICALACCESS_TOPAZSTORAGECARDSERVICE_HPP */
The base storage card service class for all storage services.
Definition: storagecardservice.hpp:30
The Topaz base profile class.
Definition: topazstoragecardservice.hpp:25
std::shared_ptr< TopazChip > getTopazChip() const
Definition: topazstoragecardservice.hpp:97
std::string getCSType() override
Definition: topazstoragecardservice.hpp:38
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.
Topaz chip.
#define STORAGECARDSERVICE_TOPAZ
Definition: topazstoragecardservice.hpp:19