2 # ==================================================================================
3 # Copyright (c) 2020 HCL Technologies Limited.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ==================================================================================
20 /* Classes to handle E2 service model based on e2sm-Bouncer-v001.asn */
30 typedef struct ranparam_helper ranparam_helper;
31 struct ranparam_helper {
33 unsigned char* _param_name;
34 size_t _param_name_len;
36 unsigned char* _param_value;
37 size_t _param_value_len;
40 class RANParam_Helper{
42 ranparam_helper _ranparam_helper;
46 RANParam_Helper(int id, unsigned char *param_name, size_t param_name_len, int param_test, unsigned char* param_value, size_t param_value_len){
47 _ranparam_helper._param_id = id;
48 _ranparam_helper._param_name = param_name;
49 _ranparam_helper._param_name_len = param_name_len;
50 _ranparam_helper._param_test = param_test;
51 _ranparam_helper._param_value = param_value;
52 _ranparam_helper._param_value_len = param_value_len;
55 const ranparam_helper & getran_helper() const {
56 return _ranparam_helper;
58 void print_ranparam_info(void){
59 std::cout <<"Param ID = " << _ranparam_helper._param_id << std::endl;
60 std::cout << "Parame Name =" << _ranparam_helper._param_name << std::endl;
61 std::cout <<"Param Test = " << _ranparam_helper._param_test << std::endl;
62 std::cout <<"Param Value = " << _ranparam_helper._param_value << std::endl;
67 using ranparam_helper_t = std::vector<RANParam_Helper>;
69 typedef struct e2sm_subscription_helper e2sm_subscription_helper;
70 struct e2sm_subscription_helper {
75 ranparam_helper_t param;
76 void add_param(int id, unsigned char *param_name, size_t param_name_len, int param_test, unsigned char* param_value, size_t param_value_len){
77 RANParam_Helper rparam(id,param_name,param_name_len,param_test,param_value,param_value_len);
78 param.push_back(rparam);
80 ranparam_helper_t get_paramlist() const {return param;};
87 typedef struct e2sm_indication_helper e2sm_indication_helper;
90 struct e2sm_indication_helper {
92 unsigned char* message;
96 typedef struct e2sm_control_helper e2sm_control_helper;
98 struct e2sm_control_helper {
100 unsigned char* message;