34using namespace keyple::core::util;
35using namespace keyple::core::util::cpp;
37const std::map<const int, const std::shared_ptr<StatusProperties>>
38 CmdCardReadBinary::STATUS_TABLE = initStatusTable();
46 const uint8_t msb = ((offset & 0xFF00) >> 8);
47 const uint8_t lsb = (offset & 0xFF);
53 const uint8_t p1 = msb > 0 ? msb : 0x80 + mSfi;
56 std::make_shared<ApduRequestAdapter>(
64 std::stringstream extraInfo;
65 extraInfo <<
"SFI:" << sfi <<
"h, "
66 <<
"OFFSET:" << offset <<
", "
67 <<
"LENGTH:" << length;
87const std::map<const int, const std::shared_ptr<StatusProperties>>
88 CmdCardReadBinary::initStatusTable()
90 std::map<const int, const std::shared_ptr<StatusProperties>> m =
94 std::make_shared<StatusProperties>(
"Incorrect EF type: not a Binary EF.",
97 std::make_shared<StatusProperties>(
"Security conditions not fulfilled (PIN code " \
98 "not presented, encryption required).",
99 typeid(CardSecurityContextException))});
101 std::make_shared<StatusProperties>(
"Access forbidden (Never access mode).",
102 typeid(CardAccessForbiddenException))});
104 std::make_shared<StatusProperties>(
"Incorrect file type: the Current File is not " \
105 "an EF. Supersedes 6981h.",
106 typeid(CardDataAccessException))});
108 std::make_shared<StatusProperties>(
"File not found",
109 typeid(CardDataAccessException))});
111 std::make_shared<StatusProperties>(
"Offset not in the file (offset overflow).",
112 typeid(CardDataAccessException))});
114 std::make_shared<StatusProperties>(
"P1 value not supported.",
115 typeid(CardIllegalParameterException))});
120const std::map<const int, const std::shared_ptr<StatusProperties>>&
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
virtual void addSubName(const std::string &subName) final
virtual void setApduRequest(const std::shared_ptr< ApduRequestAdapter > apduRequest) final
const CalypsoCardCommand & getCommandRef() const override
CmdCardReadBinary(const CalypsoCardClass calypsoCardClass, const uint8_t sfi, const uint8_t offset, const uint8_t length)
bool isSessionBufferUsed() const override
uint8_t getOffset() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override