LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
logicalaccess::CardProbe Class Referenceabstract

#include <cardprobe.hpp>

Inheritance diagram for logicalaccess::CardProbe:
logicalaccess::PCSCCardProbe logicalaccess::CL1356CardProbe logicalaccess::SpringCardProbe

Public Member Functions

virtual ~CardProbe ()=default
 
 CardProbe (ReaderUnit *ru)
 
 CardProbe (const CardProbe &)=delete
 
virtual std::string guessCardType ()
 
virtual bool is_desfire (ByteVector *uid=nullptr)=0
 
virtual bool is_desfire_ev1 (ByteVector *uid=nullptr)=0
 
virtual bool is_desfire_ev2 (ByteVector *uid=nullptr)=0
 
virtual bool is_desfire_ev3 (ByteVector *uid=nullptr)=0
 
virtual bool is_mifare_ultralight_c ()=0
 
virtual bool maybe_mifare_classic ()=0
 
virtual bool has_desfire_random_uid (ByteVector *uid)=0
 

Protected Attributes

ReaderUnitreader_unit_
 

Detailed Description

An object whose responsibility is to detect the type of card by sending command to it and analysing response.

The probe makes use of a ReaderUnit to create temporary chips and send them commands.

The probing infrastructure is not very robust because hardware behaviour if not properly defined. This class may be reimplemented for some reader unit that behave differently.

Constructor & Destructor Documentation

◆ ~CardProbe()

virtual logicalaccess::CardProbe::~CardProbe ( )
virtualdefault

◆ CardProbe() [1/2]

CardProbe::CardProbe ( ReaderUnit ru)
explicit

◆ CardProbe() [2/2]

logicalaccess::CardProbe::CardProbe ( const CardProbe )
delete

Member Function Documentation

◆ guessCardType()

std::string CardProbe::guessCardType ( )
virtual

◆ has_desfire_random_uid()

virtual bool logicalaccess::CardProbe::has_desfire_random_uid ( ByteVector uid)
pure virtual

Is random UID enabled for a DESFire card.

Parameters
uidThe UID in case random UID is DISABLED. Otherwise *uid wont be set.

Implemented in logicalaccess::PCSCCardProbe.

◆ is_desfire()

virtual bool logicalaccess::CardProbe::is_desfire ( ByteVector uid = nullptr)
pure virtual

Test if the card is DESFire by sending the getversion command.

The optional *uid vector will be populate with the uid retrieve from the getversion command, unless the command failed.

Implemented in logicalaccess::PCSCCardProbe.

◆ is_desfire_ev1()

virtual bool logicalaccess::CardProbe::is_desfire_ev1 ( ByteVector uid = nullptr)
pure virtual

Test if the card is DESFire EV1 by sending the getversion command.

The optional *uid vector will be populate with the uid retrieve from the getversion command, unless the command failed.

Implemented in logicalaccess::PCSCCardProbe.

◆ is_desfire_ev2()

virtual bool logicalaccess::CardProbe::is_desfire_ev2 ( ByteVector uid = nullptr)
pure virtual

Test if the card is DESFire EV2 by sending the getversion command.

The optional *uid vector will be populate with the uid retrieve from the getversion command, unless the command failed.

Implemented in logicalaccess::PCSCCardProbe.

◆ is_desfire_ev3()

virtual bool logicalaccess::CardProbe::is_desfire_ev3 ( ByteVector uid = nullptr)
pure virtual

Test if the card is DESFire EV2 by sending the getversion command.

The optional *uid vector will be populate with the uid retrieve from the getversion command, unless the command failed.

Implemented in logicalaccess::PCSCCardProbe.

◆ is_mifare_ultralight_c()

virtual bool logicalaccess::CardProbe::is_mifare_ultralight_c ( )
pure virtual

Test if the card is Mifare Ultralight C by sending the authenticate command.

Implemented in logicalaccess::PCSCCardProbe.

◆ maybe_mifare_classic()

virtual bool logicalaccess::CardProbe::maybe_mifare_classic ( )
pure virtual

Could the card be a Mifare Classic ?

This is less precise that the is_desfire*() function.

Implemented in logicalaccess::CL1356CardProbe, logicalaccess::PCSCCardProbe, and logicalaccess::SpringCardProbe.

Member Data Documentation

◆ reader_unit_

ReaderUnit* logicalaccess::CardProbe::reader_unit_
protected

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