Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardUpdateOrWriteBinary.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional information regarding *
5 * copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the terms of the Eclipse *
8 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9 * *
10 * SPDX-License-Identifier: EPL-2.0 *
11 **************************************************************************************************/
12
13#pragma once
14
15#include <cstdint>
16#include <map>
17#include <memory>
18#include <vector>
19
20/* Calypsonet Terminal Calypso */
21#include "CalypsoCard.h"
22
23/* Calypsonet Terminal Card */
24#include "ApduResponseApi.h"
25
26/* Keyple Card Calypso */
27#include "AbstractApduCommand.h"
28#include "AbstractCardCommand.h"
29#include "CalypsoCardAdapter.h"
30#include "CalypsoCardClass.h"
31
32/* Keyple Core Util */
33#include "LoggerFactory.h"
34
35namespace keyple {
36namespace card {
37namespace calypso {
38
39using namespace calypsonet::terminal::card;
40using namespace calypsonet::terminal::calypso::card;
41using namespace keyple::core::util::cpp;
42
44
52public:
65 CmdCardUpdateOrWriteBinary(const bool isUpdateCommand,
66 const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
67 const uint8_t sfi,
68 const int offset,
69 const std::vector<uint8_t>& data);
70
76 void parseApduResponse(std::shared_ptr<ApduResponseApi> apduResponse) override;
77
86 bool isSessionBufferUsed() const override;
87
93 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
94 override;
95
96private:
100 const std::unique_ptr<Logger> mLogger =
101 LoggerFactory::getLogger(typeid(CmdCardUpdateOrWriteBinary));
102
106 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
107
111 const uint8_t mSfi;
112
116 const int mOffset;
117
121 const std::vector<uint8_t> mData;
122
126 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
127
128};
129
130}
131}
132}
void parseApduResponse(std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardUpdateOrWriteBinary(const bool isUpdateCommand, const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const uint8_t sfi, const int offset, const std::vector< uint8_t > &data)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties