Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
Public Member Functions | Static Public Attributes | List of all members
keyple::card::calypso::AbstractSamCommand Class Reference

#include <AbstractSamCommand.h>

Inheritance diagram for keyple::card::calypso::AbstractSamCommand:
Inheritance graph
[legend]
Collaboration diagram for keyple::card::calypso::AbstractSamCommand:
Collaboration graph
[legend]

Public Member Functions

const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable () const override
 
 AbstractSamCommand (const CalypsoSamCommand &commandRef)
 
const CalypsoSamCommandgetCommandRef () const override
 
const CalypsoApduCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const CardCommand &commandRef, const int statusWord) const final
 
AbstractSamCommandsetApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) override
 
void checkStatus () override
 
- Public Member Functions inherited from keyple::card::calypso::AbstractApduCommand
 AbstractApduCommand (const CardCommand &commandRef)
 
virtual void addSubName (const std::string &subName) final
 
virtual const std::string & getName () const final
 
virtual void setApduRequest (const std::shared_ptr< ApduRequestAdapter > apduRequest) final
 
virtual const std::shared_ptr< ApduRequestAdaptergetApduRequest () const final
 
virtual const std::shared_ptr< ApduResponseApi > getApduResponse () const final
 
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 = initStatusTable()
 
- Static Public Attributes inherited from keyple::card::calypso::AbstractApduCommand
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Detailed Description

(package-private)
Superclass for all SAM command.

Since
2.0.1

Definition at line 34 of file AbstractSamCommand.h.

Constructor & Destructor Documentation

◆ AbstractSamCommand()

keyple::card::calypso::AbstractSamCommand::AbstractSamCommand ( const CalypsoSamCommand commandRef)

(package-private)
Constructor dedicated for the building of referenced Calypso commands

Parameters
commandRefa command reference from the Calypso command table.
Since
2.0.1

Definition at line 33 of file AbstractSamCommand.cpp.

Member Function Documentation

◆ buildCommandException()

const CalypsoApduCommandException keyple::card::calypso::AbstractSamCommand::buildCommandException ( const std::type_info &  exceptionClass,
const std::string &  message,
const CardCommand commandRef,
const int  statusWord 
) const
finalvirtual

(package-private)
Builds a command exception.This method should be override in subclasses in order to create specific exceptions.

Parameters
exceptionClassthe exception class.
messagethe message.
commandRefCardCommand the command reference.
statusWordthe status word.
Returns
A not null value
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 41 of file AbstractSamCommand.cpp.

◆ checkStatus()

void keyple::card::calypso::AbstractSamCommand::checkStatus ( )
overridevirtual

(package-private)
This method check the status word.
If status word is not referenced, then status is considered unsuccessful.

Exceptions
CalypsoApduCommandExceptionif status is not successful.
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 76 of file AbstractSamCommand.cpp.

◆ getCommandRef()

const CalypsoSamCommand & keyple::card::calypso::AbstractSamCommand::getCommandRef ( ) const
overridevirtual

(package-private)
Gets CardCommand the current command identification

Returns
A not null reference.
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 36 of file AbstractSamCommand.cpp.

◆ getStatusTable()

const std::map< const int, const std::shared_ptr< StatusProperties > > & keyple::card::calypso::AbstractSamCommand::getStatusTable ( ) const
overridevirtual

◆ setApduResponse()

AbstractSamCommand & keyple::card::calypso::AbstractSamCommand::setApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse)
overridevirtual

(package-private)
Sets the command ApduResponseApi.

Parameters
apduResponseThe APDU response.
Returns
The current instance.
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 70 of file AbstractSamCommand.cpp.

Member Data Documentation

◆ STATUS_TABLE

const std::map< const int, const std::shared_ptr< StatusProperties > > keyple::card::calypso::AbstractSamCommand::STATUS_TABLE = initStatusTable()
static

(package-private)
Default SAM product type.

Since
2.0.1

Definition at line 42 of file AbstractSamCommand.h.


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