Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardGetDataTraceabilityInformation.cpp
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 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
14
15/* Keyple Card Calypso */
17
18/* Keyple Core Util */
19#include "ApduUtil.h"
20
21namespace keyple {
22namespace card {
23namespace calypso {
24
25using namespace keyple::core::util;
26
27const CalypsoCardCommand CmdCardGetDataTraceabilityInformation::mCommand =
29const std::map<const int, const std::shared_ptr<StatusProperties>>
30 CmdCardGetDataTraceabilityInformation::STATUS_TABLE = initStatusTable();
31
33 const CalypsoCardClass calypsoCardClass)
34: AbstractCardCommand(mCommand)
35{
37 std::make_shared<ApduRequestAdapter>(
38 ApduUtil::build(
39 calypsoCardClass.getValue(),
40 mCommand.getInstructionByte(),
41 0x01,
42 0x85,
43 0x00)));
44}
45
47{
48 return false;
49}
50
51const std::map<const int, const std::shared_ptr<StatusProperties>>
52 CmdCardGetDataTraceabilityInformation::initStatusTable()
53{
54 std::map<const int, const std::shared_ptr<StatusProperties>> m =
56
57 m.insert({0x6A88,
58 std::make_shared<StatusProperties>("Data object not found (optional mode not " \
59 "available).",
60 typeid(CardDataAccessException))});
61 m.insert({0x6B00,
62 std::make_shared<StatusProperties>("P1 or P2 value not supported.",
63 typeid(CardDataAccessException))});
64
65 return m;
66}
67
68const std::map<const int, const std::shared_ptr<StatusProperties>>&
70{
71 return STATUS_TABLE;
72}
73
74}
75}
76}
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
virtual void setApduRequest(const std::shared_ptr< ApduRequestAdapter > apduRequest) final
static const CalypsoCardCommand GET_DATA
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override