![]() |
Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
|
#include <AbstractApduCommand.h>

Classes | |
| class | StatusProperties |
Public Member Functions | |
| AbstractApduCommand (const CardCommand &commandRef, const int expectedResponseLength) | |
| virtual void | addSubName (const std::string &subName) final |
| virtual const CardCommand & | getCommandRef () const |
| virtual const std::string & | getName () const final |
| virtual void | setExpectedResponseLength (const int expectedResponseLength) final |
| virtual void | setApduRequest (const std::shared_ptr< ApduRequestAdapter > apduRequest) final |
| virtual const std::shared_ptr< ApduRequestAdapter > | getApduRequest () const final |
| virtual void | parseApduResponse (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 =0 |
| virtual const CalypsoApduCommandException | buildUnexpectedResponseLengthException (const std::string &message) const =0 |
| virtual bool | isSuccessful () const final |
| 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, |
| const int | expectedResponseLength | ||
| ) |
(package-private)
Constructor
| commandRef | The command reference. |
| expectedResponseLength | The expected response length or -1 if not specified. |
Definition at line 87 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 90 of file AbstractApduCommand.cpp.
|
pure virtual |
(package-private)
Builds a specific APDU command exception.
| message | The message. |
Implemented in keyple::card::calypso::AbstractCardCommand, and keyple::card::calypso::AbstractSamCommand.
|
pure virtual |
(package-private)
Builds a specific APDU command exception for the case of an unexpected response length.
| message | The message. |
Implemented in keyple::card::calypso::AbstractCardCommand, and keyple::card::calypso::AbstractSamCommand.
|
finalvirtual |
(package-private)
Gets the ApduRequestAdapter.
Definition at line 117 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets ApduResponseApi
Definition at line 129 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 96 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets the name of this APDU command.
Definition at line 101 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets the ASCII message from the statusTable for the current status word.
Definition at line 316 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::CmdCardSvDebitOrUndebit, keyple::card::calypso::CmdCardSvGet, keyple::card::calypso::CmdCardSvReload, 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::CmdSamDataCipher, keyple::card::calypso::CmdSamDigestAuthenticate, keyple::card::calypso::CmdSamDigestClose, keyple::card::calypso::CmdSamDigestInit, keyple::card::calypso::CmdSamDigestUpdate, keyple::card::calypso::CmdSamDigestUpdateMultiple, keyple::card::calypso::CmdSamGetChallenge, keyple::card::calypso::CmdSamGiveRandom, keyple::card::calypso::CmdSamPsoComputeSignature, keyple::card::calypso::CmdSamPsoVerifySignature, keyple::card::calypso::CmdSamReadCeilings, keyple::card::calypso::CmdSamReadEventCounter, keyple::card::calypso::CmdSamReadKeyParameters, keyple::card::calypso::CmdSamSelectDiversifier, keyple::card::calypso::CmdSamSvCheck, keyple::card::calypso::CmdSamSvPrepareDebitOrUndebit, keyple::card::calypso::CmdSamSvPrepareLoad, keyple::card::calypso::CmdSamUnlock, and keyple::card::calypso::CmdSamWriteKey.
Definition at line 135 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Gets true if the status is successful from the statusTable according to the current status code and if the length of the response is equal to the LE field in the request.
Definition at line 149 of file AbstractApduCommand.cpp.
|
virtual |
(package-private)
Parses the response ApduResponseApi and check the status word.
| apduResponse | The APDU response. |
| CalypsoApduCommandException | if status is not successful or if the length of the response is not equal to the LE field in the request. |
Reimplemented in keyple::card::calypso::AbstractCardCommand, keyple::card::calypso::AbstractSamCommand, keyple::card::calypso::CmdCardAppendRecord, keyple::card::calypso::CmdCardCloseSession, keyple::card::calypso::CmdCardGetChallenge, 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::CmdCardOpenSession, keyple::card::calypso::CmdCardReadBinary, keyple::card::calypso::CmdCardReadRecordMultiple, keyple::card::calypso::CmdCardReadRecords, keyple::card::calypso::CmdCardSearchRecordMultiple, keyple::card::calypso::CmdCardSelectFile, keyple::card::calypso::CmdCardSvDebitOrUndebit, keyple::card::calypso::CmdCardSvGet, keyple::card::calypso::CmdCardSvReload, keyple::card::calypso::CmdCardUpdateRecord, keyple::card::calypso::CmdCardVerifyPin, keyple::card::calypso::CmdCardWriteRecord, keyple::card::calypso::CmdSamDataCipher, keyple::card::calypso::CmdSamPsoComputeSignature, keyple::card::calypso::CmdSamPsoVerifySignature, keyple::card::calypso::CmdCardUpdateOrWriteBinary, keyple::card::calypso::CmdSamReadCeilings, and keyple::card::calypso::CmdSamReadEventCounter.
Definition at line 122 of file AbstractApduCommand.cpp.
|
finalvirtual |
(package-private)
Sets the command ApduRequestAdapter.
| apduRequest | The APDU request. |
Definition at line 111 of file AbstractApduCommand.cpp.
|
finalvirtual |
Sets the expected response length.
Definition at line 106 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.