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::LockControlTlv Class Reference

#include <lockcontroltlv.hpp>

Inheritance diagram for logicalaccess::LockControlTlv:
logicalaccess::NfcData logicalaccess::XmlSerializable

Public Member Functions

 LockControlTlv ()
 
 LockControlTlv (ByteVector data)
 
 LockControlTlv (int ad, unsigned char nodlb=0x10, unsigned char blplb=0x04)
 
 ~LockControlTlv ()
 
int getAdditionalDataSize () const
 
void setAdditionalDataSize (int additionalDataSize)
 
unsigned char getNumberOfDynamicLockBits () const
 
void setNumberOfDynamicLockBits (unsigned char numberOfDynamicLockBits)
 
unsigned char getBytesLockedPerLockBit () const
 
void setBytesLockedPerLockBit (unsigned char bytesLockedPerLockBit)
 
unsigned char getBytesPerPage () const
 
void setBytesPerPage (unsigned char bytesPerPage)
 
unsigned char getOffset () const
 
void setOffest (unsigned char offset)
 
unsigned char getPageAddr () const
 
void setPageAddr (unsigned char pageAddr)
 
unsigned char getDynamicLockBytesPosition () const
 
void setDynamicLockBytesPosition (unsigned char dynamicLockBytesPosition)
 
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< LockControlTlvtlvToLockControl (ByteVector tlv)
 
static ByteVector lockControlToTLV (std::shared_ptr< LockControlTlv > 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 calculateLockPosition ()
 

Private Attributes

int _additionalDataSize
 
unsigned char _numberOfDynamicLockBits
 
unsigned char _bytesLockedPerLockBit
 
unsigned char _bytesPerPage
 
unsigned char _offset
 
unsigned char _pageAddr
 
unsigned char _dynamicLockBytesPosition
 

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

◆ LockControlTlv() [1/3]

logicalaccess::LockControlTlv::LockControlTlv ( )

◆ LockControlTlv() [2/3]

logicalaccess::LockControlTlv::LockControlTlv ( ByteVector  data)

◆ LockControlTlv() [3/3]

logicalaccess::LockControlTlv::LockControlTlv ( int  ad,
unsigned char  nodlb = 0x10,
unsigned char  blplb = 0x04 
)

◆ ~LockControlTlv()

logicalaccess::LockControlTlv::~LockControlTlv ( )

Member Function Documentation

◆ calculateLockPosition()

void logicalaccess::LockControlTlv::calculateLockPosition ( )
private

◆ getAdditionalDataSize()

int logicalaccess::LockControlTlv::getAdditionalDataSize ( ) const

◆ getBytesLockedPerLockBit()

unsigned char logicalaccess::LockControlTlv::getBytesLockedPerLockBit ( ) const

◆ getBytesPerPage()

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

◆ getDefaultXmlNodeName()

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

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getDynamicLockBytesPosition()

unsigned char logicalaccess::LockControlTlv::getDynamicLockBytesPosition ( ) const

◆ getNumberOfDynamicLockBits()

unsigned char logicalaccess::LockControlTlv::getNumberOfDynamicLockBits ( ) const

◆ getOffset()

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

◆ getPageAddr()

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

◆ lockControlToTLV()

ByteVector logicalaccess::LockControlTlv::lockControlToTLV ( std::shared_ptr< LockControlTlv data)
static

◆ serialize()

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

Serialize object to Xml Node.

Parameters
osThe XML stream.

Implements logicalaccess::XmlSerializable.

◆ setAdditionalDataSize()

void logicalaccess::LockControlTlv::setAdditionalDataSize ( int  additionalDataSize)

◆ setBytesLockedPerLockBit()

void logicalaccess::LockControlTlv::setBytesLockedPerLockBit ( unsigned char  bytesLockedPerLockBit)

◆ setBytesPerPage()

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

◆ setDynamicLockBytesPosition()

void logicalaccess::LockControlTlv::setDynamicLockBytesPosition ( unsigned char  dynamicLockBytesPosition)

◆ setNumberOfDynamicLockBits()

void logicalaccess::LockControlTlv::setNumberOfDynamicLockBits ( unsigned char  numberOfDynamicLockBits)

◆ setOffest()

void logicalaccess::LockControlTlv::setOffest ( unsigned char  offset)

◆ setPageAddr()

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

◆ tlvToLockControl()

std::shared_ptr< LockControlTlv > logicalaccess::LockControlTlv::tlvToLockControl ( ByteVector  tlv)
static

◆ unSerialize()

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

UnSerialize object from a Xml Node.

Parameters
nodeThe Xml node.

Implements logicalaccess::XmlSerializable.

Member Data Documentation

◆ _additionalDataSize

int logicalaccess::LockControlTlv::_additionalDataSize
private

◆ _bytesLockedPerLockBit

unsigned char logicalaccess::LockControlTlv::_bytesLockedPerLockBit
private

◆ _bytesPerPage

unsigned char logicalaccess::LockControlTlv::_bytesPerPage
private

◆ _dynamicLockBytesPosition

unsigned char logicalaccess::LockControlTlv::_dynamicLockBytesPosition
private

◆ _numberOfDynamicLockBits

unsigned char logicalaccess::LockControlTlv::_numberOfDynamicLockBits
private

◆ _offset

unsigned char logicalaccess::LockControlTlv::_offset
private

◆ _pageAddr

unsigned char logicalaccess::LockControlTlv::_pageAddr
private

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