LibLogicalAccess
2.5.0
An Open Source RFID Library
|
A default Elatec reader/card adapter class. More...
#include <elatecreadercardadapter.hpp>
Public Member Functions | |
ElatecReaderCardAdapter () | |
Constructor. | |
virtual | ~ElatecReaderCardAdapter () |
Destructor. | |
ByteVector | adaptCommand (const ByteVector &command) override |
Adapt the command to send to the reader. | |
ByteVector | adaptAnswer (const ByteVector &answer) override |
Adapt the asnwer received from the reader. | |
virtual ByteVector | sendCommand (unsigned char cmdcode, const ByteVector &command, long int timeout=2000) |
Send a command to the reader. | |
virtual ByteVector | sendCommand (const ByteVector &command, long timeout=-1) |
Send a command to the reader. | |
![]() | |
virtual | ~ReaderCardAdapter () |
ReaderCardAdapter () | |
virtual ByteVector | adaptCommand (const ByteVector &command) |
Adapt the command to send to the reader. | |
virtual ByteVector | adaptAnswer (const ByteVector &answer) |
Adapt the answer received from the reader. | |
std::shared_ptr< DataTransport > | getDataTransport () const |
Get the data transport. | |
void | setDataTransport (std::shared_ptr< DataTransport > dataTransport) |
Set the data transport. | |
virtual ByteVector | sendCommand (const ByteVector &command, long timeout=-1) |
Send a command to the reader. | |
virtual std::shared_ptr< ResultChecker > | getResultChecker () const |
Get the result checker. | |
virtual void | setResultChecker (std::shared_ptr< ResultChecker > checker) |
Set the result checker. | |
Static Protected Member Functions | |
static unsigned char | calcChecksum (const ByteVector &buf) |
Calculate the buffer checksum. | |
Protected Attributes | |
unsigned char | d_last_cmdcode |
The last command code used. | |
![]() | |
std::shared_ptr< DataTransport > | d_dataTransport |
The data transport. | |
std::shared_ptr< ResultChecker > | d_ResultChecker |
The result checker. | |
A default Elatec reader/card adapter class.
logicalaccess::ElatecReaderCardAdapter::ElatecReaderCardAdapter | ( | ) |
Constructor.
|
virtual |
Destructor.
|
overridevirtual |
Adapt the asnwer received from the reader.
answer | The answer received. |
Reimplemented from logicalaccess::ReaderCardAdapter.
|
overridevirtual |
Adapt the command to send to the reader.
command | The command to send. |
Reimplemented from logicalaccess::ReaderCardAdapter.
|
staticprotected |
Calculate the buffer checksum.
buf | The buffer. |
|
virtual |
Send a command to the reader.
command | The command buffer. |
timeout | The command timeout. |
Reimplemented from logicalaccess::ReaderCardAdapter.
|
virtual |
Send a command to the reader.
cmdcode | The command code. |
command | The command buffer. |
timeout | The command timeout. |
|
protected |
The last command code used.