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

#include <ReadRecordsRespPars.h>

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

Public Member Functions

 ReadRecordsRespPars (std::shared_ptr< ApduResponse > apduResponse, ReadRecordsCmdBuild *builder)
 
std::map< int, std::vector< uint8_t > > getRecords () 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
 

Additional Inherited Members

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

Detailed Description

Read Records (00B2) response parser. See specs: Calypso / page 89 / 9.4.7 Read Records The keyple::calypso::command::po::parser::ReadRecordsRespPars class holds the data resulting from a Read Records command. It provides methods to retrieve these data according to the file structure profile specified in the command preparation step: SINGLE or MULTIPLE RECORD or COUNTER.

Constructor & Destructor Documentation

◆ ReadRecordsRespPars()

keyple::calypso::command::po::parser::ReadRecordsRespPars::ReadRecordsRespPars ( std::shared_ptr< ApduResponse apduResponse,
ReadRecordsCmdBuild builder 
)

Instantiates a new ReadRecordsRespPars.

Parameters
apduResponsethe response from the PO
builderthe reference to the builder that created this parser

Member Function Documentation

◆ getRecords()

std::map< int, std::vector< uint8_t > > keyple::calypso::command::po::parser::ReadRecordsRespPars::getRecords ( ) const

Parses the Apdu response as a data record (single or multiple), retrieves the records and place it in an map.

The map index follows the PO specification, i.e. starts at 1 for the first record.

An empty map is returned if no data is available.

Returns
a map of records

◆ getStatusTable()

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

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


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