VesEvent::VesEvent(VesEventType eventType)
: mVesEventType(eventType) {
- getConfig();
- createUrl();
- mHttpClient = new HttpClient(mVesUrl, mVesServerUsername, mVesServerPassword);
};
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
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);
* @return string : Ves Event Name
******************************************************************/
-string VesEvent::getEventFieldName()
+string VesEvent::getEventFieldName()
{
switch(mVesEventType)
}
case VesEventType::FAULT_NOTIFICATION:
{
+ #ifdef StdDef
+ return "stndDefinedFields";
+ #else
return "faultFields";
+ #endif
}
case VesEventType::PM_SLICE:
{
+ #ifdef StdDef
+ return "stndDefinedFields";
+ #else
return "measurementFields";
+ #endif
}
case VesEventType::HEARTBEAT:
{
{
mVesUrl = "https://" + mVesServerIp + ":" + mVesServerPort + "/eventListener/v7";
}
+
+
+
/**********************************************************************
End of file
**********************************************************************/