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

A reader/card adapter for Transparent Smart Card Interface OSDP. More...

#include <osdpreadercardadapter.hpp>

Inheritance diagram for logicalaccess::OSDPReaderCardAdapter:
logicalaccess::ISO7816ReaderCardAdapter logicalaccess::ReaderCardAdapter

Public Member Functions

 OSDPReaderCardAdapter (std::shared_ptr< OSDPCommands > command, unsigned char address, std::shared_ptr< DESFireISO7816ResultChecker > resultChecker)
 
 ~OSDPReaderCardAdapter ()
 
ByteVector sendCommand (const ByteVector &command, long timeout=-1) override
 Send a command to the reader.
 
std::shared_ptr< OSDPCommandsgetOSDPCommands () const
 
unsigned char getRS485Address () const
 
- Public Member Functions inherited from logicalaccess::ISO7816ReaderCardAdapter
virtual ISO7816Response sendAPDUCommand (const ByteVector &data)
 Send an APDU command to the reader.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned char lc, const ByteVector &data, unsigned char le)
 Send an APDU command to the reader.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned char lc, const ByteVector &data)
 Send an APDU command to the reader.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, const ByteVector &data)
 Send an APDU command to the reader.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned char lc, unsigned char le)
 Send an APDU command to the reader without data.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned char le)
 Send an APDU command to the reader without data.
 
virtual ISO7816Response sendAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2)
 Send an APDU command to the reader without data.
 
virtual ISO7816Response sendExtendedAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned short lc, const ByteVector &data)
 Send an extended APDU command to the reader.
 
virtual ISO7816Response sendExtendedAPDUCommand (unsigned char cla, unsigned char ins, unsigned char p1, unsigned char p2, unsigned short lc, const ByteVector &data, unsigned short le)
 Send an extended APDU command to the reader.
 
ByteVector adaptCommand (const ByteVector &command) override
 Adapt the command to send to the reader.
 
ByteVector adaptAnswer (const ByteVector &answer) override
 Adapt the answer received from the reader.
 
void setCrypto (std::shared_ptr< ISO24727Crypto > crypto)
 
- Public Member Functions inherited from logicalaccess::ReaderCardAdapter
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< DataTransportgetDataTransport () 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< ResultCheckergetResultChecker () const
 Get the result checker.
 
virtual void setResultChecker (std::shared_ptr< ResultChecker > checker)
 Set the result checker.
 

Protected Attributes

std::shared_ptr< DataTransportd_dataTransport
 
std::shared_ptr< OSDPCommandsm_commands
 
std::shared_ptr< DESFireISO7816ResultCheckerd_resultChecker
 
unsigned char m_address
 
- Protected Attributes inherited from logicalaccess::ReaderCardAdapter
std::shared_ptr< DataTransportd_dataTransport
 The data transport.
 
std::shared_ptr< ResultCheckerd_ResultChecker
 The result checker.
 

Detailed Description

A reader/card adapter for Transparent Smart Card Interface OSDP.

Constructor & Destructor Documentation

◆ OSDPReaderCardAdapter()

logicalaccess::OSDPReaderCardAdapter::OSDPReaderCardAdapter ( std::shared_ptr< OSDPCommands command,
unsigned char  address,
std::shared_ptr< DESFireISO7816ResultChecker resultChecker 
)

◆ ~OSDPReaderCardAdapter()

logicalaccess::OSDPReaderCardAdapter::~OSDPReaderCardAdapter ( )

Member Function Documentation

◆ getOSDPCommands()

std::shared_ptr< OSDPCommands > logicalaccess::OSDPReaderCardAdapter::getOSDPCommands ( ) const

◆ getRS485Address()

unsigned char logicalaccess::OSDPReaderCardAdapter::getRS485Address ( ) const

◆ sendCommand()

ByteVector logicalaccess::OSDPReaderCardAdapter::sendCommand ( const ByteVector command,
long  timeout = -1 
)
overridevirtual

Send a command to the reader.

Parameters
commandThe command buffer.
timeoutThe command timeout.
Returns
the result of the command.

Reimplemented from logicalaccess::ReaderCardAdapter.

Member Data Documentation

◆ d_dataTransport

std::shared_ptr<DataTransport> logicalaccess::OSDPReaderCardAdapter::d_dataTransport
protected

◆ d_resultChecker

std::shared_ptr<DESFireISO7816ResultChecker> logicalaccess::OSDPReaderCardAdapter::d_resultChecker
protected

◆ m_address

unsigned char logicalaccess::OSDPReaderCardAdapter::m_address
protected

◆ m_commands

std::shared_ptr<OSDPCommands> logicalaccess::OSDPReaderCardAdapter::m_commands
protected

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