Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <ApduResponse.h>
Public Member Functions | |
ApduResponse (const std::vector< uint8_t > &buffer, std::shared_ptr< std::set< int >> successfulStatusCodes) | |
bool | isSuccessful () const |
uint16_t | getStatusCode () const |
const std::vector< uint8_t > & | getBytes () const |
std::vector< uint8_t > | getDataOut () const |
bool | operator== (const ApduResponse &o) const |
bool | operator!= (const ApduResponse &o) const |
Friends | |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const ApduResponse &r) |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const std::shared_ptr< ApduResponse > &r) |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const std::vector< std::shared_ptr< ApduResponse >> &v) |
Single APDU response wrapper
keyple::core::seproxy::message::ApduResponse::ApduResponse | ( | const std::vector< uint8_t > & | buffer, |
std::shared_ptr< std::set< int >> | successfulStatusCodes | ||
) |
Create a new ApduResponse from the provided byte array
The internal successful status is determined by the current status code and the optional successful status codes list.
The list of additional successful status codes is used to set the successful flag if not equal to 0x9000
buffer | apdu response data buffer (including sw1sw2) |
successfulStatusCodes | optional list of successful status codes other than 0x9000 |
const std::vector< uint8_t > & keyple::core::seproxy::message::ApduResponse::getBytes | ( | ) | const |
std::vector< uint8_t > keyple::core::seproxy::message::ApduResponse::getDataOut | ( | ) | const |
Get the data before the statusCode
uint16_t keyple::core::seproxy::message::ApduResponse::getStatusCode | ( | ) | const |
bool keyple::core::seproxy::message::ApduResponse::isSuccessful | ( | ) | const |
Checks if is successful.
bool keyple::core::seproxy::message::ApduResponse::operator!= | ( | const ApduResponse & | o | ) | const |
bool keyple::core::seproxy::message::ApduResponse::operator== | ( | const ApduResponse & | o | ) | const |
|
friend |
|
friend |
|
friend |