Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardWriteRecord.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 Card */
21#include "ApduResponseApi.h"
22
23/* Keyple Card Calypso */
24#include "AbstractApduCommand.h"
25#include "AbstractCardCommand.h"
26#include "CalypsoCardAdapter.h"
27#include "CalypsoCardClass.h"
29
30/* Keyple Core Util */
31#include "LoggerFactory.h"
32
33namespace keyple {
34namespace card {
35namespace calypso {
36
37using namespace keyple::core::util::cpp;
38
40
48public:
61 CmdCardWriteRecord(const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
62 const uint8_t sfi,
63 const uint8_t recordNumber,
64 const std::vector<uint8_t>& newRecordData);
65
71 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
72
79 bool isSessionBufferUsed() const override;
80
86 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const override;
87
88private:
92 const std::unique_ptr<Logger> mLogger =
93 LoggerFactory::getLogger(typeid(CmdCardWriteRecord));
94
98 static const CalypsoCardCommand mCommand;
99
103 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
104
108 const uint8_t mSfi;
109
113 const uint8_t mRecordNumber;
114
118 const std::vector<uint8_t> mData;
119
123 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
124};
125
126}
127}
128}
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardWriteRecord(const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const uint8_t sfi, const uint8_t recordNumber, const std::vector< uint8_t > &newRecordData)
AbstractApduCommand::StatusProperties StatusProperties