Enhanced SIM for E2AP v1 for TS UC
[sim/e2-interface.git] / e2sim / e2apv1sim / src / ASN1 / asn / identifier.hpp
1 #pragma once
2
3 /******************************************************************************
4 *
5 *   Copyright (c) 2019 AT&T Intellectual Property.
6 *   Copyright (c) 2018-2019 Nokia.
7 *
8 *   Licensed under the Apache License, Version 2.0 (the "License");
9 *   you may not use this file except in compliance with the License.
10 *   You may obtain a copy of the License at
11 *
12 *       http://www.apache.org/licenses/LICENSE-2.0
13 *
14 *   Unless required by applicable law or agreed to in writing, software
15 *   distributed under the License is distributed on an "AS IS" BASIS,
16 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 *   See the License for the specific language governing permissions and
18 *   limitations under the License.
19 *
20 ******************************************************************************/
21
22 // Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries
23
24 // Local Includes: Application specific classes, functions, and libraries
25
26 namespace asn {
27
28 enum class class_type_t : uint8_t
29 {
30          UNIVERSAL
31         ,APPLICATION
32         ,CONTEXT
33         ,PRIVATE
34   ,UNSPECIFIED //reserved for internal use
35 };
36
37 enum class tag_type_t : uint8_t
38 {
39          EXPLICIT
40         ,IMPLICIT
41         ,AUTOMATIC
42 };
43
44 using tag_value_t = uint64_t;
45
46 template<class_type_t CT,  tag_value_t TAG, tag_type_t TT = tag_type_t::IMPLICIT>
47 struct identifier
48 {
49         static constexpr class_type_t   class_type = CT;
50         static constexpr tag_value_t    tag_value = TAG;
51         static constexpr tag_type_t             tag_type = TT;
52 };
53
54
55 enum class tag_rvalue_t : tag_value_t
56 {
57          BOOLEAN                                = 1
58         ,INTEGER                                = 2
59         ,BIT_STRING                             = 3
60         ,OCTET_STRING                   = 4
61         ,NULL_TYPE                              = 5
62         ,OBJECT_IDENTIFIER              = 6
63         ,REAL                                   = 9
64         ,ENUMERATED                             = 10
65         ,SEQUENCE                               = 16
66         ,SEQUENCE_OF                    = 16
67         ,UTF8String                             = 12
68         ,NumericString                  = 18
69         ,IA5String                              = 22
70         ,VisibleString                  = 26
71         ,DATE                                   = 31
72         ,TIME_OF_DAY                    = 32
73         ,DATE_TIME                              = 33
74         ,DURATION                               = 34
75         ,ObjectDescriptor               = 7
76         ,EXTERNAL                               = 8
77         ,EMBEDDED_PDV                   = 11
78         ,OID_IRI                                = 35
79         ,RELATIVE_OID_IRI               = 36
80         ,SET                                    = 17
81         ,SET_OF                                 = 17
82         ,UTCTime                                = 23
83         ,GeneralizedTime                = 24
84         ,PrintableString                = 19
85         ,T61String                              = 20
86         ,VideotexString                 = 21
87         ,GraphicString                  = 25
88         ,GeneralString                  = 27
89         ,UniversalString                = 28
90         ,CHARACTER_STRING               = 29
91         ,BMPString                              = 30
92         ,ISO646String                   = 26
93         ,TeletexString                  = 20
94   ,CHOICE            = 99 // fake id for internal use
95 };
96
97 } //namespace asn