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

A DESFire location informations. More...

#include <desfirelocation.hpp>

Inheritance diagram for logicalaccess::DESFireLocation:
logicalaccess::Location logicalaccess::XmlSerializable logicalaccess::DESFireEV1Location

Public Member Functions

 DESFireLocation ()
 Constructor.
 
virtual ~DESFireLocation ()
 Destructor.
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize the current object to XML.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize a XML node to the current object.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
std::string getCardType () override
 Get the card type for this location.
 
void incrementOffset (int increment) override
 
bool operator== (const Location &location) const override
 Equality operator.
 
- Public Member Functions inherited from logicalaccess::Location
virtual ~Location ()=default
 
virtual std::string getCardType ()=0
 Get the card type for this location.
 
virtual void incrementOffset (int increment)
 
virtual bool operator== (const Location &location) const
 Equality operator.
 
bool operator!= (const Location &location) const
 Inequality operator.
 
- 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 unsigned int convertAidToUInt (const ByteVector &aid)
 Convert an Application ID buffer into 32 bits.
 
static void convertUIntToAid (unsigned int i, ByteVector &aid)
 Convert an Application ID 32 bits into a buffer.
 
- 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.
 

Public Attributes

unsigned int aid
 The application ID.
 
unsigned char file
 The file ID.
 
unsigned int byte_
 The byte offset.
 
EncryptionMode securityLevel
 The file security level.
 

Additional Inherited Members

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

Detailed Description

A DESFire location informations.

Constructor & Destructor Documentation

◆ DESFireLocation()

logicalaccess::DESFireLocation::DESFireLocation ( )

Constructor.

◆ ~DESFireLocation()

logicalaccess::DESFireLocation::~DESFireLocation ( )
virtual

Destructor.

Member Function Documentation

◆ convertAidToUInt()

unsigned int logicalaccess::DESFireLocation::convertAidToUInt ( const ByteVector aid)
static

Convert an Application ID buffer into 32 bits.

Parameters
aidThe Application ID buffer.
Returns
The Application ID in 32 bits.

◆ convertUIntToAid()

void logicalaccess::DESFireLocation::convertUIntToAid ( unsigned int  i,
ByteVector aid 
)
static

Convert an Application ID 32 bits into a buffer.

Parameters
iThe Application ID in 32 bits.
aidThe Application ID buffer.

◆ getCardType()

std::string logicalaccess::DESFireLocation::getCardType ( )
inlineoverridevirtual

Get the card type for this location.

Returns
The card type.

Implements logicalaccess::Location.

◆ getDefaultXmlNodeName()

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

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ incrementOffset()

void logicalaccess::DESFireLocation::incrementOffset ( int  increment)
overridevirtual

Increment the offset of the location.

Todo: Possibly a refactor would be better than this virtual method.

Reimplemented from logicalaccess::Location.

◆ operator==()

bool logicalaccess::DESFireLocation::operator== ( const Location location) const
overridevirtual

Equality operator.

Parameters
locationLocation to compare.
Returns
True if equals, false otherwise.

Reimplemented from logicalaccess::Location.

◆ serialize()

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

Serialize the current object to XML.

Parameters
parentNodeThe parent node.

Implements logicalaccess::XmlSerializable.

◆ unSerialize()

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

UnSerialize a XML node to the current object.

Parameters
nodeThe XML node.

Implements logicalaccess::XmlSerializable.

Member Data Documentation

◆ aid

unsigned int logicalaccess::DESFireLocation::aid

The application ID.

◆ byte_

unsigned int logicalaccess::DESFireLocation::byte_

The byte offset.

◆ file

unsigned char logicalaccess::DESFireLocation::file

The file ID.

◆ securityLevel

EncryptionMode logicalaccess::DESFireLocation::securityLevel

The file security level.


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