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 # ==================================================================================
22 #ifndef XAPP_MSG_XAPP_MSG_HPP_
23 #define XAPP_MSG_XAPP_MSG_HPP_
27 #include <rmr/RIC_message_types.h>
28 #include <mdclog/mdclog.h>
30 #include "a1_helper.hpp"
31 #include "e2ap_control.hpp"
32 #include "e2ap_control_response.hpp"
33 #include "e2ap_indication.hpp"
34 #include "subscription_delete_request.hpp"
35 #include "subscription_delete_response.hpp"
36 #include "subscription_helper.hpp"
37 #include "subscription_request.hpp"
38 #include "subscription_request.hpp"
39 #include "subscription_response.hpp"
40 #include "e2sm_subscription.hpp"
41 #include "subs_mgmt.hpp"
43 #define MAX_RMR_RECV_SIZE 2<<15
49 SubscriptionHandler *_ref_sub_handler;
51 //constructor for xapp_id.
52 XappMsgHandler(std::string xid){xapp_id=xid; _ref_sub_handler=NULL;};
53 XappMsgHandler(std::string xid, SubscriptionHandler &subhandler){xapp_id=xid; _ref_sub_handler=&subhandler;};
55 void operator() (rmr_mbuf_t *, bool*);
57 void register_handler();
58 bool encode_subscription_delete_request(unsigned char*, size_t* );
60 bool decode_subscription_response(unsigned char*, size_t );
62 //bool a1_policy_handler(char *, int* , a1_policy_helper &);
64 void testfunction() {std::cout << "<<<<<<<<<<<<<<<<<<IN TEST FUNCTION<<<<<<<<<<<<<<<" << std::endl;}
68 #endif /* XAPP_MSG_XAPP_MSG_HPP_ */