Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardIncreaseOrDecreaseMultiple.h
Go to the documentation of this file.
1
2/**************************************************************************************************
3 * Copyright (c) 2023 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 "CalypsoCardAdapter.h"
25#include "CalypsoCardClass.h"
26
27/* Keyple Core Util */
28#include "LoggerFactory.h"
29
30namespace keyple {
31namespace card {
32namespace calypso {
33
34using namespace keyple::core::util::cpp;
35
37
45public:
59 const bool isDecreaseCommand,
60 const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
61 const uint8_t sfi,
62 const std::map<const int, const int> counterNumberToIncDecValueMap);
63
72 bool isSessionBufferUsed() const override;
73
79 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
80 override;
81
87 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
88
95 uint8_t getSfi() const;
96
103 const std::map<const int, const int>& getCounterNumberToIncDecValueMap() const;
104
105private:
109 const std::unique_ptr<Logger> mLogger =
110 LoggerFactory::getLogger(typeid(CmdCardIncreaseOrDecreaseMultiple));
111
115 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
116
120 const uint8_t mSfi;
121
125 const std::map<const int, const int> mCounterNumberToIncDecValueMap;
126
130 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
131};
132
133}
134}
135}
const std::map< const int, const int > & getCounterNumberToIncDecValueMap() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardIncreaseOrDecreaseMultiple(const bool isDecreaseCommand, const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const uint8_t sfi, const std::map< const int, const int > counterNumberToIncDecValueMap)
AbstractApduCommand::StatusProperties StatusProperties