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::storedvalue::SvUndebitRespPars Class Referencefinal

#include <SvUndebitRespPars.h>

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

Public Member Functions

 SvUndebitRespPars (std::shared_ptr< ApduResponse > response, SvUndebitCmdBuild *builder)
 
const std::vector< uint8_t > getSignatureLo () const
 
const std::string toString () 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

SV Undebit (00BA) response parser. See specs: Calypso Stored Value balance (signed binaries' coding based on the two's complement method)

balance - 3 bytes signed binary - Integer from -8,388,608 to 8,388,607

 -8,388,608           %10000000.00000000.00000000
 -8,388,607           %10000000.00000000.00000001
 -8,388,606           %10000000.00000000.00000010
         -3           %11111111.11111111.11111101
         -2           %11111111.11111111.11111110
         -1           %11111111.11111111.11111111
          0           %00000000.00000000.00000000
          1           %00000000.00000000.00000001
          2           %00000000.00000000.00000010
          3           %00000000.00000000.00000011
  8,388,605           %01111111.11111111.11111101
  8,388,606           %01111111.11111111.11111110
  8,388,607           %01111111.11111111.11111111

amount - 2 bytes signed binary

amount for debit - Integer 0..32767 => for negative value

     -32767           %10000000.00000001
     -32766           %10000000.00000010
         -3           %11111111.11111101
         -2           %11111111.11111110
         -1           %11111111.11111111
          0           %00000000.00000000
 Notice: -32768 (%10000000.00000000) is not allowed.

Constructor & Destructor Documentation

◆ SvUndebitRespPars()

keyple::calypso::command::po::parser::storedvalue::SvUndebitRespPars::SvUndebitRespPars ( std::shared_ptr< ApduResponse response,
SvUndebitCmdBuild builder 
)

Constructor to build a parser of the SvDebit command response.

Parameters
responseresponse to parse
builderthe reference to the builder that created this parser

Member Function Documentation

◆ getSignatureLo()

const std::vector< uint8_t > keyple::calypso::command::po::parser::storedvalue::SvUndebitRespPars::getSignatureLo ( ) const

Gets the SV signature.
The signature can be empty here in the case of a secure session where the transmission of the signature is postponed until the end of the session.

Returns
a byte array containing the signature

◆ getStatusTable()

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

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

◆ toString()

const std::string keyple::calypso::command::po::parser::storedvalue::SvUndebitRespPars::toString ( ) const

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