Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardIncreaseOrDecrease.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"
24
25/* Keyple Core Util */
26#include "LoggerFactory.h"
27
28namespace keyple {
29namespace card {
30namespace calypso {
31
32using namespace keyple::core::util::cpp;
33
35
43public:
59 CmdCardIncreaseOrDecrease(const bool isDecreaseCommand,
60 const CalypsoCardClass calypsoCardClass,
61 const uint8_t sfi,
62 const uint8_t counterValue,
63 const int incDecValue);
64
71 bool isSessionBufferUsed() const override;
72
79 uint8_t getSfi() const;
80
87 uint8_t getCounterNumber() const;
88
95 int getIncDecValue() const;
96
102 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
103 override;
104
105
106private:
110 const std::unique_ptr<Logger> mLogger =
111 LoggerFactory::getLogger(typeid(CmdCardIncreaseOrDecrease));
112
116 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
117
121 const uint8_t mSfi;
122
126 const uint8_t mCounterNumber;
127
131 const int mIncDecValue;
132
136 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
137};
138
139}
140}
141}
CmdCardIncreaseOrDecrease(const bool isDecreaseCommand, const CalypsoCardClass calypsoCardClass, const uint8_t sfi, const uint8_t counterValue, const int incDecValue)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties