20#include "BerTlvUtil.h"
21#include "IllegalStateException.h"
22#include "KeypleAssert.h"
28using namespace keyple::core::util;
29using namespace keyple::core::util::cpp::exception;
32const int CmdCardGetDataFcp::TAG_PROPRIETARY_INFORMATION = 0x85;
33const std::map<const int, const std::shared_ptr<StatusProperties>>
34 CmdCardGetDataFcp::STATUS_TABLE = initStatusTable();
40 std::make_shared<ApduRequestAdapter>(
41 ApduUtil::build(calypsoCardClass.
getValue(),
55 if (mProprietaryInformation.empty()) {
56 const std::map<const int, const std::vector<uint8_t>> tags =
59 const auto it = tags.find(TAG_PROPRIETARY_INFORMATION);
60 if (it == tags.end()) {
61 throw IllegalStateException(
"Proprietary information: tag not found.");
64 mProprietaryInformation = it->second;
65 Assert::getInstance().isEqual(mProprietaryInformation.size(), 23,
"proprietaryInformation");
68 return mProprietaryInformation;
71const std::map<const int, const std::shared_ptr<StatusProperties>>
72 CmdCardGetDataFcp::initStatusTable()
74 std::map<const int, const std::shared_ptr<StatusProperties>> m =
78 std::make_shared<StatusProperties>(
"Data object not found (optional mode not " \
82 std::make_shared<StatusProperties>(
"File not found.",
83 typeid(CardDataAccessException))});
85 std::make_shared<StatusProperties>(
"P1 or P2 value not supported.",
86 typeid(CardDataAccessException))});
91const std::map<const int, const std::shared_ptr<StatusProperties>>&
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
virtual const std::shared_ptr< ApduResponseApi > getApduResponse() const final
virtual void setApduRequest(const std::shared_ptr< ApduRequestAdapter > apduRequest) final
static const CalypsoCardCommand GET_DATA
uint8_t getInstructionByte() const
CmdCardGetDataFcp(const CalypsoCardClass calypsoCardClass)
const std::vector< uint8_t > & getProprietaryInformation()
bool isSessionBufferUsed() const override
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override