Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | List of all members
keyple::core::seproxy::message::ProxyReader Class Referenceabstract

#include <ProxyReader.h>

Inherits keyple::core::seproxy::SeReader.

Inherited by keyple::core::seproxy::plugin::AbstractReader [virtual], and keyple::core::seproxy::plugin::SmartSelectionReader [virtual].

Public Member Functions

virtual ~ProxyReader ()
 
virtual std::vector< std::shared_ptr< SeResponse > > transmitSeRequests (const std::vector< std::shared_ptr< SeRequest >> &seRequests, const MultiSeRequestProcessing &multiSeRequestProcessing, const ChannelControl &channelControl)=0
 
virtual std::shared_ptr< SeResponsetransmitSeRequest (std::shared_ptr< SeRequest > seRequest, const ChannelControl &channelControl)=0
 
- Public Member Functions inherited from keyple::core::seproxy::SeReader
virtual ~SeReader ()
 
virtual bool isSePresent ()=0
 
virtual void addSeProtocolSetting (std::shared_ptr< SeProtocol > seProtocol, const std::string &protocolRule)=0
 
virtual void setSeProtocolSetting (const std::map< std::shared_ptr< SeProtocol >, std::string > &protocolSetting)=0
 
virtual const TransmissionModegetTransmissionMode () const =0
 
virtual bool operator== (const SeReader &o) const
 
- Public Member Functions inherited from keyple::core::seproxy::ProxyElement
virtual ~ProxyElement ()=default
 
virtual const std::string & getName () const =0
 
virtual const std::map< const std::string, const std::string > & getParameters () const =0
 
virtual void setParameter (const std::string &key, const std::string &value)=0
 
virtual void setParameters (const std::map< const std::string, const std::string > &parameters)
 

Detailed Description

ProxyReader interface

This interface should be implemented by any specific reader plugin.

Constructor & Destructor Documentation

◆ ~ProxyReader()

virtual keyple::core::seproxy::message::ProxyReader::~ProxyReader ( )
inlinevirtual

Member Function Documentation

◆ transmitSeRequest()

virtual std::shared_ptr<SeResponse> keyple::core::seproxy::message::ProxyReader::transmitSeRequest ( std::shared_ptr< SeRequest seRequest,
const ChannelControl channelControl 
)
pure virtual

Transmits a single keyple::core::seproxy::message::SeRequest (list of keyple::core::seproxy::message::ApduRequest) and get back the corresponding keyple::core::seproxy::message::SeResponse

The usage of this method is conditioned to the presence of a SE in the selected reader.

The keyple::core::seproxy::message::SeRequest is processed and the received keyple::core::seproxy::message::SeResponse is returned.

The logical channel is set according to the keepChannelOpen flag.

This method could also fail in case of IO error or wrong card currentState → some reader’s exception (SE missing, IO error, wrong card currentState, timeout) have to be caught during the processing of the SE request transmission. *

Parameters
seRequestthe SeRequest to transmit
channelControla flag to tell if the channel has to be closed at the end
Returns
SeResponse the response to the SeRequest
Exceptions
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implemented in keyple::core::seproxy::plugin::AbstractReader.

◆ transmitSeRequests()

virtual std::vector<std::shared_ptr<SeResponse> > keyple::core::seproxy::message::ProxyReader::transmitSeRequests ( const std::vector< std::shared_ptr< SeRequest >> &  seRequests,
const MultiSeRequestProcessing multiSeRequestProcessing,
const ChannelControl channelControl 
)
pure virtual

Transmits a Set of keyple::core::seproxy::message::SeRequest (list of keyple::core::seproxy::message::SeRequest) to a SE application and get back the corresponding a List of keyple::core::seproxy::message::SeResponse.

The usage of this method is conditioned to the presence of a SE in the selected reader.

All the keyple::core::seproxy::message::SeRequest are processed consecutively. The received keyple::core::seproxy::message::SeResponse and placed in the List of keyple::core::seproxy::message::SeResponse.

If the protocol flag set in the request match the current SE protocol and the keepChannelOpen flag is set to true, the transmit method returns immediately with a List of keyple::core::seproxy::message::SeResponse. This response contains the received response from the matching SE in the last position of set. The previous one are set to null, the logical channel is open.

If the protocol flag set in the request match the current SE protocol and the keepChannelOpen flag is set to false, the transmission go on for the next keyple::core::seproxy::message::SeRequest. The channel is left closed.

This method could also fail in case of IO error or wrong card currentState → some reader’s exception (SE missing, IO error, wrong card currentState, timeout) have to be caught during the processing of the SE request transmission.

Parameters
seRequestsa list of application requests
multiSeRequestProcessingthe multi se processing mode
channelControlindicates if the channel has to be closed at the end of the transmission
Returns
the SE response
Exceptions
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implemented in keyple::core::seproxy::plugin::AbstractReader.


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