2 ==================================================================================
4 Copyright (c) 2019-2020 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, software
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 ==================================================================================
22 * Created on: Apr, 2020
23 * Author: Shraboni Jana
26 /* Classes to handle E2 service model based on e2sm-HelloWorld-v001.asn */
27 #ifndef SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_
28 #define SRC_XAPP_ASN_E2SM_E2SM_INDICATION_HPP_
30 #include <mdclog/mdclog.h>
33 #include <E2SM-HelloWorld-IndicationHeader.h>
34 #include <E2SM-HelloWorld-IndicationMessage.h>
35 #include <E2SM-HelloWorld-IndicationHeader-Format1.h>
36 #include <E2SM-HelloWorld-IndicationMessage-Format1.h>
37 #include <HW-Header.h>
38 #include <HW-Message.h>
39 class HWIndicationHeader {
41 HWIndicationHeader(void);
42 HWIndicationHeader(unsigned char*, size_t *, bool&);
43 ~HWIndicationHeader(void);
44 std::string get_error (void) const {return _error_string ;};
46 long int get_hw_header(){return this->_hw_header;};
48 HWIndicationHeader& set_ricIndicationHeader(int param_header){
49 _hw_header = param_header; return *this;
51 bool decode(unsigned char*, size_t *);
52 bool encode(unsigned char*, size_t *);
58 E2SM_HelloWorld_IndicationHeader_t * _header; // used for encoding
59 E2SM_HelloWorld_IndicationHeader_Format1_t _header_fmt1;
61 bool setfields(E2SM_HelloWorld_IndicationHeader_t *);
63 size_t _errbuf_len = 128;
65 std::string _error_string;
67 class HWIndicationMessage {
69 HWIndicationMessage(void);
70 HWIndicationMessage(unsigned char*, size_t *, bool&);
71 ~HWIndicationMessage(void);
73 std::string get_error (void) const {return _error_string ;};
74 bool decode(unsigned char*, size_t *);
75 bool encode(unsigned char*, size_t *);
77 size_t get_hw_message_size(){return this->_hw_msg_size;};
78 unsigned char* get_hw_message(){return this->_hw_msg;};
79 HWIndicationMessage& set_hw_message(unsigned char* msg, size_t *msg_size){return *this;}
83 unsigned char* _hw_msg;
85 E2SM_HelloWorld_IndicationMessage_t* _message;
86 E2SM_HelloWorld_IndicationMessage_Format1_t _message_fmt1;
88 bool setfields(E2SM_HelloWorld_IndicationMessage_t *);
90 size_t _errbuf_len = 128;
92 std::string _error_string;