Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
Public Member Functions | List of all members
keyple::card::calypso::CmdCardGetDataFci Class Referencefinal

#include <CmdCardGetDataFci.h>

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

Public Member Functions

 CmdCardGetDataFci (const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
 
 CmdCardGetDataFci (const CalypsoCardClass calypsoCardClass)
 
bool isSessionBufferUsed () const override
 
void parseApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) override
 
bool isValidCalypsoFCI () const
 
const std::vector< uint8_t > & getDfName () const
 
const std::vector< uint8_t > & getApplicationSerialNumber () const
 
const std::vector< uint8_t > & getDiscretionaryData () const
 
bool isDfInvalidated () const
 
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable () const override
 
- Public Member Functions inherited from keyple::card::calypso::AbstractCardCommand
 AbstractCardCommand (const CalypsoCardCommand &commandRef, const int expectedResponseLength, const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
 
const CalypsoCardCommandgetCommandRef () const override
 
const CalypsoApduCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message) const final
 
const CalypsoApduCommandException buildUnexpectedResponseLengthException (const std::string &message) const final
 
std::shared_ptr< CalypsoCardAdaptergetCalypsoCard () const
 
void parseApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse, const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
 
- Public Member Functions inherited from keyple::card::calypso::AbstractApduCommand
 AbstractApduCommand (const CardCommand &commandRef, const int expectedResponseLength)
 
virtual void addSubName (const std::string &subName) final
 
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< ApduRequestAdaptergetApduRequest () const final
 
virtual const std::shared_ptr< ApduResponseApi > getApduResponse () const final
 
virtual bool isSuccessful () const final
 
virtual const std::string getStatusInformation () const final
 

Additional Inherited Members

- 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)
Builds the Get data APDU commands for the FCI tag.

In contact mode, this command can not be sent in a secure session because it would generate a 6Cxx status and thus make calculation of the digest impossible.

Since
2.0.1

Definition at line 47 of file CmdCardGetDataFci.h.

Constructor & Destructor Documentation

◆ CmdCardGetDataFci() [1/2]

keyple::card::calypso::CmdCardGetDataFci::CmdCardGetDataFci ( const std::shared_ptr< CalypsoCardAdapter calypsoCard)

(package-private)
Instantiates a new CmdCardGetDataFci.

Parameters
calypsoCardThe Calypso card.
Since
2.2.3

Definition at line 38 of file CmdCardGetDataFci.cpp.

◆ CmdCardGetDataFci() [2/2]

keyple::card::calypso::CmdCardGetDataFci::CmdCardGetDataFci ( const CalypsoCardClass  calypsoCardClass)

(package-private)
Instantiates a new CmdCardGetDataFci.

Parameters
calypsoCardClassindicates which CLA byte should be used for the Apdu.
Since
2.0.1

Definition at line 44 of file CmdCardGetDataFci.cpp.

Member Function Documentation

◆ getApplicationSerialNumber()

const std::vector< uint8_t > & keyple::card::calypso::CmdCardGetDataFci::getApplicationSerialNumber ( ) const

(package-private)
Gets the application serial number

Returns
An array of bytes
Since
2.0.1

Definition at line 165 of file CmdCardGetDataFci.cpp.

◆ getDfName()

const std::vector< uint8_t > & keyple::card::calypso::CmdCardGetDataFci::getDfName ( ) const

(package-private)
Gets the DF name

Returns
An array of bytes
Since
2.0.1

Definition at line 160 of file CmdCardGetDataFci.cpp.

◆ getDiscretionaryData()

const std::vector< uint8_t > & keyple::card::calypso::CmdCardGetDataFci::getDiscretionaryData ( ) const

(package-private)
Gets the discretionary data

Returns
An array of bytes
Since
2.0.1

Definition at line 170 of file CmdCardGetDataFci.cpp.

◆ getStatusTable()

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

(package-private)
Returns the internal status table

Returns
A not null reference
Since
2.0.1

Since
2.0.1

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

Definition at line 202 of file CmdCardGetDataFci.cpp.

◆ isDfInvalidated()

bool keyple::card::calypso::CmdCardGetDataFci::isDfInvalidated ( ) const

(package-private)
Tells if the DF is invalidated

Returns
True if the DF is invalidated, false if not
Since
2.0.1

Definition at line 175 of file CmdCardGetDataFci.cpp.

◆ isSessionBufferUsed()

bool keyple::card::calypso::CmdCardGetDataFci::isSessionBufferUsed ( ) const
overridevirtual

(package-private)
Indicates if the session buffer is used when executing this command.Allows the management of the overflow of this buffer.

Returns
True if this command uses the session buffer
Since
2.0.1

Returns
False
Since
2.0.1

Implements keyple::card::calypso::AbstractCardCommand.

Definition at line 62 of file CmdCardGetDataFci.cpp.

◆ isValidCalypsoFCI()

bool keyple::card::calypso::CmdCardGetDataFci::isValidCalypsoFCI ( ) const

(package-private)
Tells if the FCI is valid

Returns
True if the FCI is valid, false if not
Since
2.0.1

Definition at line 155 of file CmdCardGetDataFci.cpp.

◆ parseApduResponse()

void keyple::card::calypso::CmdCardGetDataFci::parseApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse)
overridevirtual

(package-private)
Parses the response ApduResponseApi and check the status word.

Parameters
apduResponseThe APDU response.
Exceptions
CalypsoApduCommandExceptionif status is not successful or if the length of the response is not equal to the LE field in the request.
Since
2.0.1
Since
2.0.1

The expected FCI structure of a Calypso card follows this scheme: T=6F L=XX (C) FCI Template T=84 L=XX (P) DF Name T=A5 L=22 (C) FCI Proprietary Template T=BF0C L=19 (C) FCI Issuer Discretionary Data T=C7 L=8 (P) Application Serial Number T=53 L=7 (P) Discretionary Data (Startup Information)

The ApduResponseApi provided in argument is parsed according to the above expected structure.

DF Name, Application Serial Number and Startup Information are extracted.

The 7-byte startup information field is also split into 7 private field made available through dedicated getter methods.

All fields are pre-initialized to handle the case where the parsing fails.

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractCardCommand.

Definition at line 67 of file CmdCardGetDataFci.cpp.


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