Slice PM Counters VES Standard defined 94/8494/4
authorHariomGupta <hariom.g@hcl.com>
Mon, 6 Jun 2022 20:06:37 +0000 (01:36 +0530)
committerHariomGupta <hariom.g@hcl.com>
Fri, 10 Jun 2022 14:56:12 +0000 (20:26 +0530)
Issue-Id: ODUHIGH-431

Signed-off-by: HariomGupta <hariom.g@hcl.com>
Change-Id: I6b320f72ef1f5fbb4e081a6fb99cc6fa37ea66ca

13 files changed:
src/o1/ves/CellStateChange.cpp [changed mode: 0755->0644]
src/o1/ves/CellStateChange.hpp [changed mode: 0755->0644]
src/o1/ves/CellStateChangeStdDef.cpp [changed mode: 0755->0644]
src/o1/ves/CellStateChangeStdDef.hpp [changed mode: 0755->0644]
src/o1/ves/Notification.cpp [changed mode: 0755->0644]
src/o1/ves/Notification.hpp [changed mode: 0755->0644]
src/o1/ves/PerfMeasurementEvent.cpp
src/o1/ves/SliceMeasurementEventStdDef.cpp [new file with mode: 0644]
src/o1/ves/SliceMeasurementEventStdDef.hpp [new file with mode: 0644]
src/o1/ves/VesCommonHeader.cpp
src/o1/ves/VesEvent.cpp
src/o1/ves/VesEventHandler.cpp
src/o1/ves/VesUtils.hpp

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index fe83e50..cfd6ad8
@@ -28,6 +28,7 @@
 #include "AlarmManager.hpp"
 #include "Message.hpp"
 #include "Notification.hpp"
 #include "AlarmManager.hpp"
 #include "Message.hpp"
 #include "Notification.hpp"
+#include "VesUtils.hpp"
 
 using namespace std;
 
 
 using namespace std;
 
@@ -44,7 +45,6 @@ using namespace std;
 #define ADD_INFO "new"
 #define ALARM_ID "1"
 #define ALRAM_TYPE "COMMUNICATIONS_ALARM"
 #define ADD_INFO "new"
 #define ALARM_ID "1"
 #define ALRAM_TYPE "COMMUNICATIONS_ALARM"
-#define STND_DEFINED_FEILD_VERSION "1.0"
 #define PERCEIVED_SEVERITY "INDETERMINATE"
 #define PROPOSED_REPAIR_ACTION "Call the police!"
 #define ADDITIONAL_TEXT "O-RAN Software Community"
 #define PERCEIVED_SEVERITY "INDETERMINATE"
 #define PROPOSED_REPAIR_ACTION "Call the police!"
 #define ADDITIONAL_TEXT "O-RAN Software Community"
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 940c6ed..8a4f84b 100644 (file)
@@ -51,10 +51,17 @@ PerfMeasurementEvent::~PerfMeasurementEvent()
  ******************************************************************/
 void PerfMeasurementEvent::getConfig()
 {
  ******************************************************************/
 void PerfMeasurementEvent::getConfig()
 {
+    #ifdef StdDef
+    mVesServerIp = ConfigLoader::instance().getOamConfigFile().getVesServerIp();
+    mVesServerPort = ConfigLoader::instance().getOamConfigFile().getVesServerPort();
+    mVesServerUsername = ConfigLoader::instance().getOamConfigFile().getVesServerUsername();
+    mVesServerPassword = ConfigLoader::instance().getOamConfigFile().getVesServerPassword();
+    #else
     mVesServerIp = ConfigLoader::instance().getSmoConfigFile().getVesServerIp();
     mVesServerPort = ConfigLoader::instance().getSmoConfigFile().getVesServerPort();
     mVesServerUsername = ConfigLoader::instance().getSmoConfigFile().getVesServerUsername();
     mVesServerPassword = ConfigLoader::instance().getSmoConfigFile().getVesServerPassword();
     mVesServerIp = ConfigLoader::instance().getSmoConfigFile().getVesServerIp();
     mVesServerPort = ConfigLoader::instance().getSmoConfigFile().getVesServerPort();
     mVesServerUsername = ConfigLoader::instance().getSmoConfigFile().getVesServerUsername();
     mVesServerPassword = ConfigLoader::instance().getSmoConfigFile().getVesServerPassword();
+    #endif
 }
 
 /*******************************************************************
 }
 
 /*******************************************************************
@@ -74,7 +81,11 @@ void PerfMeasurementEvent::getConfig()
  ******************************************************************/
 void PerfMeasurementEvent::createUrl()
 {
  ******************************************************************/
 void PerfMeasurementEvent::createUrl()
 {
+   #ifdef StdDef
+   mVesUrl = "https://" + mVesServerIp + ":" + mVesServerPort + "/eventListener/v7";
+   #else
    mVesUrl = "https://" + mVesServerIp + ":" + mVesServerPort + "/eventListener/v7/events";
    mVesUrl = "https://" + mVesServerIp + ":" + mVesServerPort + "/eventListener/v7/events";
+   #endif
    O1_LOG("\nURL=%s", mVesUrl.c_str());
 }
 
    O1_LOG("\nURL=%s", mVesUrl.c_str());
 }
 
diff --git a/src/o1/ves/SliceMeasurementEventStdDef.cpp b/src/o1/ves/SliceMeasurementEventStdDef.cpp
new file mode 100644 (file)
index 0000000..1fccb6f
--- /dev/null
@@ -0,0 +1,231 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2022] [HCL Technologies Ltd.]                          #
+#                                                                              #
+#   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.                                             #
+################################################################################
+*******************************************************************************/
+
+/* This file contains macros and functions to support the preparation of pnf
+   Registration VES Event*/
+
+#include <iostream>
+#include <chrono>
+#include <iomanip>
+#include <sstream>
+#include "JsonHelper.hpp"
+#include "SliceMeasurementEventStdDef.hpp"
+#include "CmInterface.h"
+
+extern NRCellDU cellParams;
+
+/* Default constructor*/
+SliceMeasurementEventStdDef::SliceMeasurementEventStdDef()
+               : PerfMeasurementEvent(VesEventType::PM_SLICE)
+{
+
+}
+
+/* Default Destructor*/
+SliceMeasurementEventStdDef::~SliceMeasurementEventStdDef()
+{
+
+}
+
+/*******************************************************************
+ *
+ * @brief Returns ISO time String 
+ *
+ * @details
+ *
+ *    Function :getISOEventTime
+ *
+ *    Functionality:
+ *      - Returns ISO time String
+ *
+ * @params[in] IN - void
+ * @return value of string     - success
+ *         empty string        - failure
+ *
+ * ****************************************************************/
+
+std::string SliceMeasurementEventStdDef::getISOEventTime() {
+   auto now = std::chrono::system_clock::now();
+   auto itt = std::chrono::system_clock::to_time_t(now);
+   std::ostringstream os;
+   os << std::put_time(gmtime(&itt), "%FT%TZ");
+   return os.str();
+}
+
+/*******************************************************************
+*
+* @brief prepare Stnd Slice Measurement path
+*
+* @details
+*
+* Function : getMeaspath
+*
+* Functionality:
+* - prepare Stnd Slice Measurement path
+*
+* @params[in] IN - void
+* @return true - path on success
+*         false - failure
+*
+* ****************************************************************/
+std::string SliceMeasurementEventStdDef::getMeasPath(string str, int sd, int sst)
+{
+   O1_LOG("\n O1 SliceMeasurementEventStdDef cellLocalId :%d",cellParams.cellLocalId);
+   std::ostringstream os;
+   os<<"/"<<YANG_NAME<<":network-function/distributed-unit-functions[id='"\ 
+          << ODU_HIGH <<"']/cell[id='"<<cellParams.cellLocalId <<\ 
+          "']/supported-measurements[performance-measurement-type='user-equipment-average-throughput-"\ 
+          <<str<<"']/supported-snssai-subcounter-instances[slice-differentiator='"\ 
+          <<sd<<"'][slice-service-type='"<<sst<<"']" ;
+   return os.str();
+
+}
+
+/*******************************************************************
+*
+* @brief prepare Stnd Slice Measurement Fields
+*
+* @details
+*
+* Function : prepareEventFields
+*
+* Functionality:
+* - prepare Stnd Slice Measurement Fields  in json format
+*
+* @params[in] IN - const pointer of Message type
+* @return true - success
+*         false - failure
+*
+* ****************************************************************/
+
+bool SliceMeasurementEventStdDef::prepareEventFields(const Message* msg)
+{
+
+   const SliceMetrics* sliceMetrics = dynamic_cast<const SliceMetrics*> (msg);
+
+   bool ret = true;
+
+   cJSON* stndDefinedFields = this->mVesEventFields;
+   if(JsonHelper::addNodeToObject(stndDefinedFields, "stndDefinedFieldsVersion",\
+                          STND_DEFINED_FEILD_VERSION) == 0) 
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(stndDefinedFields, "schemaReference",\
+                          SLICE_SCHEMA) == 0) 
+   {
+      ret = false;
+   }
+
+   cJSON* data = JsonHelper::createNode();
+   if(data == 0)
+   {
+      O1_LOG("\nO1 SliceMeasurementEventStdDef : could not create data JSON object");
+      return false;
+   }
+   else if(JsonHelper::addJsonNodeToObject(stndDefinedFields, "data", \
+                                       data) == 0) {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "id", SLICE_ID) == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "start-time",\
+                          getISOEventTime().c_str()) == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "administrative-state",\
+                          ADMINISTRATIVE_STATE) == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "operational-state",\
+                          OPERATIONAL_STATE) == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "user-label", USER_LABEL) == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "job-tag", "") == 0)
+   {
+      ret = false;
+   }
+   else if(JsonHelper::addNodeToObject(data, "granularity-period",\
+                          GRANULARITY_PERIOD) == 0)
+   {
+      ret = false;
+   }
+
+   cJSON *measure= cJSON_CreateArray();
+   if (measure == NULL)
+   {
+      ret = false;
+   }
+   else if(cJSON_AddItemToObject(data, "measurements", measure) == 0)
+   {
+      ret = false;
+   }
+
+   else if(ret)
+   {
+      const vector<SliceMetricRecord>& sliceList = sliceMetrics->getSliceMetrics();
+      for (size_t i{0}; i < sliceList.size(); i++)
+      {
+         for(int j=0;j<MAX_THP_TYPE;j++)
+         {
+            cJSON* arr = JsonHelper::createNode();
+            cJSON_AddItemToArray(measure,arr);
+
+            string str;
+            cJSON *value;
+           if(j==0)
+           {
+               str = "downlink";
+               value = cJSON_CreateNumber(sliceList[i].DRB_UEThpDl_SNSSAI);
+            }
+            else
+           {
+               str = "uplink";
+               value = cJSON_CreateNumber(sliceList[i].DRB_UEThpUl_SNSSAI);
+            }
+
+            if(JsonHelper::addNodeToObject(arr, MEAS_REF, getMeasPath(str,\
+                                           sliceList[i].networkSliceIdentifier.sd,\
+                                           sliceList[i].networkSliceIdentifier.sst).c_str()) == 0)
+           {
+               ret = false;
+            }
+
+            cJSON_AddItemToObject(arr,"value", value);
+
+            cJSON *unit = cJSON_CreateString(THROUGHPUT_UNIT);
+            cJSON_AddItemToObject(arr,"unit", unit);
+         }
+      }
+   }
+
+   return ret;
+}
+
+/**********************************************************************
+         End of file
+**********************************************************************/
diff --git a/src/o1/ves/SliceMeasurementEventStdDef.hpp b/src/o1/ves/SliceMeasurementEventStdDef.hpp
new file mode 100644 (file)
index 0000000..5db5d60
--- /dev/null
@@ -0,0 +1,71 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2022] [HCL Technologies Ltd.]                          #
+#                                                                              #
+#   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.                                             #
+################################################################################
+*******************************************************************************/
+
+/* This file contains macros and functions to support the preparation of pnf
+   Registration VES Event*/
+
+
+#ifndef __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
+#define __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
+
+#include <iostream>
+#include <string>
+#include "VesUtils.hpp"
+#include "JsonHelper.hpp"
+#include "PerfMeasurementEvent.hpp"
+#include <cjson/cJSON.h>
+#include "SliceMetrics.hpp"
+#include "PmInterface.h"
+
+using namespace std;
+
+//Macros
+#define SLICE_SCHEMA "https://gerrit.o-ran-sc.org/r/gitweb?p=scp/oam/modeling.git;a=blob_plain;f=data-model/oas3/experimental/o-ran-sc-du-hello-world-pm-streaming-oas3.yaml"
+#define SLICE_ID "pm1_1638984365"
+#define ADMINISTRATIVE_STATE "unlocked"
+#define OPERATIONAL_STATE "enabled"
+#define USER_LABEL "pm-1"
+#define GRANULARITY_PERIOD 5.0
+#define RANDOM_NUM 12345
+#define THROUGHPUT_UNIT "kbit/s"
+#define MEAS_REF "measurement-type-instance-reference"
+#define YANG_NAME "o-ran-sc-du-hello-world"
+#define MAX_THP_TYPE 2
+
+class SliceMeasurementEventStdDef : public PerfMeasurementEvent
+{
+
+   public:
+      /* Default constructor/Destructor */
+      SliceMeasurementEventStdDef();
+      ~SliceMeasurementEventStdDef();
+
+      std::string getISOEventTime();
+
+   protected:
+      bool prepareEventFields(const Message* msg = NULL);
+
+   private:
+      string getMeasPath(string str, int sd, int sst);
+
+};
+
+#endif
+/**********************************************************************
+  End of file
+ **********************************************************************/
index 4cbb8ed..23e274f 100644 (file)
@@ -111,7 +111,11 @@ string VesCommonHeader::getEventTypeToStr()
          str = "pmNotification";
          break;
       case VesEventType::PM_SLICE:
          str = "pmNotification";
          break;
       case VesEventType::PM_SLICE:
+         #ifdef StdDef
+         str = "stndDefined";
+         #else
          str = "measurement";
          str = "measurement";
+         #endif
          break;
       case VesEventType::HEARTBEAT:
          str = "heartbeat";
          break;
       case VesEventType::HEARTBEAT:
          str = "heartbeat";
@@ -157,7 +161,11 @@ string VesCommonHeader::getEventId()
          evntId = getEventTypeToStr() + "_" + formatTime(getCurrentTime());
          break;
       case VesEventType::PM_SLICE:
          evntId = getEventTypeToStr() + "_" + formatTime(getCurrentTime());
          break;
       case VesEventType::PM_SLICE:
+         #ifdef StdDef
+         evntId = SLICE_EVENTID;
+         #else
          evntId = "_" + stringEpochTime + "_" + "PM1min";
          evntId = "_" + stringEpochTime + "_" + "PM1min";
+         #endif
      break;
       case VesEventType::FAULT_NOTIFICATION:
          #ifdef StdDef
      break;
       case VesEventType::FAULT_NOTIFICATION:
          #ifdef StdDef
@@ -206,7 +214,11 @@ string VesCommonHeader::getEventType()
          evntType = EVENT_TYPE_ORAN_COMPONENT;
          break;
       case VesEventType::PM_SLICE:
          evntType = EVENT_TYPE_ORAN_COMPONENT;
          break;
       case VesEventType::PM_SLICE:
+         #ifdef StdDef
+         evntType = PM_SLICE_EVENT_TYPE;
+         #else
          evntType = EVENT_TYPE_ORAN_COMPONENT_PM;
          evntType = EVENT_TYPE_ORAN_COMPONENT_PM;
+         #endif
          break;
       case VesEventType::FAULT_NOTIFICATION:
          evntType = FAULT_TYPE;
          break;
       case VesEventType::FAULT_NOTIFICATION:
          evntType = FAULT_TYPE;
@@ -297,7 +309,11 @@ string VesCommonHeader::getEventName()
          evntName = getEventTypeToStr() + "_" + EVENT_TYPE_ORAN_COMPONENT;
          break;
       case VesEventType::PM_SLICE:
          evntName = getEventTypeToStr() + "_" + EVENT_TYPE_ORAN_COMPONENT;
          break;
       case VesEventType::PM_SLICE:
+         #ifdef StdDef
+         evntName = PM_SLICE_EVENT_NAME;
+         #else
          evntName = getEventTypeToStr() + "_" + EVENT_TYPE_ORAN_COMPONENT_PM;
          evntName = getEventTypeToStr() + "_" + EVENT_TYPE_ORAN_COMPONENT_PM;
+         #endif
          break;
       case VesEventType::FAULT_NOTIFICATION:
          #ifdef StdDef
          break;
       case VesEventType::FAULT_NOTIFICATION:
          #ifdef StdDef
@@ -341,7 +357,9 @@ string VesCommonHeader::getReportingEntityId()
       case VesEventType::PNF_REGISTRATION:
          evntName = ODU_HIGH;
          break;
       case VesEventType::PNF_REGISTRATION:
          evntName = ODU_HIGH;
          break;
-
+      case VesEventType::PM_SLICE:
+         evntName = ODU_HIGH;
+        break;
       case VesEventType::FAULT_NOTIFICATION:
          evntName = ODU_HIGH;
         break;
       case VesEventType::FAULT_NOTIFICATION:
          evntName = ODU_HIGH;
         break;
@@ -414,6 +432,9 @@ string VesCommonHeader::getSourceName()
       case VesEventType::PNF_REGISTRATION:
          sourceName = ODU_HIGH;
          break;
       case VesEventType::PNF_REGISTRATION:
          sourceName = ODU_HIGH;
          break;
+      case VesEventType::PM_SLICE:
+         sourceName = ODU_HIGH;
+        break;
       case VesEventType::FAULT_NOTIFICATION:
          sourceName = ODU_HIGH;
         break;
       case VesEventType::FAULT_NOTIFICATION:
          sourceName = ODU_HIGH;
         break;
@@ -472,6 +493,9 @@ string VesCommonHeader::getnfcNamingCode()
    string name = "";
    switch(mEventType)
    {
    string name = "";
    switch(mEventType)
    {
+      case VesEventType::PM_SLICE:
+         name = NFC_NAMING_CODE;
+        break;
       case VesEventType::FAULT_NOTIFICATION:
          name = NFC_NAMING_CODE;
         break;
       case VesEventType::FAULT_NOTIFICATION:
          name = NFC_NAMING_CODE;
         break;
@@ -508,6 +532,7 @@ string VesCommonHeader::getNamingCode()
          nammingcdoe = NAMING_CODE_ODU;
          break;
       case VesEventType::PM_SLICE:
          nammingcdoe = NAMING_CODE_ODU;
          break;
       case VesEventType::PM_SLICE:
+         nammingcdoe = NAMING_CODE_ODU;
          break;
       case VesEventType::FAULT_NOTIFICATION:
          nammingcdoe = NAMING_CODE_ODU;
          break;
       case VesEventType::FAULT_NOTIFICATION:
          nammingcdoe = NAMING_CODE_ODU;
@@ -615,8 +640,11 @@ string VesCommonHeader::getstndDefinedNamespace()
    string stndDefinedNamespace="";
    switch(mEventType)
    {
    string stndDefinedNamespace="";
    switch(mEventType)
    {
+      case VesEventType::PM_SLICE:
+         stndDefinedNamespace = PM_SLICE_STND_DEFINED_NAMESPACE;
+        break;
       case VesEventType::FAULT_NOTIFICATION:
       case VesEventType::FAULT_NOTIFICATION:
-         stndDefinedNamespace = STND_DEFINED_NAMESPACE;
+         stndDefinedNamespace = FAULT_STND_DEFINED_NAMESPACE;
         break;
       default:
          break;
         break;
       default:
          break;
@@ -679,6 +707,8 @@ bool VesCommonHeader::prepare(cJSON *commonHeader, \
       ret = false;
    }
 
       ret = false;
    }
 
+   #ifdef StdDef
+   #else
    if (mEventType == VesEventType::PM_SLICE)
    {
       cJSON *internalHeaderFields = JsonHelper::createNode();
    if (mEventType == VesEventType::PM_SLICE)
    {
       cJSON *internalHeaderFields = JsonHelper::createNode();
@@ -702,11 +732,7 @@ bool VesCommonHeader::prepare(cJSON *commonHeader, \
          ret = false;
       }
    }
          ret = false;
       }
    }
-
-   if (mEventType == VesEventType::PNF_REGISTRATION)
-   {
-
-   }
+   #endif
 
    if(JsonHelper::addNodeToObject(commonHeader, "sequence", \
                                        getSequenceNo()) == 0)
 
    if(JsonHelper::addNodeToObject(commonHeader, "sequence", \
                                        getSequenceNo()) == 0)
@@ -769,28 +795,17 @@ bool VesCommonHeader::prepare(cJSON *commonHeader, \
       ret = false;
    }
 
       ret = false;
    }
 
-   if (mEventType == VesEventType::PM_SLICE)
-   {
-      if(JsonHelper::addNodeToObject(commonHeader, "version", \
-                                          VERSION_4_1) == 0)
-      {
-         ret = false;
-      }
-   }
-   else
-   {
-      if(JsonHelper::addNodeToObject(commonHeader, "version", \
+   else if(JsonHelper::addNodeToObject(commonHeader, "version", \
                                           COMMON_HEADER_VERSION) == 0)
                                           COMMON_HEADER_VERSION) == 0)
-      {
-         ret = false;
-      }
+   {
+      ret = false;
    }
    }
-   if(JsonHelper::addNodeToObject(commonHeader, "stndDefinedNamespace", \
+   else if(JsonHelper::addNodeToObject(commonHeader, "stndDefinedNamespace", \
                                        getstndDefinedNamespace().c_str())== 0)            
    {
       ret = false;
    }
                                        getstndDefinedNamespace().c_str())== 0)            
    {
       ret = false;
    }
-   if(JsonHelper::addNodeToObject(commonHeader, "vesEventListenerVersion", \
+   else if(JsonHelper::addNodeToObject(commonHeader, "vesEventListenerVersion", \
                                        VES_EVENT_LISNERT_VERSION) == 0)
    {
       ret = false;
                                        VES_EVENT_LISNERT_VERSION) == 0)
    {
       ret = false;
index f06cb2a..9415df6 100644 (file)
@@ -211,7 +211,11 @@ string VesEvent::getEventFieldName()
       }
       case VesEventType::PM_SLICE:
       {
       }
       case VesEventType::PM_SLICE:
       {
+         #ifdef StdDef
+         return "stndDefinedFields";
+         #else
          return "measurementFields";
          return "measurementFields";
+         #endif
       }
       case VesEventType::HEARTBEAT:
       {
       }
       case VesEventType::HEARTBEAT:
       {
index 18e45a7..bf52f1d 100644 (file)
@@ -26,6 +26,7 @@
 #include "Message.hpp"
 #include "CellStateChange.hpp"
 #include "CellStateChangeStdDef.hpp"
 #include "Message.hpp"
 #include "CellStateChange.hpp"
 #include "CellStateChangeStdDef.hpp"
+#include "SliceMeasurementEventStdDef.hpp"
 
 /*******************************************************************
  *
 
 /*******************************************************************
  *
@@ -97,8 +98,13 @@ bool VesEventHandler::prepare(VesEventType evtType, const Message* msg)
       }
       case VesEventType::PM_SLICE:
       {
       }
       case VesEventType::PM_SLICE:
       {
+         #ifdef StdDef
+         mVesEvent = new SliceMeasurementEventStdDef;
+         O1_LOG("\nO1 VesEventHandler : Preparing Standard VES PM Slice");
+         #else
          mVesEvent = new SliceMeasurementEvent;
          O1_LOG("\nO1 VesEventHandler : Preparing VES PM Slice");
          mVesEvent = new SliceMeasurementEvent;
          O1_LOG("\nO1 VesEventHandler : Preparing VES PM Slice");
+         #endif
          break;
       }
       case VesEventType::FAULT_NOTIFICATION:
          break;
       }
       case VesEventType::FAULT_NOTIFICATION:
index 84df3bd..d48b2c8 100644 (file)
 #include <iostream>
 #include "GlobalDefs.hpp"
 
 #include <iostream>
 #include "GlobalDefs.hpp"
 
-#define StdDef 1 
+//#define StdDef 1 
 //config file path
 #define NETCONF_CONFIG "config/netconfConfig.json"
 #define OAM_VES_CONFIG "config/oamVesConfig.json"
 #define SMO_VES_CONFIG "config/smoVesConfig.json"
 
 //Common Header Macros
 //config file path
 #define NETCONF_CONFIG "config/netconfConfig.json"
 #define OAM_VES_CONFIG "config/oamVesConfig.json"
 #define SMO_VES_CONFIG "config/smoVesConfig.json"
 
 //Common Header Macros
-#define STND_DEFINED_NAMESPACE "3GPP-FaultSupervision"
+#define FAULT_STND_DEFINED_NAMESPACE "3GPP-FaultSupervision"
 #define COMMON_HEADER_VERSION "4.0.1"
 #define VES_EVENT_LISNERT_VERSION "7.2.1"
 
 #define COMMON_HEADER_VERSION "4.0.1"
 #define VES_EVENT_LISNERT_VERSION "7.2.1"
 
 //Timezone Offset
 #define TIME_ZONE_00_00 "+00:00"
 
 //Timezone Offset
 #define TIME_ZONE_00_00 "+00:00"
 
-//version
-#define VERSION_4_0_1 "4.0.1"
-#define VERSION_4_1 "4.1"
-
 //Ves Event Listener Version
 #define VES_EVENT_LISTENER_7_2_1 "7.2.1"
 
 //Ves Event Listener Version
 #define VES_EVENT_LISTENER_7_2_1 "7.2.1"
 
 
 // PM_SLICE Macros
 #define PM_EVENT_ID "_1634181300_PM1min"
 
 // PM_SLICE Macros
 #define PM_EVENT_ID "_1634181300_PM1min"
+#define SLICE_EVENTID "pm1_1638984365"
 #define PM_REPORTING_ENTITY "ORAN-DEV"
 #define EVENT_TYPE_ORAN_COMPONENT_PM "O_RAN_COMPONENT_PM1min"
 #define PM_REPORTING_ENTITY "ORAN-DEV"
 #define EVENT_TYPE_ORAN_COMPONENT_PM "O_RAN_COMPONENT_PM1min"
+#define PM_SLICE_EVENT_TYPE "performanceMeasurementStreaming"
+#define PM_SLICE_EVENT_NAME "stndDefined_performanceMeasurementStreaming"
+#define PM_SLICE_STND_DEFINED_NAMESPACE "o-ran-sc-du-hello-world-pm-streaming-oas3"
 
 //NOTIFICATION Macros
 #define FAULT_EVENTID "Alarm000000001"
 #define FAULT_TYPE "alarm"
 #define FAULT_EVENT_NAME "COMMUNICATIONS_ALARM"
 
 
 //NOTIFICATION Macros
 #define FAULT_EVENTID "Alarm000000001"
 #define FAULT_TYPE "alarm"
 #define FAULT_EVENT_NAME "COMMUNICATIONS_ALARM"
 
+//STND DEFINED Macros
+#define STND_DEFINED_FEILD_VERSION "1.0"
+
 enum class VesEventType
 {
    PNF_REGISTRATION,
 enum class VesEventType
 {
    PNF_REGISTRATION,