OpenClovis Logo

clAlarmUtils.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : alarm
21  * File : clAlarmUtils.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * This module contains Alarm Service utility related APIs
28  *
29  *****************************************************************************/
30 
31 #ifndef _CL_ALARM_UTIL_H
32 #define _CL_ALARM_UTIL_H
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <clCommon.h>
39 #include <clCommonErrors.h>
40 #include <clCorMetaData.h>
41 
42 
62 typedef struct ClAlarmUtilTlv{
74  ClUint32T length;
80  ClPtrT value;
82 
83 typedef struct ClAlarmUtilTlv *ClAlarmUtilTlvPtrT;
84 
85 
97 typedef struct ClAlarmUtilTlvInfo{
102  ClUint32T numTlvs;
110 
112 
124 typedef struct ClAlarmUtilPayLoad{
135  ClUint32T numTlvs;
143 
145 
156 {
172 
174 
212 ClRcT clAlarmUtilPayloadFlatten(ClAlarmUtilPayLoadListPtrT pPayLoadList, ClUint32T *pSize, ClUint8T **ppBuf);
213 
250 ClRcT clAlarmUtilPayLoadExtract(ClUint8T *pBuf, ClUint32T size, ClAlarmUtilPayLoadListT **ppPayloadList);
251 
274 void clAlarmUtilPayloadBufFree(ClUint8T *pBuf);
275 
302 
303 
304 ClRcT
305 clAlarmClientDebugRegister (CL_OUT ClHandleT * pAlarmDebugHandle);
306 
307 ClRcT
308 clAlarmClientDebugDeregister (CL_IN ClHandleT alarmDebugHandle);
309 
310 #ifdef __cplusplus
311 }
312 #endif
313 
314 #endif /*_CL_ALARM_UTIL_H */
315 
Typical defines found in any software project.
Common Error Codes shared across multiple Clovis ASP Components.
Header file of all MetaData data structures.
ClRcT clAlarmUtilPayLoadExtract(ClUint8T *pBuf, ClUint32T size, ClAlarmUtilPayLoadListT **ppPayloadList)
The function to extract the payload information sent at the time of alarm raise.
ClRcT clAlarmUtilPayloadFlatten(ClAlarmUtilPayLoadListPtrT pPayLoadList, ClUint32T *pSize, ClUint8T **ppBuf)
Function to convert the payload information into a flat buffer.
void clAlarmUtilPayloadBufFree(ClUint8T *pBuf)
The function to free the buffer obtained after flattening the payload information.
struct ClAlarmUtilPayLoadList ClAlarmUtilPayLoadListT
The stucture is used to specify the alarm payload information.
struct ClAlarmUtilPayLoad ClAlarmUtilPayLoadT
This structure holds the information about the attributes that need to be provided in the alarm paylo...
struct ClAlarmUtilTlvInfo ClAlarmUtilTlvInfoT
This structure holds the information about the attributes that needs to be provided in the alarm payl...
struct ClAlarmUtilTlv ClAlarmUtilTlvT
The structure is used to store the information about the variables to be used in the trap.
void clAlarmUtilPayloadListFree(ClAlarmUtilPayLoadListT *pPayloadList)
Function used to free the payload data-structure allocated during alarm reporting or receive.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
enum ClCorType ClCorTypeT
The ClCorType enumeration contains the basic COR data types.
The structure is used to store the information about the variables to be used in the trap.
Definition: clAlarmUtils.h:62
ClUint32T length
Number of bytes the attribute would hold.
Definition: clAlarmUtils.h:74
ClCorTypeT type
Data type of the attribute.
Definition: clAlarmUtils.h:67
ClPtrT value
Value of the attribute.
Definition: clAlarmUtils.h:80
This structure holds the information about the attributes that needs to be provided in the alarm payl...
Definition: clAlarmUtils.h:97
ClAlarmUtilTlvPtrT pTlv
Pointer to the structure containing attribute information.
Definition: clAlarmUtils.h:108
ClUint32T numTlvs
Number of attribute information needed for the trap generation on resource.
Definition: clAlarmUtils.h:102
This structure holds the information about the attributes that need to be provided in the alarm paylo...
Definition: clAlarmUtils.h:124
ClUint32T numTlvs
Number of attribute information needed for the trap generation on resource.
Definition: clAlarmUtils.h:135
ClAlarmUtilTlvPtrT pTlv
Pointer to the structure containing attribute information.
Definition: clAlarmUtils.h:141
ClCorMOIdPtrT pMoId
The pointer to the MOID of the resource.
Definition: clAlarmUtils.h:130
The stucture is used to specify the alarm payload information.
Definition: clAlarmUtils.h:156
ClAlarmUtilPayLoadPtrT pPayload
Stores the information about the attributes corressponding to a particular resource.
Definition: clAlarmUtils.h:170
ClUint32T numPayLoadEnteries
The number of entries which need to be specified in the alarm payload.
Definition: clAlarmUtils.h:161
The structure ClCorMOId contains MoId of the object, which is the address of the COR object.
Definition: clCorMetaData.h:918

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen