X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fxapp-asn%2Fe2sm%2Fe2sm_indication.hpp;fp=src%2Fxapp-asn%2Fe2sm%2Fe2sm_indication.hpp;h=00c2a23968de74823735588411d663df7c295aa1;hb=ea129fa14c89d8f5cedacd9afc1e4dd7a30f1ae4;hp=4d820b7b9e6b769186d696c53f19610c32d4278e;hpb=271617d99c4e3d126d0745af02678b4ffab4912e;p=ric-app%2Fhw.git diff --git a/src/xapp-asn/e2sm/e2sm_indication.hpp b/src/xapp-asn/e2sm/e2sm_indication.hpp index 4d820b7..00c2a23 100644 --- a/src/xapp-asn/e2sm/e2sm_indication.hpp +++ b/src/xapp-asn/e2sm/e2sm_indication.hpp @@ -29,7 +29,7 @@ #include #include #include - +#include #include #include #include @@ -39,7 +39,7 @@ class HWIndicationHeader { public: HWIndicationHeader(void); - HWIndicationHeader(unsigned char*, size_t *, bool&); + HWIndicationHeader(unsigned char*, size_t *); ~HWIndicationHeader(void); std::string get_error (void) const {return _error_string ;}; @@ -64,10 +64,11 @@ private: char _errbuf[128]; std::string _error_string; }; + class HWIndicationMessage { public: HWIndicationMessage(void); - HWIndicationMessage(unsigned char*, size_t *, bool&); + HWIndicationMessage(unsigned char*, size_t *); ~HWIndicationMessage(void); std::string get_error (void) const {return _error_string ;}; @@ -76,11 +77,16 @@ public: size_t get_hw_message_size(){return this->_hw_msg_size;}; unsigned char* get_hw_message(){return this->_hw_msg;}; - HWIndicationMessage& set_hw_message(unsigned char* msg, size_t *msg_size){return *this;} + HWIndicationMessage& set_hw_message(std::string msg) + { + _hw_msg_size=strlen(msg.c_str()); + strncpy((char*)_hw_msg,msg.c_str(),_hw_msg_size); + return *this; + } private: size_t _hw_msg_size; - unsigned char* _hw_msg; + unsigned char _hw_msg[30]; E2SM_HelloWorld_IndicationMessage_t* _message; E2SM_HelloWorld_IndicationMessage_Format1_t _message_fmt1;