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

A checksum data field. Not implemented yet. More...

#include <checksumdatafield.hpp>

Inheritance diagram for logicalaccess::ChecksumDataField:
logicalaccess::DataField logicalaccess::XmlSerializable

Public Member Functions

 ChecksumDataField ()
 Constructor.
 
virtual ~ChecksumDataField ()
 Destructor.
 
DataFieldType getDFType () const override
 Get the field type.
 
void setValue (const char &)
 Set the parity value.
 
unsigned char getValue () const
 Get the field value.
 
void setBitsUsePositions (ByteVector)
 Set the bits to use positions to calculate checksum. The sum should be 8-bit factor.
 
ByteVector getBitsUsePositions () const
 Get the bits to use positions to calculate checksum.
 
virtual BitsetStream getLinearData (const BitsetStream &data) const
 Get linear data.
 
virtual void setLinearData (const ByteVector &data)
 Set linear data.
 
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.
 
- Public Member Functions inherited from logicalaccess::DataField
 DataField ()
 Constructor.
 
virtual ~DataField ()
 Destructor.
 
virtual unsigned int getDataLength () const
 Get data length in bits.
 
virtual void setPosition (unsigned int position)
 Set the field position in bits.
 
unsigned int getPosition () const
 Get the field position in bits.
 
virtual DataFieldType getDFType () const =0
 Get the field type.
 
void setName (const std::string &name)
 Set the field name.
 
std::string getName () const
 Get the field name.
 
virtual BitsetStream getLinearData (const BitsetStream &data) const =0
 Get linear data.
 
virtual void setLinearData (const ByteVector &data)=0
 Set linear data.
 
virtual bool checkSkeleton (std::shared_ptr< DataField > field) const =0
 Check the current field skeleton with another field.
 
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.
 
- 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.
 

Additional Inherited Members

- 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.
 
- Static Protected Member Functions inherited from logicalaccess::XmlSerializable
static unsigned long long atoull (const std::string &str)
 
- Protected Attributes inherited from logicalaccess::DataField
std::string d_name
 The field name.
 
unsigned int d_length
 The field length in bits.
 
unsigned int d_position
 The field position in bits.
 

Detailed Description

A checksum data field. Not implemented yet.

Constructor & Destructor Documentation

◆ ChecksumDataField()

logicalaccess::ChecksumDataField::ChecksumDataField ( )

Constructor.

◆ ~ChecksumDataField()

logicalaccess::ChecksumDataField::~ChecksumDataField ( )
virtual

Destructor.

Member Function Documentation

◆ getBitsUsePositions()

ByteVector logicalaccess::ChecksumDataField::getBitsUsePositions ( ) const

Get the bits to use positions to calculate checksum.

Returns
The bits positions.

◆ getDefaultXmlNodeName()

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

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getDFType()

DataFieldType logicalaccess::ChecksumDataField::getDFType ( ) const
inlineoverridevirtual

Get the field type.

Returns
The field type.

Implements logicalaccess::DataField.

◆ getLinearData()

BitsetStream logicalaccess::ChecksumDataField::getLinearData ( const BitsetStream data) const
virtual

Get linear data.

Parameters
dataWhere to put data
dataLengthBytesLength in byte of data
posThe first position bit. Will contain the position bit after the field.

Implements logicalaccess::DataField.

◆ getValue()

unsigned char logicalaccess::ChecksumDataField::getValue ( ) const

Get the field value.

Returns
The field value.

◆ serialize()

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

Serialize the current object to XML.

Parameters
parentNodeThe parent node.

Implements logicalaccess::XmlSerializable.

◆ setBitsUsePositions()

void logicalaccess::ChecksumDataField::setBitsUsePositions ( ByteVector  )

Set the bits to use positions to calculate checksum. The sum should be 8-bit factor.

Parameters
positionsThe bits positions.

◆ setLinearData()

void logicalaccess::ChecksumDataField::setLinearData ( const ByteVector data)
virtual

Set linear data.

Parameters
dataWhere to get data
dataLengthBytesLength of data in bytes
posThe first position bit. Will contain the position bit after the field.

Implements logicalaccess::DataField.

◆ setValue()

void logicalaccess::ChecksumDataField::setValue ( const char &  )

Set the parity value.

Parameters
valueThe field value.

◆ unSerialize()

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

UnSerialize a XML node to the current object.

Parameters
nodeThe XML node.

Implements logicalaccess::XmlSerializable.


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