Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Types | Public Member Functions | Friends | List of all members
keyple::calypso::command::po::builder::ReadRecordsCmdBuild Class Referencefinal

#include <ReadRecordsCmdBuild.h>

Inherits keyple::calypso::command::po::AbstractPoCommandBuilder< ReadRecordsRespPars >.

Public Types

enum  ReadMode { ReadMode::ONE_RECORD, ReadMode::MULTIPLE_RECORD }
 

Public Member Functions

 ReadRecordsCmdBuild (const PoClass &poClass, const uint8_t sfi, const uint8_t firstRecordNumber, const ReadMode readMode, const uint8_t expectedLength)
 
std::shared_ptr< ReadRecordsRespParscreateResponseParser (std::shared_ptr< ApduResponse > apduResponse) override
 
bool isSessionBufferUsed () const override
 
uint8_t getSfi () const
 
uint8_t getFirstRecordNumber () const
 
ReadMode getReadMode () const
 
- Public Member Functions inherited from keyple::calypso::command::po::AbstractPoCommandBuilder< ReadRecordsRespPars >
 AbstractPoCommandBuilder (std::shared_ptr< CalypsoPoCommand > commandRef, std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractPoCommandBuilder ()=default
 
virtual const std::shared_ptr< SeCommandgetCommandRef () const override
 
virtual bool isSessionBufferUsed () const=0
 
- Public Member Functions inherited from keyple::core::command::AbstractIso7816CommandBuilder
 AbstractIso7816CommandBuilder (const std::shared_ptr< SeCommand > commandReference, const std::shared_ptr< ApduRequest > request)
 
 AbstractIso7816CommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractIso7816CommandBuilder ()=default
 
- Public Member Functions inherited from keyple::core::command::AbstractApduCommandBuilder
 AbstractApduCommandBuilder (const std::shared_ptr< SeCommand > commandRef, const std::shared_ptr< ApduRequest > request)
 
 AbstractApduCommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractApduCommandBuilder ()=default
 
virtual void addSubName (const std::string &subName)
 
virtual const std::shared_ptr< SeCommandgetCommandRef () const
 
virtual const std::string & getName () const
 
virtual const std::shared_ptr< ApduRequestgetApduRequest () const
 

Friends

KEYPLECALYPSO_API std::ostream & operator<< (std::ostream &os, const ReadMode &rm)
 

Additional Inherited Members

- Protected Member Functions inherited from keyple::core::command::AbstractIso7816CommandBuilder
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn)
 
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const uint8_t le)
 
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn, const uint8_t le)
 
- Protected Attributes inherited from keyple::calypso::command::po::AbstractPoCommandBuilder< ReadRecordsRespPars >
const std::shared_ptr< LoggermLogger
 
- Protected Attributes inherited from keyple::core::command::AbstractApduCommandBuilder
const std::shared_ptr< SeCommandmCommandRef
 
std::shared_ptr< ApduRequestmRequest
 

Detailed Description

The keyple::calypso::command::po::builder::ReadRecordsCmdBuild class provides the dedicated constructor to build the Read Records APDU command.

Member Enumeration Documentation

◆ ReadMode

Enumerator
ONE_RECORD 
MULTIPLE_RECORD 

Constructor & Destructor Documentation

◆ ReadRecordsCmdBuild()

keyple::calypso::command::po::builder::ReadRecordsCmdBuild::ReadRecordsCmdBuild ( const PoClass poClass,
const uint8_t  sfi,
const uint8_t  firstRecordNumber,
const ReadMode  readMode,
const uint8_t  expectedLength 
)

Instantiates a new read records cmd build

Parameters
poClassindicates which CLA byte should be used for the Apdu
sfithe sfi top select
firstRecordNumberthe record number to read (or first record to read in case of several records)
readModeread mode, requests the reading of one or all the records
expectedLengththe expected length of the record(s)
Exceptions
IllegalArgumentException- if record number < 1
IllegalArgumentException- if the request is inconsistent

Member Function Documentation

◆ createResponseParser()

std::shared_ptr< ReadRecordsRespPars > keyple::calypso::command::po::builder::ReadRecordsCmdBuild::createResponseParser ( std::shared_ptr< ApduResponse apduResponse)
overridevirtual

Create the response parser matching the builder

Parameters
apduResponsethe response data from the SE
Returns
an keyple::core::command::AbstractApduResponseParser

Implements keyple::calypso::command::po::AbstractPoCommandBuilder< ReadRecordsRespPars >.

◆ getFirstRecordNumber()

uint8_t keyple::calypso::command::po::builder::ReadRecordsCmdBuild::getFirstRecordNumber ( ) const
Returns
the number of the first record to read

◆ getReadMode()

ReadRecordsCmdBuild::ReadMode keyple::calypso::command::po::builder::ReadRecordsCmdBuild::getReadMode ( ) const
Returns
the readJustOneRecord flag

◆ getSfi()

uint8_t keyple::calypso::command::po::builder::ReadRecordsCmdBuild::getSfi ( ) const
Returns
the SFI of the accessed file

◆ isSessionBufferUsed()

bool keyple::calypso::command::po::builder::ReadRecordsCmdBuild::isSessionBufferUsed ( ) const
override

Friends And Related Function Documentation

◆ operator<<

KEYPLECALYPSO_API std::ostream& operator<< ( std::ostream &  os,
const ReadMode rm 
)
friend

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