OpenClovis Logo

clCpmExtApi.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 
32 #ifndef _CL_CPM_EXT_API_H_
33 #define _CL_CPM_EXT_API_H_
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
40 #include <clCommon.h>
41 #include <clCommonErrors.h>
42 #include <clCpmApi.h>
43 
44 #include <clEventApi.h>
45 #include <clCorMetaData.h>
46 
47 /*
48  * The static target slot/target info read from targetconf.xml
49  */
50 
51 typedef struct ClTargetSlotInfo
52 {
53  ClCharT name[80];
54  ClInt32T addr;
55  ClCharT linkname[40];
56  ClCharT arch[80];
57  /*
58  * A private data store per node/slot referenced from the private xml tag
59  */
60  ClCharT customData[256];
61 } ClTargetSlotInfoT;
62 
63 typedef struct ClTargetInfo
64 {
65  ClCharT version[80];
66  ClCharT trapIp[40];
67  ClBoolT installPrerequisites;
68  ClBoolT instantiateImages;
69  ClBoolT createTarballs;
70  ClInt32T tipcNetid;
71  ClInt32T gmsMcastPort;
72  ClUint32T numSlots;
73 } ClTargetInfoT;
74 
80 typedef enum
81 {
103 
105 
109 typedef struct
110 {
114  ClUint32T slotId;
128 
129 /*
130  * CPM node config set.
131  */
132 typedef struct ClCpmNodeConfig
133 {
134  ClCharT nodeName[CL_MAX_NAME_LENGTH];
135  ClNameT nodeType;
136  ClNameT nodeIdentifier;
137  ClNameT nodeMoIdStr;
138  ClCharT cpmType[CL_MAX_NAME_LENGTH];
139 }ClCpmNodeConfigT;
140 
144 typedef enum
145 {
155 
185  CL_IN ClSizeT eventDataSize,
186  CL_IN ClCpmEventTypeT cpmEventType,
187  CL_OUT void *payLoad);
188 
210 extern ClRcT clCpmComponentPIDGet(CL_IN const ClNameT *compName,
211  CL_OUT ClUint32T *pid);
212 
213 extern ClRcT clCpmComponentPIDGetBySlot(ClIocNodeAddressT slot,
214  const ClNameT *compName, ClUint32T *pid);
215 
251 /*
252  * CM requirement.
253  * Single function which returns the consolidated information
254  * about the slot.
255  */
257  CL_OUT ClCpmSlotInfoT *slotInfo);
258 
259 
296  CL_OUT ClCpmSlotInfoT *slotInfo);
297 
298 
323  CL_OUT ClIocAddressT *pIocAddress);
324 
345 extern ClBoolT clCpmIsCompRestarted(CL_IN ClNameT compName);
346 
347 extern ClRcT clCpmNodeConfigSet(ClCpmNodeConfigT *nodeConfig);
348 
349 extern ClRcT clCpmNodeConfigGet(const ClCharT *nodeName, ClCpmNodeConfigT *nodeConfig);
350 
351 extern ClRcT clCpmCompConfigSet(ClIocNodeAddressT node,
352  ClCharT *name, ClCharT *instantiateCommand,
353  ClAmsCompPropertyT property, ClUint64T mask);
354 
355 extern ClRcT
356 clCpmComponentFailureReportWithCookie(CL_IN ClCpmHandleT cpmHandle,
357  CL_IN const ClNameT *pCompName,
358  CL_IN ClUint64T instantiateCookie,
359  CL_IN ClTimeT errorDetectionTime,
360  CL_IN ClAmsLocalRecoveryT recommendedRecovery,
361  CL_IN ClUint32T alarmHandle);
362 
363 extern ClRcT
364 clCpmTargetSlotInfoGet(const ClCharT *name, ClIocNodeAddressT addr, ClTargetSlotInfoT *slotInfo);
365 
366 extern ClRcT
367 clCpmTargetInfoGet(ClTargetInfoT *targetInfo);
368 
369 extern ClRcT
370 clCpmTargetSlotListGet(ClTargetSlotInfoT *slotInfo, ClUint32T *numSlots);
371 
372 extern ClRcT
373 clCpmTargetVersionGet(ClCharT *aspVersion, ClUint32T maxBytes);
374 
375 extern ClBoolT
376 clCpmIsSCCapable(void);
377 
378 #ifdef __cplusplus
379 }
380 #endif
381 
382 #endif /* _CL_CPM_EXT_API_H_*/
383 
384 
Typical defines found in any software project.
Common Error Codes shared across multiple Clovis ASP Components.
Header file for the APIs and data types exposed by the CPM.
Header file of all MetaData data structures.
Header file of Event Manager Related APIs.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
ClInt64T ClTimeT
Time duration specified in nanoseconds.
Definition: clCommon.h:154
#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_MAX_NAME_LENGTH
The Maximum length of most string names in the OpenClovis ASP framework.
Definition: clCommon.h:194
ClUint64T ClSizeT
Definition: clCommon.h:157
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClRcT clCpmSlotGet(CL_IN ClCpmSlotInfoFieldIdT flag, CL_OUT ClCpmSlotInfoT *slotInfo)
Returns the Slot related information [ nodeName and IocAddress], provides the mapping between slot ID...
ClRcT clCpmIocAddressForNodeGet(CL_IN ClNameT nodeName, CL_OUT ClIocAddressT *pIocAddress)
Returns the IOC address for the given node.
ClRcT clCpmComponentPIDGet(CL_IN const ClNameT *compName, CL_OUT ClUint32T *pid)
Returns the process ID of the component.
ClBoolT clCpmIsCompRestarted(CL_IN ClNameT compName)
Checks if the given component has been restarted.
ClRcT clCpmSlotInfoGet(CL_IN ClCpmSlotInfoFieldIdT flag, CL_OUT ClCpmSlotInfoT *slotInfo)
Returns the Slot related information [node moID, nodeName and IocAddress], provides the mapping betwe...
ClHandleT ClCpmHandleT
The type of the handle supplied by the CPM to the process which calls the clCpmClientInitialize() API...
Definition: clCpmApi.h:124
ClCpmSlotInfoFieldIdT
The enum which indicates which field of ClCpmSlotInfoT is set and all other information related to it...
Definition: clCpmExtApi.h:81
ClRcT clCpmEventPayLoadExtract(CL_IN ClEventHandleT eventHandle, CL_IN ClSizeT eventDataSize, CL_IN ClCpmEventTypeT cpmEventType, CL_OUT void *payLoad)
Extracts the event payload data.
ClCpmEventTypeT
Types of the events published by the Component Manager.
Definition: clCpmExtApi.h:145
@ CL_CPM_NODE_MOID
Definition: clCpmExtApi.h:97
@ CL_CPM_NODENAME
Flag indicating that name of the node is being passed.
Definition: clCpmExtApi.h:102
@ CL_CPM_IOC_ADDRESS
Flag indicating that IOC address of the node is being passed.
Definition: clCpmExtApi.h:91
@ CL_CPM_SLOT_ID
Flag indicating that slot ID of the node is being passed.
Definition: clCpmExtApi.h:86
@ CL_CPM_COMP_EVENT
Component death event.
Definition: clCpmExtApi.h:149
@ CL_CPM_NODE_EVENT
Node arrival/departure event.
Definition: clCpmExtApi.h:153
ClHandleT ClEventHandleT
The type of a handle to an event.
Definition: clEventApi.h:158
ClUint32T ClIocNodeAddressT
The IOC node address.
Definition: clIocApi.h:343
A name.
Definition: clCommon.h:197
The structure filled by the clCpmSlotInfoGet() API.
Definition: clCpmExtApi.h:110
ClNameT nodeName
Name of the node.
Definition: clCpmExtApi.h:126
ClCorMOIdT nodeMoId
MOID of the node.
Definition: clCpmExtApi.h:122
ClIocNodeAddressT nodeIocAddress
IOC address of the node.
Definition: clCpmExtApi.h:118
ClUint32T slotId
Slot ID of the node.
Definition: clCpmExtApi.h:114
The structure ClCorMOId contains MoId of the object, which is the address of the COR object.
Definition: clCorMetaData.h:918
IOC address.
Definition: clIocApi.h:401

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