LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
logicalaccess::MemoryControlTlv Class Reference

#include <memorycontroltlv.hpp>

Inheritance diagram for logicalaccess::MemoryControlTlv:
logicalaccess::NfcData logicalaccess::XmlSerializable

Public Member Functions

 MemoryControlTlv ()
 
 MemoryControlTlv (ByteVector data)
 
 MemoryControlTlv (int byteAddr, unsigned char size)
 
 ~MemoryControlTlv ()
 
int getByteAddr () const
 
void setByteAddr (int addr)
 
unsigned char getPageAddr () const
 
void setPageAddr (unsigned char pageAddr)
 
unsigned char getOffset () const
 
void setOffset (unsigned char offset)
 
unsigned char getSize () const
 
void setSize (unsigned char size)
 
unsigned char getBytesPerPage () const
 
void setBytesPerPage (unsigned char bytesPerPage)
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize object to Xml Node.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize object from a Xml Node.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
- Public Member Functions inherited from logicalaccess::NfcData
 NfcData ()
 
 NfcData (char type)
 
 ~NfcData ()
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize object to Xml Node.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize object from a Xml Node.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
char getType () const
 
void setType (char type)
 
- Public Member Functions inherited from logicalaccess::XmlSerializable
virtual ~XmlSerializable ()=default
 
virtual std::string serialize ()
 Serialize object to Xml Node string.
 
virtual std::string serializeWithHeaders ()
 Serialize object to Xml Node string, with xml headers.
 
virtual void serialize (boost::property_tree::ptree &parentNode)=0
 Serialize object to Xml Node.
 
virtual void serializeToFile (const std::string &filename)
 Serialize object to a Xml file.
 
virtual void unSerialize (boost::property_tree::ptree &node)=0
 UnSerialize object from a Xml Node.
 
virtual void unSerialize (const std::string &xmlstring, const std::string &rootNode)
 UnSerialize object from a Xml Node string.
 
virtual void unSerialize (std::istream &is, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerialize (boost::property_tree::ptree &node, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerializeFromFile (const std::string &filename)
 UnSerialize object from a Xml file.
 
virtual std::string getDefaultXmlNodeName () const =0
 Get the default Xml Node name for this object.
 

Static Public Member Functions

static std::shared_ptr< MemoryControlTlvtlvToMemoryControl (ByteVector tlv)
 
static ByteVector memoryControlToTLV (std::shared_ptr< MemoryControlTlv > data)
 
- Static Public Member Functions inherited from logicalaccess::NfcData
static ByteVector dataToTLV (std::shared_ptr< NfcData > data)
 
static std::vector< std::shared_ptr< NfcData > > tlvToData (ByteVector tlv)
 
- Static Public Member Functions inherited from logicalaccess::XmlSerializable
static std::string removeXmlDeclaration (const std::string &xmlstring)
 Remove Xml declaration from a xml string.
 
static ByteVector formatHexString (std::string hexstr)
 Format hex string to hex string with space.
 

Private Member Functions

void calculateReservedPosition ()
 

Private Attributes

int _byteAddr
 
unsigned char _pageAddr
 
unsigned char _offset
 
unsigned char _size
 
unsigned char _bytesPerPage
 

Additional Inherited Members

- Static Protected Member Functions inherited from logicalaccess::XmlSerializable
static unsigned long long atoull (const std::string &str)
 
- Protected Attributes inherited from logicalaccess::NfcData
char m_type
 

Constructor & Destructor Documentation

◆ MemoryControlTlv() [1/3]

logicalaccess::MemoryControlTlv::MemoryControlTlv ( )

◆ MemoryControlTlv() [2/3]

logicalaccess::MemoryControlTlv::MemoryControlTlv ( ByteVector  data)

◆ MemoryControlTlv() [3/3]

logicalaccess::MemoryControlTlv::MemoryControlTlv ( int  byteAddr,
unsigned char  size 
)

◆ ~MemoryControlTlv()

logicalaccess::MemoryControlTlv::~MemoryControlTlv ( )

Member Function Documentation

◆ calculateReservedPosition()

void logicalaccess::MemoryControlTlv::calculateReservedPosition ( )
private

◆ getByteAddr()

int logicalaccess::MemoryControlTlv::getByteAddr ( ) const

◆ getBytesPerPage()

unsigned char logicalaccess::MemoryControlTlv::getBytesPerPage ( ) const

◆ getDefaultXmlNodeName()

std::string logicalaccess::MemoryControlTlv::getDefaultXmlNodeName ( ) const
overridevirtual

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getOffset()

unsigned char logicalaccess::MemoryControlTlv::getOffset ( ) const

◆ getPageAddr()

unsigned char logicalaccess::MemoryControlTlv::getPageAddr ( ) const

◆ getSize()

unsigned char logicalaccess::MemoryControlTlv::getSize ( ) const

◆ memoryControlToTLV()

ByteVector logicalaccess::MemoryControlTlv::memoryControlToTLV ( std::shared_ptr< MemoryControlTlv data)
static

◆ serialize()

void logicalaccess::MemoryControlTlv::serialize ( boost::property_tree::ptree &  parentNode)
overridevirtual

Serialize object to Xml Node.

Parameters
osThe XML stream.

Implements logicalaccess::XmlSerializable.

◆ setByteAddr()

void logicalaccess::MemoryControlTlv::setByteAddr ( int  addr)

◆ setBytesPerPage()

void logicalaccess::MemoryControlTlv::setBytesPerPage ( unsigned char  bytesPerPage)

◆ setOffset()

void logicalaccess::MemoryControlTlv::setOffset ( unsigned char  offset)

◆ setPageAddr()

void logicalaccess::MemoryControlTlv::setPageAddr ( unsigned char  pageAddr)

◆ setSize()

void logicalaccess::MemoryControlTlv::setSize ( unsigned char  size)

◆ tlvToMemoryControl()

std::shared_ptr< MemoryControlTlv > logicalaccess::MemoryControlTlv::tlvToMemoryControl ( ByteVector  tlv)
static

◆ unSerialize()

void logicalaccess::MemoryControlTlv::unSerialize ( boost::property_tree::ptree &  node)
overridevirtual

UnSerialize object from a Xml Node.

Parameters
nodeThe Xml node.

Implements logicalaccess::XmlSerializable.

Member Data Documentation

◆ _byteAddr

int logicalaccess::MemoryControlTlv::_byteAddr
private

◆ _bytesPerPage

unsigned char logicalaccess::MemoryControlTlv::_bytesPerPage
private

◆ _offset

unsigned char logicalaccess::MemoryControlTlv::_offset
private

◆ _pageAddr

unsigned char logicalaccess::MemoryControlTlv::_pageAddr
private

◆ _size

unsigned char logicalaccess::MemoryControlTlv::_size
private

The documentation for this class was generated from the following files: