Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardIncreaseOrDecreaseMultiple.h
Go to the documentation of this file.
1
2/**************************************************************************************************
3 * Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/ *
4 * *
5 * See the NOTICE file(s) distributed with this work for additional information regarding *
6 * copyright ownership. *
7 * *
8 * This program and the accompanying materials are made available under the terms of the Eclipse *
9 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
10 * *
11 * SPDX-License-Identifier: EPL-2.0 *
12 **************************************************************************************************/
13
14#pragma once
15
16#include <cstdint>
17#include <map>
18#include <memory>
19#include <vector>
20
21/* Keyple Card Calypso */
22#include "AbstractApduCommand.h"
23#include "AbstractCardCommand.h"
24#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:
58 const bool isDecreaseCommand,
59 const CalypsoCardClass calypsoCardClass,
60 const uint8_t sfi,
61 const std::map<const int, const int> counterNumberToIncDecValueMap);
62
71 bool isSessionBufferUsed() const override;
72
78 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
79 override;
80
87 const std::shared_ptr<ApduResponseApi> apduResponse) override;
88
95 uint8_t getSfi() const;
96
103 const std::map<const int, const int>& getCounterNumberToIncDecValueMap() const;
111 const std::map<const uint8_t, const std::vector<uint8_t>>& getNewCounterValues() const;
112
113private:
117 const std::unique_ptr<Logger> mLogger =
118 LoggerFactory::getLogger(typeid(CmdCardIncreaseOrDecreaseMultiple));
119
123 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
124
128 const uint8_t mSfi;
129
133 const std::map<const int, const int> mCounterNumberToIncDecValueMap;
134
138 std::map<const uint8_t, const std::vector<uint8_t>> mNewCounterValues;
139
143 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
144};
145
146}
147}
148}
CmdCardIncreaseOrDecreaseMultiple & setApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardIncreaseOrDecreaseMultiple(const bool isDecreaseCommand, const CalypsoCardClass calypsoCardClass, const uint8_t sfi, const std::map< const int, const int > counterNumberToIncDecValueMap)
const std::map< const int, const int > & getCounterNumberToIncDecValueMap() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
const std::map< const uint8_t, const std::vector< uint8_t > > & getNewCounterValues() const
AbstractApduCommand::StatusProperties StatusProperties