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

#include <CardAbsentPingMonitoringJob.h>

Inherits keyple::core::seproxy::plugin::AbstractMonitoringJob.

Public Member Functions

 CardAbsentPingMonitoringJob (AbstractObservableLocalReader *reader)
 
 CardAbsentPingMonitoringJob (AbstractObservableLocalReader *reader, long removalWait)
 
std::future< void > startMonitoring (AbstractObservableState *state, std::atomic< bool > &cancellationFlag) override
 
void monitoringJob (AbstractObservableState *state, std::atomic< bool > &cancellationFlag)
 
void stop () override
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::AbstractMonitoringJob
 AbstractMonitoringJob ()
 
virtual ~AbstractMonitoringJob ()
 
bool isRunning () const
 

Additional Inherited Members

- Protected Attributes inherited from keyple::core::seproxy::plugin::AbstractMonitoringJob
std::atomic< bool > mRunning
 

Detailed Description

Ping the SE to detect removal thanks to the method AbstractObservableLocalReader#isSePresentPing(). This method is invoked in another thread.

This job should be used by readers who do not have the ability to natively detect the disappearance of the SE at the end of the transaction.

It is based on sending a neutral APDU command as long as the SE is responding, an internal SE_REMOVED event is fired when the SE is no longer responding.

By default a delay of 200 ms is inserted between each APDU sending .

Constructor & Destructor Documentation

◆ CardAbsentPingMonitoringJob() [1/2]

keyple::core::seproxy::plugin::CardAbsentPingMonitoringJob::CardAbsentPingMonitoringJob ( AbstractObservableLocalReader reader)

Create a job monitor job that ping the SE with the method isSePresentPing()

Parameters
reader: reference to the reader

◆ CardAbsentPingMonitoringJob() [2/2]

keyple::core::seproxy::plugin::CardAbsentPingMonitoringJob::CardAbsentPingMonitoringJob ( AbstractObservableLocalReader reader,
long  removalWait 
)

Create a job monitor job that ping the SE with the method isSePresentPing()

Parameters
reader: reference to the reader
removalWait: delay between between each APDU sending

Member Function Documentation

◆ monitoringJob()

void keyple::core::seproxy::plugin::CardAbsentPingMonitoringJob::monitoringJob ( AbstractObservableState state,
std::atomic< bool > &  cancellationFlag 
)

◆ startMonitoring()

std::future< void > keyple::core::seproxy::plugin::CardAbsentPingMonitoringJob::startMonitoring ( AbstractObservableState state,
std::atomic< bool > &  cancellationFlag 
)
overridevirtual

◆ stop()

void keyple::core::seproxy::plugin::CardAbsentPingMonitoringJob::stop ( )
overridevirtual

(package-private)

Reimplemented from keyple::core::seproxy::plugin::AbstractMonitoringJob.


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