![]() |
Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
|
#include <AbstractApduCommand.h>
Classes | |
class | StatusProperties |
Public Member Functions | |
AbstractApduCommand (const CardCommand &commandRef) | |
virtual void | addSubName (const std::string &subName) final |
virtual const CardCommand & | getCommandRef () const |
virtual const std::string & | getName () const final |
virtual void | setApduRequest (const std::shared_ptr< ApduRequestAdapter > apduRequest) final |
virtual const std::shared_ptr< ApduRequestAdapter > | getApduRequest () const final |
virtual AbstractApduCommand & | setApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) |
virtual const std::shared_ptr< ApduResponseApi > | getApduResponse () const final |
virtual const std::map< const int, const std::shared_ptr< StatusProperties > > & | getStatusTable () const |
virtual const CalypsoApduCommandException | buildCommandException (const std::type_info &exceptionClass, const std::string &message, const CardCommand &commandRef, const int statusWord) const |
virtual bool | isSuccessful () const final |
virtual void | checkStatus () |
virtual const std::string | getStatusInformation () const final |
Static Public Attributes | |
static const std::map< const int, const std::shared_ptr< StatusProperties > > | STATUS_TABLE |
(package-private)
Generic APDU command.
It provides the generic getters to retrieve:
Definition at line 48 of file AbstractApduCommand.h.
keyple::card::calypso::AbstractApduCommand::AbstractApduCommand | ( | const CardCommand & | commandRef | ) |
(package-private)
Constructor
commandRef | The command reference. |
Definition at line 59 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Appends a string to the current name.
The sub name completes the name of the current command. This method must therefore only be invoked conditionally (log level >= debug).
subName | The string to append. |
NullPointerException | If the request is not set. |
Definition at line 62 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
Builds a command exception.
This method should be override in subclasses in order to create specific exceptions.
exceptionClass | the exception class. |
message | the message. |
commandRef | CardCommand the command reference. |
statusWord | the status word. |
Reimplemented in keyple::card::calypso::AbstractCardCommand, and keyple::card::calypso::AbstractSamCommand.
Definition at line 108 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
This method check the status word.
If status word is not referenced, then status is considered unsuccessful.
CalypsoApduCommandException | if status is not successful. |
Reimplemented in keyple::card::calypso::AbstractCardCommand, and keyple::card::calypso::AbstractSamCommand.
Definition at line 137 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets the ApduRequestAdapter.
Definition at line 84 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets ApduResponseApi
Definition at line 97 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
Gets CardCommand the current command identification
Reimplemented in keyple::card::calypso::AbstractCardCommand, and keyple::card::calypso::AbstractSamCommand.
Definition at line 68 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets the name of this APDU command.
Definition at line 73 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets the ASCII message from the statusTable for the current status word.
Definition at line 160 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
Returns the internal status table
Reimplemented in keyple::card::calypso::AbstractSamCommand, keyple::card::calypso::CmdCardAppendRecord, keyple::card::calypso::CmdCardChangeKey, keyple::card::calypso::CmdCardChangePin, keyple::card::calypso::CmdCardCloseSession, keyple::card::calypso::CmdCardGetDataEfList, keyple::card::calypso::CmdCardGetDataFci, keyple::card::calypso::CmdCardGetDataFcp, keyple::card::calypso::CmdCardGetDataTraceabilityInformation, keyple::card::calypso::CmdCardIncreaseOrDecrease, keyple::card::calypso::CmdCardIncreaseOrDecreaseMultiple, keyple::card::calypso::CmdCardInvalidate, keyple::card::calypso::CmdCardOpenSession, keyple::card::calypso::CmdCardReadBinary, keyple::card::calypso::CmdCardReadRecordMultiple, keyple::card::calypso::CmdCardReadRecords, keyple::card::calypso::CmdCardRehabilitate, keyple::card::calypso::CmdCardSearchRecordMultiple, keyple::card::calypso::CmdCardSelectFile, keyple::card::calypso::CmdCardSvDebit, keyple::card::calypso::CmdCardSvGet, keyple::card::calypso::CmdCardSvReload, keyple::card::calypso::CmdCardSvUndebit, keyple::card::calypso::CmdCardUpdateOrWriteBinary, keyple::card::calypso::CmdCardUpdateRecord, keyple::card::calypso::CmdCardVerifyPin, keyple::card::calypso::CmdCardWriteRecord, keyple::card::calypso::CmdSamCardCipherPin, keyple::card::calypso::CmdSamCardGenerateKey, keyple::card::calypso::CmdSamDigestAuthenticate, keyple::card::calypso::CmdSamDigestClose, keyple::card::calypso::CmdSamDigestInit, keyple::card::calypso::CmdSamDigestUpdate, keyple::card::calypso::CmdSamGetChallenge, keyple::card::calypso::CmdSamGiveRandom, keyple::card::calypso::CmdSamSelectDiversifier, keyple::card::calypso::CmdSamSvCheck, keyple::card::calypso::CmdSamSvPrepareDebit, keyple::card::calypso::CmdSamSvPrepareLoad, keyple::card::calypso::CmdSamSvPrepareUndebit, and keyple::card::calypso::CmdSamUnlock.
Definition at line 103 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets true if the status is successful from the statusTable according to the current status code.
Definition at line 130 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Sets the command ApduRequestAdapter.
apduRequest | The APDU request. |
Definition at line 78 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
Sets the command ApduResponseApi.
apduResponse | The APDU response. |
Reimplemented in keyple::card::calypso::AbstractCardCommand, keyple::card::calypso::AbstractSamCommand, keyple::card::calypso::CmdCardCloseSession, keyple::card::calypso::CmdCardGetDataFci, keyple::card::calypso::CmdCardIncreaseOrDecreaseMultiple, keyple::card::calypso::CmdCardOpenSession, keyple::card::calypso::CmdCardReadRecordMultiple, keyple::card::calypso::CmdCardReadRecords, keyple::card::calypso::CmdCardSearchRecordMultiple, keyple::card::calypso::CmdCardSvDebit, keyple::card::calypso::CmdCardSvGet, keyple::card::calypso::CmdCardSvReload, and keyple::card::calypso::CmdCardSvUndebit.
Definition at line 89 of file AbstractApduCommand.cpp.
|
static |
(package-private)
This Map stores expected status that could be by default initialized with sw1=90 and sw2=00 (Success)
Definition at line 129 of file AbstractApduCommand.h.