Incorporating RMR Health check code
[ric-app/hw.git] / src / xapp-mgmt / msgs_proc.hpp
1 /*
2 ==================================================================================
3         Copyright (c) 2018-2019 AT&T Intellectual Property.
4
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
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
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 ==================================================================================
17 */
18 /*
19  * msgs_proc.hpp
20  * Created on: 2019
21  * Author: Ashwin Shridharan, Shraboni Jana
22  */
23 #pragma once
24
25 #ifndef XAPP_MSG_XAPP_MSG_HPP_
26 #define XAPP_MSG_XAPP_MSG_HPP_
27
28 #include <iostream>
29 #include<rmr/rmr.h>
30 #include <rmr/RIC_message_types.h>
31 #include <mdclog/mdclog.h>
32
33
34 #include <subscription_request.hpp>
35 #include <subscription_response.hpp>
36 #include <subscription_delete_request.hpp>
37 #include <subscription_delete_response.hpp>
38 #include "subscription_request.hpp"
39 #include "subscription_helper.hpp"
40 #include "e2sm.hpp"
41 #include <e2ap_indication.hpp>
42 #include <e2ap_control.hpp>
43 #include <e2ap_control_response.hpp>
44
45 #define MAX_RMR_RECV_SIZE 2<<15
46
47 class XappMsgHandler{
48
49 private:
50         unsigned char* message_buffer;
51         size_t* message_length;
52
53 public:
54          void operator() (rmr_mbuf_t *, bool*);
55
56          bool encode_subscription_request(unsigned char*, size_t* );
57          bool encode_subscription_delete_request(unsigned char*, size_t* );
58
59          bool decode_subscription_response(unsigned char*, size_t );
60          bool decode_subscription_delete_response(unsigned char*, size_t );
61          bool decode_subscription_response_failure(unsigned char*, size_t );
62          bool decode_subscription_delete_response_failure(unsigned char*, size_t );
63
64
65 };
66
67
68 #endif /* XAPP_MSG_XAPP_MSG_HPP_ */