Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <AbstractReader.h>
Inherits keyple::core::seproxy::plugin::AbstractSeProxyComponent, and keyple::core::seproxy::message::ProxyReader.
Inherited by keyple::core::seproxy::plugin::AbstractLocalReader.
Public Member Functions | |
std::vector< std::shared_ptr< SeResponse > > | transmitSeRequests (const std::vector< std::shared_ptr< SeRequest >> &seRequests, const MultiSeRequestProcessing &multiSeRequestProcessing, const ChannelControl &channelControl) override |
std::shared_ptr< SeResponse > | transmitSeRequest (std::shared_ptr< SeRequest > seRequest, const ChannelControl &channelControl) override |
const std::string & | getPluginName () const |
const std::string & | getName () const override |
![]() | |
AbstractSeProxyComponent (const std::string &name) | |
virtual | ~AbstractSeProxyComponent ()=default |
const std::string & | getName () const |
void | setParameters (const std::map< const std::string, const std::string > ¶meters) |
virtual void | setParameter (const std::string &key, const std::string &value)=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::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) |
Protected Member Functions | |
AbstractReader (const std::string &pluginName, const std::string &name) | |
virtual | ~AbstractReader ()=default |
virtual std::vector< std::shared_ptr< SeResponse > > | processSeRequests (const std::vector< std::shared_ptr< SeRequest >> &seRequests, const MultiSeRequestProcessing &multiSeRequestProcessing, const ChannelControl &channelControl)=0 |
virtual std::shared_ptr< SeResponse > | processSeRequest (const std::shared_ptr< SeRequest > seRequest, const ChannelControl &channelControl)=0 |
Protected Attributes | |
std::shared_ptr< DefaultSelectionsRequest > | mDefaultSelectionsRequest |
ObservableReader::NotificationMode | mNotificationMode |
Abstract definition of an observable reader.
|
protected |
Reader constructor
Force the definition of a name through the use of super method.
Initialize the time measurement
pluginName | the name of the plugin that instantiated the reader |
name | the name of the reader |
|
protectedvirtualdefault |
|
inlineoverridevirtual |
C++ vs. Java: have to override the method here to link ProxyElement interface to actual implementation
Implements keyple::core::seproxy::ProxyElement.
Reimplemented in keyple::plugin::pcsc::PcscReaderImpl.
const std::string & keyple::core::seproxy::plugin::AbstractReader::getPluginName | ( | ) | const |
Gets the name of plugin provided in the constructor.
The method will be used particularly for logging purposes. The plugin name is also part of the ReaderEvent and PluginEvent objects.
|
protectedpure virtual |
Abstract method implemented by the AbstractLocalReader and VirtualReader classes.
This method is handled by transmit.
seRequest | the keyple::core::seproxy::message::SeRequest to be processed |
channelControl | a flag indicating if the channel has to be closed after the processing of the keyple::core::seproxy::message::SeRequest |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implemented in keyple::core::seproxy::plugin::AbstractLocalReader.
|
protectedpure virtual |
Abstract method implemented by the AbstractLocalReader and VirtualReader classes.
This method is handled by transmitSet.
seRequests | a list of keyple::core::seproxy::message::SeRequest to be processed |
multiSeRequestProcessing | the multi se processing mode |
channelControl | indicates if the channel has to be closed at the end of the processing |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implemented in keyple::core::seproxy::plugin::AbstractLocalReader.
|
overridevirtual |
Execute the transmission of a keyple::core::seproxy::message::SeRequest and returns a keyple::core::seproxy::message::SeResponse
The individual execution time (inter-exchange and communication) and the keyple::core::seproxy::message::SeRequest content is logged (DEBUG level).
As the method is final, it cannot be extended.
seRequest | the request to be transmitted |
channelControl | indicates if the channel has to be closed at the end of the processing |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implements keyple::core::seproxy::message::ProxyReader.
|
overridevirtual |
Execute the transmission of a list of keyple::core::seproxy::message::SeRequest and returns a list of keyple::core::seproxy::message::SeResponse
The keyple::core::seproxy::MultiSeRequestProcessing parameter indicates whether all requests are to be sent regardless of their result (PROCESS_ALL) or whether the process should stop at the first request whose result is a success (FIRST_MATCH).
The keyple::core::seproxy::message::ChannelControl parameter specifies whether the physical channel should be closed (CLOSE_AFTER) or not (KEEP_OPEN) after all requests have been transmitted.
The global execution time (inter-exchange and communication) and the Set of SeRequest content is logged (DEBUG level).
As the method is final, it cannot be extended.
seRequests | the request set |
multiSeRequestProcessing | the multi SE request processing mode |
channelControl | the channel control indicator |
KeypleReaderIOException | if the communication with the reader or the SE has failed |
Implements keyple::core::seproxy::message::ProxyReader.
|
protected |
The default DefaultSelectionsRequest to be executed upon SE insertion
|
protected |
Indicate if all SE detected should be notified or only matching SE