X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Bouncer%2Fsrc%2Fxapp-mgmt%2Fmsgs_proc.hpp;fp=Bouncer%2Fsrc%2Fxapp-mgmt%2Fmsgs_proc.hpp;h=a0c97f67b613bf91a4b4e52190e5209dac033372;hb=ff20129c8f517cca6e0b4de6544ff64aebe7c171;hp=0000000000000000000000000000000000000000;hpb=35882dccfbc1b35af0e5704e14e0ecb9eba0f52a;p=ric-app%2Fbouncer.git diff --git a/Bouncer/src/xapp-mgmt/msgs_proc.hpp b/Bouncer/src/xapp-mgmt/msgs_proc.hpp new file mode 100644 index 0000000..a0c97f6 --- /dev/null +++ b/Bouncer/src/xapp-mgmt/msgs_proc.hpp @@ -0,0 +1,68 @@ +/* +# ================================================================================== +# Copyright (c) 2020 HCL Technologies Limited. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ================================================================================== +*/ + + +#pragma once + +#ifndef XAPP_MSG_XAPP_MSG_HPP_ +#define XAPP_MSG_XAPP_MSG_HPP_ + +#include +#include +#include +#include + +#include "a1_helper.hpp" +#include "e2ap_control.hpp" +#include "e2ap_control_response.hpp" +#include "e2ap_indication.hpp" +#include "subscription_delete_request.hpp" +#include "subscription_delete_response.hpp" +#include "subscription_helper.hpp" +#include "subscription_request.hpp" +#include "subscription_request.hpp" +#include "subscription_response.hpp" +#include "e2sm_subscription.hpp" +#include "subs_mgmt.hpp" + +#define MAX_RMR_RECV_SIZE 2<<15 + +class XappMsgHandler{ + +private: + std::string xapp_id; + SubscriptionHandler *_ref_sub_handler; +public: + //constructor for xapp_id. + XappMsgHandler(std::string xid){xapp_id=xid; _ref_sub_handler=NULL;}; + XappMsgHandler(std::string xid, SubscriptionHandler &subhandler){xapp_id=xid; _ref_sub_handler=&subhandler;}; + + void operator() (rmr_mbuf_t *, bool*); + + void register_handler(); + bool encode_subscription_delete_request(unsigned char*, size_t* ); + + bool decode_subscription_response(unsigned char*, size_t ); + + //bool a1_policy_handler(char *, int* , a1_policy_helper &); + + void testfunction() {std::cout << "<<<<<<<<<<<<<<<<<