Keypop Reader C++ API 2.0.0
Reference Reader API for C++
Public Member Functions | List of all members
keypop::reader::selection::CardSelector< T > Class Template Referenceabstract

#include <CardSelector.hpp>

Inheritance diagram for keypop::reader::selection::CardSelector< T >:
Inheritance graph
[legend]

Public Member Functions

virtual T & filterByCardProtocol (const std::string &logicalProtocolName)=0
 
virtual T & filterByPowerOnData (const std::string &powerOnDataRegex)=0
 

Detailed Description

template<typename T>
class keypop::reader::selection::CardSelector< T >

Common filters used to restrict the selection process to certain cards.

These filters are all optional but can also be combined.

If no filtering is specified, any card that responds when inserted in the reader will be considered selected.

Conversely, if one or more filters have been defined, the card will not be selected if one of them rejects the card.

Parameters
<T>The type of the lowest level child object.
Since
2.0.0

Definition at line 33 of file CardSelector.hpp.

Member Function Documentation

◆ filterByCardProtocol()

template<typename T >
virtual T & keypop::reader::selection::CardSelector< T >::filterByCardProtocol ( const std::string &  logicalProtocolName)
pure virtual

Restricts the selection process to cards communicating with the reader according to a specific protocol, corresponding to the underlying technology: ISO14443-A, ISO14443-B or any other proprietary or standardized communication technology.

The protocol is identified by its logical name.

Prerequisites: the reader must be of type keypop::reader::ConfigurableCardReader and the targeted card protocol(s) must be activated via the keypop::reader::ConfigurableCardReader::activateProtocol(const std::string&, const std::string&) method and associated with the logical name used as a filter.

Parameters
logicalProtocolNameThe logical name of the protocol to use as filter.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf the provided logical protocol name is null or empty.
Since
2.0.0

◆ filterByPowerOnData()

template<typename T >
virtual T & keypop::reader::selection::CardSelector< T >::filterByPowerOnData ( const std::string &  powerOnDataRegex)
pure virtual

Restricts the selection process to cards whose power-on data provided by the reader matches a specific regular expression.

Parameters
powerOnDataRegexThe regular expression to use as filter.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf the provided regular expression is null, empty or invalid.
Since
2.0.0

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