Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
keyple::calypso::command::po::parser::GetDataFciRespPars Class Referencefinal

#include <GetDataFciRespPars.h>

Inherits keyple::calypso::command::po::AbstractPoResponseParser.

Public Member Functions

 GetDataFciRespPars (std::shared_ptr< ApduResponse > response, GetDataFciCmdBuild *builder)
 
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
 
- Public Member Functions inherited from keyple::calypso::command::po::AbstractPoResponseParser
 AbstractPoResponseParser (std::shared_ptr< ApduResponse > response, AbstractPoCommandBuilder< AbstractPoResponseParser > *builder)
 
 AbstractPoResponseParser (const AbstractPoResponseParser &arp)=default
 
virtual ~AbstractPoResponseParser ()=default
 
virtual AbstractPoCommandBuilder< AbstractPoResponseParser > * getBuilder () const override
 
void checkStatus () const override
 
- Public Member Functions inherited from keyple::core::command::AbstractApduResponseParser
 AbstractApduResponseParser (const std::shared_ptr< ApduResponse > response, AbstractApduCommandBuilder *builder)
 
 AbstractApduResponseParser (const AbstractApduResponseParser &aarp)=default
 
virtual ~AbstractApduResponseParser ()=default
 
void setApduResponse (const std::shared_ptr< ApduResponse > &response)
 
const std::shared_ptr< ApduResponsegetApduResponse () const
 
virtual bool isSuccessful () const
 
std::string getStatusInformation () const
 

Protected Member Functions

const std::map< int, std::shared_ptr< StatusProperties > > & getStatusTable () const override
 
- Protected Member Functions inherited from keyple::calypso::command::po::AbstractPoResponseParser
const KeypleSeCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const std::shared_ptr< SeCommand > commandRef, const int statusCode) const override
 
- Protected Member Functions inherited from keyple::core::command::AbstractApduResponseParser
virtual const std::shared_ptr< SeCommandgetCommandRef () const
 

Protected Attributes

const std::shared_ptr< Loggerlogger
 
- Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
std::shared_ptr< ApduResponsemResponse
 
AbstractApduCommandBuildermBuilder
 

Additional Inherited Members

- Static Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
static const std::map< int, std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Detailed Description

Extracts information from the FCI data returned is response to the selection application command.

Provides getter methods for all relevant information.

Constructor & Destructor Documentation

◆ GetDataFciRespPars()

keyple::calypso::command::po::parser::GetDataFciRespPars::GetDataFciRespPars ( std::shared_ptr< ApduResponse response,
GetDataFciCmdBuild builder 
)

Instantiates a new GetDataFciRespPars from the ApduResponse to a selection application command.

The expected FCI structure of a Calypso PO 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 ApduResponse 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.

Parameters
responsethe select application response from Get Data APDU command
builderthe reference to the builder that created this parser

Member Function Documentation

◆ getApplicationSerialNumber()

const std::vector< uint8_t > & keyple::calypso::command::po::parser::GetDataFciRespPars::getApplicationSerialNumber ( ) const

◆ getDfName()

const std::vector< uint8_t > & keyple::calypso::command::po::parser::GetDataFciRespPars::getDfName ( ) const

◆ getDiscretionaryData()

const std::vector< uint8_t > & keyple::calypso::command::po::parser::GetDataFciRespPars::getDiscretionaryData ( ) const

◆ getStatusTable()

const std::map< int, std::shared_ptr< StatusProperties > > & keyple::calypso::command::po::parser::GetDataFciRespPars::getStatusTable ( ) const
overrideprotectedvirtual
Returns
the internal status table

Reimplemented from keyple::core::command::AbstractApduResponseParser.

◆ isDfInvalidated()

bool keyple::calypso::command::po::parser::GetDataFciRespPars::isDfInvalidated ( ) const

◆ isValidCalypsoFCI()

bool keyple::calypso::command::po::parser::GetDataFciRespPars::isValidCalypsoFCI ( ) const

Member Data Documentation

◆ logger

const std::shared_ptr<Logger> keyple::calypso::command::po::parser::GetDataFciRespPars::logger
protected
Initial value:

The documentation for this class was generated from the following files:
keyple::calypso::command::po::parser::GetDataFciRespPars::GetDataFciRespPars
GetDataFciRespPars(std::shared_ptr< ApduResponse > response, GetDataFciCmdBuild *builder)
Definition: GetDataFciRespPars.cpp:95
keyple::common::LoggerFactory::getLogger
static std::shared_ptr< Logger > getLogger(const std::type_info &type)
Definition: LoggerFactory.cpp:21