X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Bouncer%2Fsrc%2Fxapp-asn%2Fe2sm%2Fe2sm_control.hpp;fp=Bouncer%2Fsrc%2Fxapp-asn%2Fe2sm%2Fe2sm_control.hpp;h=75be4478158f5c485262ef24ef2e17dc059f48b8;hb=ff20129c8f517cca6e0b4de6544ff64aebe7c171;hp=0000000000000000000000000000000000000000;hpb=35882dccfbc1b35af0e5704e14e0ecb9eba0f52a;p=ric-app%2Fbouncer.git diff --git a/Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp b/Bouncer/src/xapp-asn/e2sm/e2sm_control.hpp new file mode 100644 index 0000000..75be447 --- /dev/null +++ b/Bouncer/src/xapp-asn/e2sm/e2sm_control.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. +# ================================================================================== +*/ + + +/* Classes to handle E2 service model based on Bouncer-v001.asn */ +#ifndef SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ +#define SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +class e2sm_control { +public: + e2sm_control(void); + ~e2sm_control(void); + + bool set_fields(E2SM_Bouncer_ControlHeader_t *, e2sm_control_helper &); + bool set_fields(E2SM_Bouncer_ControlMessage_t *, e2sm_control_helper &); + + bool get_fields(E2SM_Bouncer_ControlHeader_t *, e2sm_control_helper &); + bool get_fields(E2SM_Bouncer_ControlMessage_t *, e2sm_control_helper &); + + bool encode_control_header(unsigned char *, size_t *, e2sm_control_helper &); + bool encode_control_message(unsigned char*, size_t *, e2sm_control_helper &); + + + std::string get_error (void) const {return error_string ;}; + +private: + + E2SM_Bouncer_ControlHeader_t * control_head; // used for encoding + E2SM_Bouncer_ControlMessage_t* control_msg; + E2SM_Bouncer_ControlHeader_Format1_t head_fmt1; + E2SM_Bouncer_ControlMessage_Format1_t msg_fmt1; + + + size_t errbuf_len; + char errbuf[128]; + std::string error_string; +}; + + + +#endif /* SRC_XAPP_ASN_E2SM_E2SM_CONTROL_HPP_ */