Reorganize directories and switch libaries to using asn1c
[it/test.git] / simulators / e2sim / src / ASN1 / lib / e2ap_config.hpp
1 /*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 # Copyright 2019 Nokia                                                       *
5 #                                                                            *
6 # Licensed under the Apache License, Version 2.0 (the "License");            *
7 # you may not use this file except in compliance with the License.           *
8 # You may obtain a copy of the License at                                    *
9 #                                                                            *
10 #      http://www.apache.org/licenses/LICENSE-2.0                            *
11 #                                                                            *
12 # Unless required by applicable law or agreed to in writing, software        *
13 # distributed under the License is distributed on an "AS IS" BASIS,          *
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
15 # See the License for the specific language governing permissions and        *
16 # limitations under the License.                                             *
17 #                                                                            *
18 ******************************************************************************/
19 #ifndef E2AP_CONFIG_HPP
20 #define E2AP_CONFIG_HPP
21
22 #include <string>
23 #include <vector>
24
25 enum enum_Transmission_Bandwidth {
26   enum_bw6,
27   enum_bw15,
28   enum_bw25,
29   enum_bw50,
30   enum_bw75,
31   enum_bw100,
32   enum_bw1
33 };
34
35 enum enum_NRNRB{
36   enum_nrb11, enum_nrb18, enum_nrb24, enum_nrb25, enum_nrb31, enum_nrb32,
37   enum_nrb38, enum_nrb51, enum_nrb52, enum_nrb65, enum_nrb66, enum_nrb78,
38   enum_nrb79, enum_nrb93, enum_nrb106, enum_nrb107, enum_nrb121,
39   enum_nrb132, enum_nrb133, enum_nrb135, enum_nrb160, enum_nrb162,
40   enum_nrb189, enum_nrb216, enum_nrb217, enum_nrb245, enum_nrb264,
41   enum_nrb270, enum_nrb273
42 };
43
44 enum enum_NRSCS {
45   enum_scs15, enum_scs30, enum_scs60, enum_scs120
46 };
47
48 class eNB_config {
49   public:
50     uint8_t* pLMN_Identity;
51     uint8_t* macro_eNB_ID;
52     int64_t  pCI;
53     uint8_t* tAC;
54     uint8_t* eUTRANcellIdentifier;
55
56     int64_t   uL_EARFCN;
57     int64_t   dL_EARFCN;
58
59     enum_Transmission_Bandwidth uL_Bandwidth;
60     enum_Transmission_Bandwidth dL_Bandwidth;
61
62     /*Default Constructor*/
63     eNB_config() {
64       pLMN_Identity         = (uint8_t*)"abc";
65       macro_eNB_ID          = (uint8_t*)"5";
66       pCI                   = 0;
67       tAC                   = (uint8_t*)"ab";
68       eUTRANcellIdentifier  = (uint8_t*)"def";
69       uL_EARFCN             = 21400;
70       dL_EARFCN             = 3400;
71       uL_Bandwidth          = enum_bw25;
72       dL_Bandwidth          = enum_bw50;
73     }
74 };
75
76 class gNB_config {
77   public:
78     uint8_t* pLMN_Identity;
79     uint8_t* gNB_ID;
80     int64_t  nrpCI;
81     uint8_t* tAC;
82     uint8_t* nRcellIdentifier;
83
84     int64_t   uL_nRARFCN;
85     int64_t   dL_nRARFCN;
86
87     enum enum_NRNRB uL_NRNRB;
88     enum enum_NRNRB dL_NRNRB;
89
90     enum enum_NRSCS uL_NRSCS;
91     enum enum_NRSCS dL_NRSCS;
92
93     uint8_t ul_freqBandIndicatorNr;
94     uint8_t dl_freqBandIndicatorNr;
95
96     std::string measurementTimingConfiguration;
97
98     /*Default Constructor*/
99     gNB_config() {
100       pLMN_Identity         = (uint8_t*)"xyz";
101       gNB_ID                = (uint8_t*)"3";
102       nrpCI                 = 1;
103       tAC                   = (uint8_t*)"ab";
104       nRcellIdentifier      = (uint8_t*)"gnb_id_123";
105       uL_nRARFCN            = 21400;
106       dL_nRARFCN            = 21500;
107
108       uL_NRNRB              = enum_nrb11;
109       dL_NRNRB              = enum_nrb121;
110
111       uL_NRSCS              = enum_scs15;
112       dL_NRSCS              = enum_scs120;
113
114       ul_freqBandIndicatorNr   = 11;
115       dl_freqBandIndicatorNr   = 12;
116
117       measurementTimingConfiguration = "dummy timing";
118     }
119 };
120
121 enum enum_RICactionType {
122   RICactionType_report,
123   RICactionType_insert,
124   RICactionType_policy
125 };
126
127 enum enum_RICcause {
128   RICcause_radioNetwork = 1,
129   RICcause_transport,
130   RICcause_protocol,
131   RICcause_misc,
132   RICcause_ric
133 };
134
135 struct RIC_action_t {
136     unsigned char       action_id;
137     enum_RICactionType  action_type;
138     bool                isAdmitted = false;   //for response/failure only
139     enum_RICcause       notAdmitted_cause;    //for response/failure only
140     unsigned int        notAdmitted_subCause; //for response/failure only
141
142     RIC_action_t() {;}
143
144     RIC_action_t(unsigned char id, enum_RICactionType type)
145     {
146         action_id   = id;
147         action_type = type;
148     }
149 };
150
151 struct RICsubscription_params_t {
152   uint16_t request_id             = 0;
153   uint16_t seq_number             = 0;
154   uint16_t ran_func_id            = 0;
155   std::string event_trigger_def   = "";
156
157   std::vector<RIC_action_t> actionList;
158 } ;
159
160 #endif