Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#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< SeResponse > | transmitSeRequest (std::shared_ptr< SeRequest > seRequest, const ChannelControl &channelControl)=0 |
![]() | |
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 TransmissionMode & | getTransmissionMode () const =0 |
virtual bool | operator== (const SeReader &o) const |
![]() | |
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 > ¶meters) |
ProxyReader interface
This interface should be implemented by any specific reader plugin.
|
inlinevirtual |
|
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. *
seRequest | the SeRequest to transmit |
channelControl | a flag to tell if the channel has to be closed at the end |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implemented in keyple::core::seproxy::plugin::AbstractReader.
|
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.
seRequests | a list of application requests |
multiSeRequestProcessing | the multi se processing mode |
channelControl | indicates if the channel has to be closed at the end of the transmission |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implemented in keyple::core::seproxy::plugin::AbstractReader.