Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
SvLoadLogRecordAdapter.h
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
13#pragma once
14
15#include <cstdint>
16#include <memory>
17#include <ostream>
18#include <vector>
19
20/* Calypsonet Terminal Calypso */
21#include "SvLoadLogRecord.h"
22
23namespace keyple {
24namespace card {
25namespace calypso {
26
27using namespace calypsonet::terminal::calypso::card;
28
35class SvLoadLogRecordAdapter final : public SvLoadLogRecord {
36public:
44 SvLoadLogRecordAdapter(const std::vector<uint8_t>& cardResponse, const int offset);
45
51 const std::vector<uint8_t>& getRawData() const override;
52
58 int getAmount() const override;
59
65 int getBalance() const override;
66
72 const std::vector<uint8_t> getLoadTime() const override;
73
79 const std::vector<uint8_t> getLoadDate() const override;
80
86 const std::vector<uint8_t> getFreeData() const override;
87
93 uint8_t getKvc() const override;
99 const std::vector<uint8_t> getSamId() const override;
100
106 int getSvTNum() const override;
107
113 int getSamTNum() const override;
114
118 friend std::ostream& operator<<(std::ostream& os, const SvLoadLogRecordAdapter& ra);
119
123 friend std::ostream& operator<<(std::ostream& os,
124 const std::shared_ptr<SvLoadLogRecordAdapter> ra);
125
132 const std::string toJSONString() const;
133
134private:
138 const int mOffset;
139
143 const std::vector<uint8_t> mCardResponse;
144};
145
146}
147}
148}
friend std::ostream & operator<<(std::ostream &os, const SvLoadLogRecordAdapter &ra)
const std::vector< uint8_t > & getRawData() const override
const std::vector< uint8_t > getSamId() const override
const std::vector< uint8_t > getLoadTime() const override
const std::vector< uint8_t > getFreeData() const override
SvLoadLogRecordAdapter(const std::vector< uint8_t > &cardResponse, const int offset)
const std::vector< uint8_t > getLoadDate() const override