LibLogicalAccess
2.5.0
An Open Source RFID Library
|
A BCD Byte encoder data type class. More...
#include <bcdbytedatatype.hpp>
Public Member Functions | |
BCDByteDataType () | |
Constructor. | |
~BCDByteDataType () | |
Destructor. | |
std::string | getName () const override |
Get the encoder name. | |
EncodingType | getType () const override |
Get the encoder type. | |
BitsetStream | convert (unsigned long long data, unsigned int dataLengthBits) override |
Convert "data" to the data type. | |
unsigned long long | revert (BitsetStream &data, unsigned int dataLengthBits) override |
Revert data type to data. | |
![]() | |
DataType () | |
Constructor. | |
virtual | ~DataType () |
Constructor. | |
virtual BitsetStream | convert (unsigned long long data, unsigned int dataLengthBits)=0 |
Convert "data" to the data type. | |
virtual unsigned long long | revert (BitsetStream &data, unsigned int dataLengthBits)=0 |
Revert data type to data. | |
void | setLeftParityType (ParityType type) |
Set the left parity type of the wiegand format. | |
ParityType | getLeftParityType () const |
Get the left parity type. | |
void | setRightParityType (ParityType type) |
Set the right parity type of the wiegand format. | |
ParityType | getRightParityType () const |
Get the right parity type. | |
void | setBitDataRepresentationType (EncodingType bitDataRepresentationType) |
Get the bit data representation type. | |
EncodingType | getBitDataRepresentationType () const |
Get the bit data representation type. | |
unsigned char | getBitDataSize () const |
![]() | |
virtual | ~Encoding ()=default |
virtual std::string | getName () const =0 |
Get the encoder name. | |
virtual EncodingType | getType () const =0 |
Get the encoder type. | |
Additional Inherited Members | |
![]() | |
static DataType * | getByEncodingType (EncodingType type) |
Create a new Data Type instance by the encoding type. | |
static long long | pow (int base, unsigned int exp) |
static BitsetStream | addParity (ParityType leftParity, ParityType rightParity, unsigned int blocklen, BitsetStream &buf) |
Add parity to a buffer. | |
static BitsetStream | removeParity (ParityType leftParity, ParityType rightParity, unsigned int blocklen, BitsetStream &buf) |
Remove parity to a buffer. | |
static unsigned char | invertBitSex (unsigned char c, size_t length=8) |
Convert a character to the oser bit-sex (Least Significant Bit / Most Significant Bit). | |
![]() | |
ParityType | d_leftParityType |
The left parity type. | |
ParityType | d_rightParityType |
The right parity type. | |
EncodingType | d_bitDataRepresentationType |
The bit data representation type. | |
A BCD Byte encoder data type class.
logicalaccess::BCDByteDataType::BCDByteDataType | ( | ) |
Constructor.
Create a BCDByteDataType encoder.
logicalaccess::BCDByteDataType::~BCDByteDataType | ( | ) |
Destructor.
Release the BCDByteDataType encoder.
|
overridevirtual |
Convert "data" to the data type.
data | Data to convert |
dataLengthBits | Length of data to convert in bits |
dataConverted | Data after conversion |
Implements logicalaccess::DataType.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Revert data type to data.
data | Data to revert |
Implements logicalaccess::DataType.