Slice PM Counters VES Standard defined
[o-du/l2.git] / src / o1 / ves / SliceMeasurementEventStdDef.hpp
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2022] [HCL Technologies Ltd.]                          #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /* This file contains macros and functions to support the preparation of pnf
20    Registration VES Event*/
21
22
23 #ifndef __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
24 #define __SLICE_MEASUREMENT_EVENT_STD_DEF_HPP__
25
26 #include <iostream>
27 #include <string>
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"
34
35 using namespace std;
36
37 //Macros
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
49
50 class SliceMeasurementEventStdDef : public PerfMeasurementEvent
51 {
52
53    public:
54       /* Default constructor/Destructor */
55       SliceMeasurementEventStdDef();
56       ~SliceMeasurementEventStdDef();
57
58       std::string getISOEventTime();
59
60    protected:
61       bool prepareEventFields(const Message* msg = NULL);
62
63    private:
64       string getMeasPath(string str, int sd, int sst);
65
66 };
67
68 #endif
69 /**********************************************************************
70   End of file
71  **********************************************************************/