d48b2c8db8f23e1b7d8279ca9e5f38e282e7a059
[o-du/l2.git] / src / o1 / ves / VesUtils.hpp
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2020-2021] [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 message handling functionality for DU APP */
20
21 #ifndef __VES_UTILS_HPP__
22 #define __VES_UTILS_HPP__
23
24 #include <iostream>
25 #include "GlobalDefs.hpp"
26
27 //#define StdDef 1 
28 //config file path
29 #define NETCONF_CONFIG "config/netconfConfig.json"
30 #define OAM_VES_CONFIG "config/oamVesConfig.json"
31 #define SMO_VES_CONFIG "config/smoVesConfig.json"
32
33 //Common Header Macros
34 #define FAULT_STND_DEFINED_NAMESPACE "3GPP-FaultSupervision"
35 #define COMMON_HEADER_VERSION "4.0.1"
36 #define VES_EVENT_LISNERT_VERSION "7.2.1"
37
38 //Event Type
39 #define EVENT_TYPE_5G "EventType5G"
40 #define EVENT_TYPE_ORAN_COMPONENT "O_RAN_COMPONENT"
41 #define EVENT_TYPE_CONTROLLER "Controller"
42
43 //Priority
44 #define PRIORITY_LOW "Low"
45 #define PRIORITY_HIGH "High"
46
47 //Source Name
48 #define ODU_HIGH "ODU-High"
49 #define SOURCE_ID "device_id_cc305d54-75b4-431b-adb2-eb6b9e541234"
50
51 //Naming Code
52 #define NAMING_CODE_ODU "7odu"
53 #define NFC_NAMING_CODE "NFC"
54
55 //Timezone Offset
56 #define TIME_ZONE_00_00 "+00:00"
57
58 //Ves Event Listener Version
59 #define VES_EVENT_LISTENER_7_2_1 "7.2.1"
60
61 //PNF Registration Macros
62 #define PNF_REGISTRATION_VERSION_2_1 "2.1"
63 #define SOFTWARE_VERSION_2_3_5 "2.3.5"
64 #define UNIT_TYPE_7DEV "7DEV"
65 #define VENDER_NAME_VENDORB "VENDORB"
66 #define MODEL_NUMBER_007_DEV "007DEV"
67
68
69 //Additional fields macros for PNF Registration
70
71 #define NETCONF_DEFAULT_PORT "830"
72 #define NETCONF_PROTOCOL_SSH "SSH"
73 #define RECONNECT_ON_SCHEMA_CHANGE_FALSE "false"
74 #define SLEEP_FACTOR_1_5 "1.5"
75 #define TCP_ONLY_FALSE "false"
76 #define CONNECTION_TIMEOUT_20000 "20000"
77 #define MAX_CONNECTION_ATTEMPTS_100 "100"
78 #define BETWEEN_ATTEMPTS_TIMEOUT_2000 "2000"
79 #define KEEPALIVE_DELAY_120 "120"
80
81 // PM_SLICE Macros
82 #define PM_EVENT_ID "_1634181300_PM1min"
83 #define SLICE_EVENTID "pm1_1638984365"
84 #define PM_REPORTING_ENTITY "ORAN-DEV"
85 #define EVENT_TYPE_ORAN_COMPONENT_PM "O_RAN_COMPONENT_PM1min"
86 #define PM_SLICE_EVENT_TYPE "performanceMeasurementStreaming"
87 #define PM_SLICE_EVENT_NAME "stndDefined_performanceMeasurementStreaming"
88 #define PM_SLICE_STND_DEFINED_NAMESPACE "o-ran-sc-du-hello-world-pm-streaming-oas3"
89
90 //NOTIFICATION Macros
91 #define FAULT_EVENTID "Alarm000000001"
92 #define FAULT_TYPE "alarm"
93 #define FAULT_EVENT_NAME "COMMUNICATIONS_ALARM"
94
95 //STND DEFINED Macros
96 #define STND_DEFINED_FEILD_VERSION "1.0"
97
98 enum class VesEventType
99 {
100    PNF_REGISTRATION,
101    FAULT_NOTIFICATION,
102    PM_NOTIFICATION,
103    HEARTBEAT,
104    PM_SLICE
105 };
106
107 enum class MessageType
108 {
109    ALARM,
110    PERF_DATA,
111 };
112
113
114 #endif
115
116 /**********************************************************************
117   End of file
118  **********************************************************************/