X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2Fves%2FSliceMeasurementEventStdDef.hpp;fp=src%2Fo1%2Fves%2FSliceMeasurementEventStdDef.hpp;h=5db5d60135d3a4024445a1316e08cebec07942cc;hb=b113656b5f48fbe9769e6cb7cea172aa930446ba;hp=0000000000000000000000000000000000000000;hpb=e2417efa29f0d317a3ed1044ee20cc14df32e1d3;p=o-du%2Fl2.git diff --git a/src/o1/ves/SliceMeasurementEventStdDef.hpp b/src/o1/ves/SliceMeasurementEventStdDef.hpp new file mode 100644 index 000000000..5db5d6013 --- /dev/null +++ b/src/o1/ves/SliceMeasurementEventStdDef.hpp @@ -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 +#include +#include "VesUtils.hpp" +#include "JsonHelper.hpp" +#include "PerfMeasurementEvent.hpp" +#include +#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 + **********************************************************************/