Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
AbstractSamCommand.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2023 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 <map>
16
17/* Keyple Card Calypso */
18#include "AbstractApduCommand.h"
19#include "CalypsoSamAdapter.h"
20#include "CalypsoSamCommand.h"
21
22namespace keyple {
23namespace card {
24namespace calypso {
25
26
28
36public:
43 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
44
50 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
51 override;
52
63 AbstractSamCommand(const CalypsoSamCommand& commandRef,
64 const int expectedResponseLength,
65 const std::shared_ptr<CalypsoSamAdapter> calypsoSam);
66
74 const std::shared_ptr<CalypsoSamAdapter> getCalypsoSam() const;
75
81 const CalypsoSamCommand& getCommandRef() const override;
82
88 const CalypsoApduCommandException buildCommandException(const std::type_info& exceptionClass,
89 const std::string& message) const final;
90
97 const std::string& message) const final;
98
104 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
105
112 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse,
113 const std::shared_ptr<CalypsoSamAdapter> calypsoSam);
114
115private:
119 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
120
124 std::shared_ptr<CalypsoSamAdapter> mCalypsoSam;
125};
126
127}
128}
129}
const CalypsoApduCommandException buildCommandException(const std::type_info &exceptionClass, const std::string &message) const final
const CalypsoApduCommandException buildUnexpectedResponseLengthException(const std::string &message) const final
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
const std::shared_ptr< CalypsoSamAdapter > getCalypsoSam() const
AbstractSamCommand(const CalypsoSamCommand &commandRef, const int expectedResponseLength, const std::shared_ptr< CalypsoSamAdapter > calypsoSam)
const CalypsoSamCommand & getCommandRef() const override
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
AbstractApduCommand::StatusProperties StatusProperties