2 ==================================================================================
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
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
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, softwares
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 ==================================================================================
20 /* Classes to handle E2 service model based on e2sm-gNB-X2-release-1-v040.asn */
30 /* information holder for E2SM indication header */
31 typedef struct e2sm_header_helper e2sm_header_helper;
32 struct e2sm_header_helper {
38 long int interface_direction;
39 unsigned char* timestamp;
42 /* information holder for E2SM indication message */
43 typedef struct e2sm_message_helper e2sm_message_helper;
44 struct e2sm_message_helper {
45 unsigned char * x2ap_pdu;
50 /* information holder for E2SM Action Trigger Definition */
53 Item(long int id, long int test, long int val_type, int value):interface_id(id), test(test), val_type(val_type), value_n(value){};
54 Item(long int id, long int test, long int val_type, std::string value):interface_id(id), test(test), val_type(val_type), value_s(value){};
56 long int interface_id;
64 typedef struct e2sm_event_trigger_helper e2sm_event_trigger_helper;
65 struct e2sm_event_trigger_helper {
71 long int interface_direction;
72 long int procedure_code;
74 long int message_type;
77 std::vector<struct Item> * get_list(void){ return &protocol_ie_list; };
78 void add_protocol_ie_item(long int id, long int test , unsigned int val_type, long int value ){
80 protocol_ie_list.emplace_back(id, test, val_type, value);
83 void add_protocol_ie_item(long int id, long int test, unsigned int val_type, std::string value){
85 protocol_ie_list.emplace_back(id, test, val_type, value);
89 protocol_ie_list.clear();
92 std::string get_string(void) const {
94 ss << "egNB_ID_type = " << egNB_id_type << std::endl;
95 ss << "PLMN Id = " << plmn_id << std::endl;
96 ss << "Procedure Code = " << procedure_code << std::endl;
97 ss << "Message Type = " << message_type << std::endl;
108 std::vector<struct Item> protocol_ie_list;