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

#include <DecreaseCmdBuild.h>

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

Public Member Functions

 DecreaseCmdBuild (const PoClass poClass, const uint8_t sfi, const uint8_t counterNumber, const int decValue)
 
std::shared_ptr< DecreaseRespParscreateResponseParser (std::shared_ptr< ApduResponse > apduResponse) override
 
bool isSessionBufferUsed () const override
 
uint8_t getSfi () const
 
int getCounterNumber () const
 
int getDecValue () const
 
- Public Member Functions inherited from keyple::calypso::command::po::AbstractPoCommandBuilder< DecreaseRespPars >
 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
 

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< DecreaseRespPars >
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 Class DecreaseCmdBuild. This class provides the dedicated constructor to build the Decrease APDU command.

Constructor & Destructor Documentation

◆ DecreaseCmdBuild()

keyple::calypso::command::po::builder::DecreaseCmdBuild::DecreaseCmdBuild ( const PoClass  poClass,
const uint8_t  sfi,
const uint8_t  counterNumber,
const int  decValue 
)

Instantiates a new decrease cmd build from command parameters.

Parameters
poClassindicates which CLA byte should be used for the Apdu
sfiSFI of the file to select or 00h for current EF
counterNumber>= 01h: Counters file, number of the counter. 00h: Simulated Counter file.
decValueValue to subtract to the counter (defined as a positive int <= 16777215 [FFFFFFh])
Exceptions
IllegalArgumentException- if the decrement value is out of range
IllegalArgumentException- if the command is inconsistent

Member Function Documentation

◆ createResponseParser()

std::shared_ptr< DecreaseRespPars > keyple::calypso::command::po::builder::DecreaseCmdBuild::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< DecreaseRespPars >.

◆ getCounterNumber()

int keyple::calypso::command::po::builder::DecreaseCmdBuild::getCounterNumber ( ) const
Returns
the counter number

◆ getDecValue()

int keyple::calypso::command::po::builder::DecreaseCmdBuild::getDecValue ( ) const
Returns
the decrement value

◆ getSfi()

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

◆ isSessionBufferUsed()

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

This command can modify the contents of the PO in session and therefore uses the session buffer.

Returns
true

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