3506f4bfb948b3aaaddb789fe3f759fe2df926b2
[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 #define ALRM_ID_SIZE 10
26 #define OBJ_INST_SIZE 15
27 #define TEXT_SIZE 50
28 #define DATE_TIME_SIZE 30
29
30 typedef enum
31 {
32    CRITICAL = 3, 
33    MAJOR = 4,
34    MINOR = 5,
35    WARNING = 6,
36    INDETERMINATE = 7,
37    CLEARED = 8
38 }SeverityLevel;
39
40 typedef enum
41 {
42    COMMUNICATIONS_ALARM = 2,
43    QUALITY_OF_SERVICE_ALARM = 3,
44    PROCESSING_ERROR_ALARM = 4,
45    EQUIPMENT_ALARM = 5,
46    ENVIRONMENTAL_ALARM = 6,
47    INTEGRITY_VIOLATION = 7,
48    OPERATIONAL_VIOLATION = 8,
49    PHYSICAL_VIOLATION = 9,
50    SECURITY_SERVICE_OR_MECHANISM_VIOLATION = 10,
51    TIME_DOMAIN_VIOLATION = 11
52 }EventType;
53
54 typedef enum
55 {
56    CLEAR = 0,
57    RAISE = 1
58 }AlarmAction;
59
60 typedef struct
61 {
62    AlarmAction action;
63 }MsgHeader;
64
65 typedef struct
66 {
67    MsgHeader msgHeader;
68    EventType eventType;
69    char objectClassObjectInstance[OBJ_INST_SIZE];
70    char alarmId[ALRM_ID_SIZE];
71    char alarmRaiseTime[DATE_TIME_SIZE];
72    char alarmChangeTime[DATE_TIME_SIZE];
73    char alarmClearTime[DATE_TIME_SIZE];
74    char probableCause[TEXT_SIZE];
75    SeverityLevel perceivedSeverity;
76    char rootCauseIndicator[TEXT_SIZE];  
77    char additionalText[TEXT_SIZE];
78    char additionalInfo[TEXT_SIZE];
79    char specificProblem[TEXT_SIZE];
80 }AlarmRecord;
81
82 #endif
83
84 /**********************************************************************
85          End of file
86 **********************************************************************/