LibLogicalAccess
2.5.0
An Open Source RFID Library
|
The Mifare Ultralight commands class. More...
#include <mifareultralightcommands.hpp>
Public Member Functions | |
MifareUltralightCommands () | |
MifareUltralightCommands (std::string ct) | |
virtual ByteVector | readPages (int start_page, int stop_page) |
Read several pages. | |
virtual void | writePages (int start_page, int stop_page, const ByteVector &buf) |
Write several pages. | |
virtual void | lockPage (int page) |
Set a page as read-only. | |
virtual ByteVector | readPage (int page)=0 |
Read a whole page. | |
virtual void | writePage (int page, const ByteVector &buf)=0 |
Write a whole page. | |
![]() | |
Commands ()=delete | |
Constructor. | |
virtual | ~Commands () |
std::shared_ptr< Chip > | getChip () const override |
Get the chip. | |
virtual void | setChip (std::shared_ptr< Chip > chip) |
Set the chip. | |
std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const override |
Get the reader/card adapter. | |
virtual void | setReaderCardAdapter (std::shared_ptr< ReaderCardAdapter > adapter) |
Set the reader/card adapter. | |
virtual const std::string & | getCmdType () const |
Get the cmd name. | |
virtual void | setCmdType (const std::string &command_type) |
Set the cmd name. | |
![]() | |
virtual | ~ICommands ()=default |
virtual std::shared_ptr< Chip > | getChip () const =0 |
Get the chip. | |
virtual std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const =0 |
Get the reader/card adapter. | |
Protected Member Functions | |
virtual std::shared_ptr< MifareUltralightChip > | getMifareUltralightChip () |
![]() | |
Commands (std::string commandtype) | |
Constructor. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< ReaderCardAdapter > | d_readerCardAdapter |
The reader/card adapter. | |
std::weak_ptr< Chip > | d_chip |
The chip. | |
std::string | d_commandtype |
The command type. | |
The Mifare Ultralight commands class.
|
inline |
|
inlineexplicit |
|
protectedvirtual |
Reimplemented in logicalaccess::MifareUltralightCOmnikeyXX22Commands, and logicalaccess::MifareUltralightCPCSCCommands.
|
virtual |
Set a page as read-only.
page | The page to lock. |
|
pure virtual |
Read a whole page.
sector | The page number, from 0 to 15. |
buf | A buffer to fill with the data of the page. |
buflen | The length of buffer. Must be at least 4 bytes long or the call will fail. |
Implemented in logicalaccess::MifareUltralightOK5553Commands, and logicalaccess::MifareUltralightPCSCCommands.
|
virtual |
Read several pages.
start_page | The start page number, from 0 to stop_page. |
stop_page | The stop page number, from start_page to 15. |
buf | The buffer to fill with the data. |
buflen | The length of buf. Must be at least (stop_page - start_page + 1) * 4 bytes long. |
|
pure virtual |
Write a whole page.
sector | The page number, from 0 to 15. |
buf | A buffer to from which to copy the data. |
buflen | The length of buffer. Must be at least 4 bytes long or the call will fail. |
Implemented in logicalaccess::MifareUltralightOK5553Commands, logicalaccess::MifareUltralightCOmnikeyXX22Commands, logicalaccess::MifareUltralightCPCSCCommands, and logicalaccess::MifareUltralightPCSCCommands.
|
virtual |
Write several pages.
start_page | The start page number, from 0 to stop_page. |
stop_page | The stop page number, from start_page to 15. |
buf | The buffer to fill with the data. |
buflen | The length of buf. Must be at least (stop_page - start_page + 1) * 4 bytes long. |