![]() |
Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
|
#include <ApduRequestAdapter.h>
Public Member Functions | |
ApduRequestAdapter (const std::vector< uint8_t > &apdu) | |
ApduRequestAdapter & | addSuccessfulStatusWord (const int successfulStatusWord) |
const std::vector< int > & | getSuccessfulStatusWords () const override |
ApduRequestAdapter & | setInfo (const std::string &info) |
const std::string & | getInfo () const override |
const std::vector< uint8_t > & | getApdu () const override |
Friends | |
std::ostream & | operator<< (std::ostream &os, const std::shared_ptr< ApduRequestAdapter > ara) |
(package-private)
This POJO contains a set of data related to an ISO-7816 APDU command.
Attaching an optional name to the request facilitates the enhancement of the application logs using the toString method.
Definition at line 46 of file ApduRequestAdapter.h.
keyple::card::calypso::ApduRequestAdapter::ApduRequestAdapter | ( | const std::vector< uint8_t > & | apdu | ) |
Builds an APDU request from a raw byte buffer.
The default status words list is initialized with the standard successful code 9000h.
apdu | The bytes of the APDU's body. |
Definition at line 24 of file ApduRequestAdapter.cpp.
ApduRequestAdapter & keyple::card::calypso::ApduRequestAdapter::addSuccessfulStatusWord | ( | const int | successfulStatusWord | ) |
Adds a status word to the list of those that should be considered successful for the APDU.
Note: initially, the list contains the standard successful status word
.
successfulStatusWord | A positive int ≤ FFFFh
|
Definition at line 28 of file ApduRequestAdapter.cpp.
|
override |
Definition at line 52 of file ApduRequestAdapter.cpp.
|
override |
Definition at line 47 of file ApduRequestAdapter.cpp.
|
override |
Definition at line 35 of file ApduRequestAdapter.cpp.
ApduRequestAdapter & keyple::card::calypso::ApduRequestAdapter::setInfo | ( | const std::string & | info | ) |
Names the APDU request.
This string is dedicated to improve the readability of logs and should therefore only be invoked conditionally (e.g. when log level >= debug).
info | The request name (free text). |
Definition at line 40 of file ApduRequestAdapter.cpp.
|
friend |
Definition at line 58 of file ApduRequestAdapter.cpp.