LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
nfctag2cardservice.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_NFCTAG2CARDSERVICE_HPP
8#define LOGICALACCESS_NFCTAG2CARDSERVICE_HPP
9
14
15namespace logicalaccess
16{
17#define CARDSERVICE_NFC_TAG2 "NFCTag2"
18
23class LLA_CARDS_MIFAREULTRALIGHT_API NFCTag2CardService : public NFCTagCardService
24{
25 public:
30 explicit NFCTag2CardService(std::shared_ptr<Chip> chip)
31 : NFCTagCardService(chip)
32 {
33 }
34
36 {
37 }
38
39 std::string getCSType() override
40 {
42 }
43
44 std::shared_ptr<NdefMessage> readNDEF() override;
45
46 std::vector<std::shared_ptr<NfcData>> readData();
47
48 void writeNDEF(std::shared_ptr<NdefMessage> records) override;
49
50 void writeData(std::shared_ptr<NfcData> records, int addr);
51
52 void eraseNDEF() override;
53
54 void writeCapabilityContainer() const;
55
56
57 protected:
58 void fillMemoryList(ByteVector data);
59 int checkForReservedArea(unsigned int addr);
60 std::shared_ptr<MifareUltralightChip> getMifareUltralightChip() const
61 {
62 return std::dynamic_pointer_cast<MifareUltralightChip>(getChip());
63 }
64 std::vector<MemoryData> _memoryList;
65};
66}
67
68#endif /* LOGICALACCESS_NFCTAG2CARDSERVICE_HPP */
The NFC Tag 2 storage card service base class.
Definition: nfctag2cardservice.hpp:24
std::shared_ptr< MifareUltralightChip > getMifareUltralightChip() const
Definition: nfctag2cardservice.hpp:60
virtual ~NFCTag2CardService()
Definition: nfctag2cardservice.hpp:35
NFCTag2CardService(std::shared_ptr< Chip > chip)
Constructor.
Definition: nfctag2cardservice.hpp:30
std::vector< MemoryData > _memoryList
Definition: nfctag2cardservice.hpp:64
std::string getCSType() override
Definition: nfctag2cardservice.hpp:39
Definition: nfctagcardservice.hpp:26
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Mifare Ultralight chip.
Definition: asn1.hpp:9
NDEF Message.
#define CARDSERVICE_NFC_TAG2
Definition: nfctag2cardservice.hpp:17
NFC Tag card service.