Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardUpdateRecord.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2021 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/* Keyple Card Calypso */
21#include "AbstractApduCommand.h"
22#include "AbstractCardCommand.h"
23#include "CalypsoCardClass.h"
25
26/* Keyple Core Util */
27#include "LoggerFactory.h"
28
29namespace keyple {
30namespace card {
31namespace calypso {
32
33using namespace keyple::core::util::cpp;
34
36
44public:
57 CmdCardUpdateRecord(const CalypsoCardClass calypsoCardClass,
58 const uint8_t sfi,
59 const uint8_t recordNumber,
60 const std::vector<uint8_t>& newRecordData);
61
70 bool isSessionBufferUsed() const override;
71
78 uint8_t getSfi() const;
79
86 uint8_t getRecordNumber() const;
87
94 const std::vector<uint8_t>& getData() const;
95
101 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
102 override;
103
104private:
108 const std::unique_ptr<Logger> mLogger =
109 LoggerFactory::getLogger(typeid(CmdCardUpdateRecord));
110
114 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
115
116
120 static const CalypsoCardCommand mCommand;
121
125 const uint8_t mSfi;
126
130 const uint8_t mRecordNumber;
131
135 const std::vector<uint8_t> mData;
136
140 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
141};
142
143}
144}
145}
CmdCardUpdateRecord(const CalypsoCardClass calypsoCardClass, const uint8_t sfi, const uint8_t recordNumber, const std::vector< uint8_t > &newRecordData)
const std::vector< uint8_t > & getData() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties