Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CalypsoCardConstant.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
17namespace keyple {
18namespace card {
19namespace calypso {
20
28public:
29 static const int MASK_15_BITS;
30 static const int MASK_3_BYTES;
31
32 /* SFI */
33 static const int SFI_MIN;
34 static const int SFI_MAX;
35
36 /* Record number */
37 static const int NB_REC_MIN;
38 static const int NB_REC_MAX;
39
40 /* Counter number */
41 static const int NB_CNT_MIN;
42 static const int NB_CNT_MAX;
43
44 /* Counter value */
45 static const int CNT_VALUE_MIN;
46 static const int CNT_VALUE_MAX;
47
48 /* Offset */
49 static const int OFFSET_MIN;
50 static const int OFFSET_MAX;
51 static const int OFFSET_BINARY_MAX;
52
53 /* Data */
54 static const int DATA_LENGTH_MIN;
55 static const int DATA_LENGTH_MAX;
56
57 /* File Type Values */
58 static const int FILE_TYPE_MF;
59 static const int FILE_TYPE_DF;
60 static const int FILE_TYPE_EF;
61
62 /* EF Type Values */
63 static const int EF_TYPE_DF;
64 static const int EF_TYPE_BINARY;
65 static const int EF_TYPE_LINEAR;
66 static const int EF_TYPE_CYCLIC;
68 static const int EF_TYPE_COUNTERS;
69
70 /* Field offsets in select file response (tag/length excluded) */
71 static const int SEL_SFI_OFFSET;
72 static const int SEL_TYPE_OFFSET;
73 static const int SEL_EF_TYPE_OFFSET;
74 static const int SEL_REC_SIZE_OFFSET;
75 static const int SEL_NUM_REC_OFFSET;
76 static const int SEL_AC_OFFSET;
77 static const int SEL_AC_LENGTH;
78 static const int SEL_NKEY_OFFSET;
79 static const int SEL_NKEY_LENGTH;
80 static const int SEL_DF_STATUS_OFFSET;
81 static const int SEL_KVCS_OFFSET;
82 static const int SEL_KIFS_OFFSET;
83 static const int SEL_DATA_REF_OFFSET;
84 static const int SEL_LID_OFFSET;
85
86 /* PIN Code */
87 static const int PIN_LENGTH;
88
89 /* Stored Value */
90 static const uint8_t STORED_VALUE_FILE_STRUCTURE_ID;
91 static const uint8_t SV_RELOAD_LOG_FILE_SFI;
92 static const uint8_t SV_RELOAD_LOG_FILE_NB_REC;
93 static const uint8_t SV_DEBIT_LOG_FILE_SFI;
94 static const uint8_t SV_DEBIT_LOG_FILE_NB_REC;
95 static const uint8_t SV_LOG_FILE_REC_LENGTH;
96
97 /* Payload capacity */
99
100private:
105};
106
107}
108}
109}