X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2Fves%2FVesEvent.cpp;h=b19391ba16a94c266e73b903a79ab0deb02863a9;hb=726a82abf1f485704459e2ce3777b8bac8cc16b6;hp=a12d1c75e8f670b1235a04c2edd00398f157f643;hpb=88debac51779b5de4f38e60e9a26f3015091d91b;p=o-du%2Fl2.git diff --git a/src/o1/ves/VesEvent.cpp b/src/o1/ves/VesEvent.cpp index a12d1c75e..b19391ba1 100644 --- a/src/o1/ves/VesEvent.cpp +++ b/src/o1/ves/VesEvent.cpp @@ -28,9 +28,6 @@ VesEvent::VesEvent(VesEventType eventType) : mVesEventType(eventType) { - getConfig(); - createUrl(); - mHttpClient = new HttpClient(mVesUrl, mVesServerUsername, mVesServerPassword); }; @@ -45,6 +42,33 @@ VesEvent::~VesEvent() free(mSendData); } + +/******************************************************************* + * + * @brief Initialize the Ves Event + * + * @details + * + * Function : init + * + * Functionality: + * - Intialize the Ves event with configuration + * Sets the URL + * Instantiates the http client + * + * @params[in] IN - void + * @return void + * + * ****************************************************************/ + +void VesEvent::init(){ + + getConfig(); + createUrl(); + mHttpClient = new HttpClient(mVesUrl, mVesServerUsername, mVesServerPassword); + +} + /******************************************************************* * * @brief prepare Ves Event Fields @@ -130,6 +154,23 @@ bool VesEvent::prepare(const Message* msg) return true; } +/******************************************************************* + * + * @brief Send the Ves event over Http + * + * @details + * + * Function : send + * + * Functionality: + * - Sends the Ves event over http + * + * @params[in] IN - void + * @return true - success + * false - failure + * + * ****************************************************************/ + bool VesEvent::send() { return mHttpClient->send(mSendData); @@ -219,6 +260,9 @@ void VesEvent::createUrl() { mVesUrl = "https://" + mVesServerIp + ":" + mVesServerPort + "/eventListener/v7"; } + + + /********************************************************************** End of file **********************************************************************/