O1 IP PORT configuration for CM .[Issue-Id: ODUHIGH-196]
[o-du/l2.git] / src / o1 / o1_client / Alarm.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2020] [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 definitions of Alarm structure */
20
21 #ifndef __ALARM_H__
22 #define __ALARM_H__
23
24 #include <string.h>
25 #include "CommonMessages.h"
26 #define ALRM_ID_SIZE 10
27 #define OBJ_INST_SIZE 15
28 #define TEXT_SIZE 50
29 #define DATE_TIME_SIZE 30
30
31 typedef enum
32 {
33    CRITICAL = 3, 
34    MAJOR = 4,
35    MINOR = 5,
36    WARNING = 6,
37    INDETERMINATE = 7,
38    CLEARED = 8
39 }SeverityLevel;
40
41 typedef enum
42 {
43    COMMUNICATIONS_ALARM = 2,
44    QUALITY_OF_SERVICE_ALARM = 3,
45    PROCESSING_ERROR_ALARM = 4,
46    EQUIPMENT_ALARM = 5,
47    ENVIRONMENTAL_ALARM = 6,
48    INTEGRITY_VIOLATION = 7,
49    OPERATIONAL_VIOLATION = 8,
50    PHYSICAL_VIOLATION = 9,
51    SECURITY_SERVICE_OR_MECHANISM_VIOLATION = 10,
52    TIME_DOMAIN_VIOLATION = 11
53 }EventType;
54
55
56 typedef struct
57 {
58    MsgHeader msgHeader;
59    EventType eventType;
60    char objectClassObjectInstance[OBJ_INST_SIZE];
61    char alarmId[ALRM_ID_SIZE];
62    char alarmRaiseTime[DATE_TIME_SIZE];
63    char alarmChangeTime[DATE_TIME_SIZE];
64    char alarmClearTime[DATE_TIME_SIZE];
65    char probableCause[TEXT_SIZE];
66    SeverityLevel perceivedSeverity;
67    char rootCauseIndicator[TEXT_SIZE];  
68    char additionalText[TEXT_SIZE];
69    char additionalInfo[TEXT_SIZE];
70    char specificProblem[TEXT_SIZE];
71 }AlarmRecord;
72
73 #endif
74
75 /**********************************************************************
76          End of file
77 **********************************************************************/