LibLogicalAccess
2.5.0
An Open Source RFID Library
|
A Binary data type class. More...
#include <binarydatatype.hpp>
Public Member Functions | |
BinaryDataType () | |
Constructor. | |
~BinaryDataType () | |
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. | |
Static Private Member Functions | |
static void | Alg (int s, int *i) |
static void | Alg (int *i) |
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 Binary data type class.
logicalaccess::BinaryDataType::BinaryDataType | ( | ) |
Constructor.
Create a BinaryDataType encoder.
logicalaccess::BinaryDataType::~BinaryDataType | ( | ) |
Destructor.
Release the BinaryDataType encoder.
|
staticprivate |
|
staticprivate |
|
overridevirtual |
Convert "data" to the data type.
data | Data to convert |
dataLengthBits | Length of data to convert in bits |
dataConverted | Data after conversion |
dataConvertedLengthBytes | Length of "dataConverted" in bytes |
Implements logicalaccess::DataType.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Revert data type to data.
data | Data to revert |
dataLengthBytes | Length of "data" in bits |
lengthBits | Length of data to revert in bits |
Implements logicalaccess::DataType.