1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2022] [HCL Technologies Ltd.] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains macros and functions to support the preparation of pnf
20 Registration VES Event*/
23 #ifndef __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
24 #define __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
28 #include "VesUtils.hpp"
29 #include "JsonHelper.hpp"
30 #include "PerfMeasurementEvent.hpp"
31 #include <cjson/cJSON.h>
32 #include "SliceMetrics.hpp"
33 #include "PmInterface.h"
38 #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"
39 #define SLICE_ID "pm1_1638984365"
40 #define ADMINISTRATIVE_STATE "unlocked"
41 #define OPERATIONAL_STATE "enabled"
42 #define USER_LABEL "pm-1"
43 #define GRANULARITY_PERIOD 5.0
44 #define RANDOM_NUM 12345
45 #define THROUGHPUT_UNIT "kbit/s"
46 #define MEAS_REF "measurement-type-instance-reference"
47 #define YANG_NAME "o-ran-sc-du-hello-world"
48 #define MAX_THP_TYPE 2
50 class SliceMeasurementEventStdDef : public PerfMeasurementEvent
54 /* Default constructor/Destructor */
55 SliceMeasurementEventStdDef();
56 ~SliceMeasurementEventStdDef();
58 std::string getISOEventTime();
61 bool prepareEventFields(const Message* msg = NULL);
64 string getMeasPath(string str, int sd, int sst);
69 /**********************************************************************
71 **********************************************************************/