Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardReadRecordMultiple.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:
55 CmdCardReadRecordMultiple(const CalypsoCardClass calypsoCardClass,
56 const uint8_t sfi,
57 const uint8_t recordNumber,
58 const uint8_t offset,
59 const uint8_t length);
60
67 bool isSessionBufferUsed() const override;
68
74 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
75 override;
76
82 CmdCardReadRecordMultiple& setApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse)
83 override;
84
91 uint8_t getSfi() const;
92
99 uint8_t getOffset() const;
100
108 const std::map<const uint8_t, const std::vector<uint8_t>>& getResults() const;
109
110private:
114 const std::unique_ptr<Logger> mLogger =
115 LoggerFactory::getLogger(typeid(CmdCardReadRecordMultiple));
116
120 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
121
125 const uint8_t mSfi;
126
130 const uint8_t mRecordNumber;
131
135 const uint8_t mOffset;
136
140 const uint8_t mLength;
141
145 std::map<const uint8_t, const std::vector<uint8_t>> mResults;
146
150 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
151};
152
153}
154}
155}
const std::map< const uint8_t, const std::vector< uint8_t > > & getResults() const
CmdCardReadRecordMultiple(const CalypsoCardClass calypsoCardClass, const uint8_t sfi, const uint8_t recordNumber, const uint8_t offset, const uint8_t length)
CmdCardReadRecordMultiple & setApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties