OpenClovis Logo

Classes | Macros | Typedefs | Enumerations | Functions | Variables
clCpmApi.h File Reference

Header file for the APIs and data types exposed by the CPM. More...

#include <clCommon.h>
#include <clCommonErrors.h>
#include <clCntApi.h>
#include <clOsalApi.h>
#include <clEoApi.h>
#include <clTimerApi.h>
#include <clCksmApi.h>
#include <clIocApi.h>
#include <clRmdApi.h>
#include <clIocApiExt.h>
#include <clCpmConfigApi.h>
#include <clCpmErrors.h>
#include <clAmsTypes.h>

Go to the source code of this file.

Classes

struct  ClCpmCallbacksT
 The structure ClCpmCallbacksT contains the various callback functions that the Component Manager can invoke on a component. More...
struct  ClCpmCompSpecInfo
 Component specific data which is maintained by CPM. More...
struct  ClCpmEventNodePayLoadT
 Payload data for the node arrival/departure event published by the CPM. More...
struct  ClCpmEventPayLoadT
 Payload data for the component death event published by the CPM. More...

Macros

#define CL_CPM_COMP_ARRIVAL_PATTERN   (1 << 0)
 Pattern for subscribing for component arrival event.
#define CL_CPM_COMP_DEATH_PATTERN   (1 << 2)
 Pattern for subscribing for component death event.
#define CL_CPM_COMP_DEPART_PATTERN   (1 << 1)
 Pattern for subscribing for component terminate event.
#define CL_CPM_EO_ALIVE   (ClUint32T)0
 This define is related to EO state management, in the context of heartbeat success or failure.
#define CL_CPM_EO_DEAD   (ClUint32T)0xFFFFFFF
 EO state management related defines, in the context of heartbeat success or failure.
#define CL_CPM_EVENT_CHANNEL_NAME   "CPM_EVENT_CHANNEL"
 Event Channel information related to Component failure.
#define CL_CPM_IOC_ADDRESS_CHASSIS_GET(address, myCh)   (myCh) = (address) >> CL_CPM_IOC_SLOT_BITS;
 Macro for getting the chsssisId from IOC address.
#define CL_CPM_IOC_ADDRESS_GET(myCh, mySl, address)
 Macro for generating the IOC address based on the chassidId and slotId.
#define CL_CPM_IOC_ADDRESS_SLOT_GET(address, mySl)   (mySl) = (address) & CL_CPM_IOC_SLOT_BITS_HEX;
 Macro for getting the slotId from IOC address.
#define CL_CPM_IOC_SLOT_BITS   16
 IOC address related macros.
#define CL_CPM_MAJOR_VERSION   0x01
 Major version.
#define CL_CPM_MINOR_VERSION   0x01
 Minor version.
#define CL_CPM_NODE_ARRIVAL_PATTERN   (1 << 3)
 Pattern for subscribing for node arrival event.
#define CL_CPM_NODE_DEATH_PATTERN   (1 << 5)
 Pattern for subscribing for node death event.
#define CL_CPM_NODE_DEPART_PATTERN   (1 << 4)
 Pattern for subscribing for node departure event.
#define CL_CPM_NODE_EVENT_CHANNEL_NAME   "CPM_NODE_EVENT_CHANNEL"
 The node Arrival and Departure related Event channel information.
#define CL_CPM_RELEASE_CODE   'B'
 SAF version supported by the CPM.
#define ClCpmSchedFeedBackT   ClEoSchedFeedBackT
 Feedback sent by the software component in response to heartbeat request sent by CPM.

Typedefs

typedef struct ClCpmCompSpecInfo ClCpmCompSpecInfoT
 Component specific data which is maintained by CPM.
typedef ClRcT(* ClCpmCSIRmvCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pCompName, CL_IN const ClNameT *pCsiName, CL_IN ClAmsCSIFlagsT csiFlags)
 Removes one or all the assigned CSIs.
typedef ClRcT(* ClCpmCSISetCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pCompName, CL_IN ClAmsHAStateT haState, CL_IN ClAmsCSIDescriptorT csiDescriptor)
 Component Manager requests the component, identified by compName, to assume a particular HA state, specified by haState, for one or all the CSIs [Asynchronous Call].
typedef ClHandleT ClCpmHandleT
 The type of the handle supplied by the CPM to the process which calls the clCpmClientInitialize() API.
typedef ClRcT(* ClCpmHealthCheckCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pCompName, CL_IN ClAmsCompHealthcheckKeyT *pHealthCheckKey)
 SAF compliant APIs and data types of CPM.
typedef void(* ClCpmNotificationFuncT )(CL_IN ClIocNotificationIdT event, CL_IN ClPtrT pArg, CL_IN ClIocAddressT *pAddress)
 This is the type of the callback fuction, which will be called when an node/component arrival/departure event occurs.
typedef void(* ClCpmProtectionGroupTrackCallbackT )(CL_IN const ClNameT *pCsiName, CL_IN ClAmsPGNotificationBufferT *pNotificationBuffer, CL_IN ClUint32T numberOfMembers, CL_IN ClUint32T error)
 Requested information gets delivered to notificationBuffer.
typedef ClRcT(* ClCpmProxiedComponentCleanupCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pProxiedCompName)
 Component Manager requests the proxy component to cleanup the component, identified by proxiedCompName [Asynchronous call].
typedef ClRcT(* ClCpmProxiedComponentInstantiateCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pProxiedCompName)
 Component Manager requests the proxy component to instantiate the component, identified by proxiedCompName [Asynchronous Call].
typedef ClRcT(* ClCpmTerminateCallbackT )(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pCompName)
 Component Manager requests the component, identified by compName, to gracefully shutdown [Asynchronous Call with reply].

Enumerations

enum  ClCpmCompEventT {
  CL_CPM_COMP_ARRIVAL,
  CL_CPM_COMP_DEPARTURE,
  CL_CPM_COMP_DEATH
}
 Flags that can be used by subscriber to distinguish diffrent component events. More...
enum  ClCpmNodeEventT {
  CL_CPM_NODE_ARRIVAL,
  CL_CPM_NODE_DEPARTURE,
  CL_CPM_NODE_DEATH
}
 Flags that can be used by subscriber to distinguish diffrent events related to node. More...

Functions

ClRcT clCpmClientFinalize (CL_IN ClCpmHandleT cpmHandle)
 Cleans up the client Component Manager library.
ClRcT clCpmClientInitialize (CL_OUT ClCpmHandleT *pCpmHandle, CL_IN const ClCpmCallbacksT *pCallback, CL_INOUT ClVersionT *pVersion)
 Initializes the client Component Manager library.
ClRcT clCpmCompCSIList (const ClNameT *pCompName, ClCpmCompCSIRefT *pCSIRef)
 The API gets the comp CSI List from the component CSI cache maintained per-process.
ClRcT clCpmCompInfoGet (const ClNameT *compName, const ClIocNodeAddressT nodeAddress, CL_OUT ClCpmCompSpecInfoT *compInfo)
 The API returns component specific information.
ClRcT clCpmComponentAddressGet (CL_IN ClIocNodeAddressT nodeAddress, CL_IN ClNameT *pCompName, CL_OUT ClIocAddressT *pCompAddress)
 Returns the IOC address of a component.
ClRcT clCpmComponentFailureClear (CL_IN ClCpmHandleT cpmHandle, CL_IN ClNameT *pCompName)
 Notifies about the restoration of the failed component.
ClRcT clCpmComponentFailureReport (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN ClTimeT errorDetectionTime, CL_IN ClAmsLocalRecoveryT recommendedRecovery, CL_IN ClUint32T alarmHandle)
 Notifies about the failed component.
ClRcT clCpmComponentIdGet (CL_IN ClCpmHandleT cpmHandle, CL_IN ClNameT *pCompName, CL_OUT ClUint32T *pCompId)
 Other utility APIs exposed by CPM.
ClRcT clCpmComponentNameGet (CL_IN ClCpmHandleT cpmHandle, CL_OUT ClNameT *pCompName)
 Returns the component name.
ClRcT clCpmComponentRegister (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN const ClNameT *pProxyCompName)
 Registers a component with CPM.
ClRcT clCpmComponentStatusGet (CL_IN ClNameT *pCompName, CL_IN ClNameT *pNodeName, CL_OUT ClAmsPresenceStateT *pPresenceState, CL_OUT ClAmsOperStateT *pOperationalState)
 Returns the component presence and operational state.
ClRcT clCpmComponentUnregister (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN const ClNameT *pProxyCompName)
 Un-registers a component.
ClRcT clCpmCompStatusGet (ClIocAddressT compAddr, ClStatusT *pStatus)
 Returns the status of any component in a system.
ClRcT clCpmCSIQuiescingComplete (CL_IN ClCpmHandleT cpmHandle, CL_IN ClInvocationT invocation, CL_IN ClRcT retCode)
 Respond to AMF whether it was able to successfully service all pending requests for a particular component service instance, following the earlier request by AMF to the component to enter the CL_AMS_HA_STATE_QUIESCING HA state via the components ClCpmCSISetCallbackT callback.
ClRcT clCpmDispatch (CL_IN ClCpmHandleT cpmHandle, CL_OUT ClDispatchFlagsT dispatchFlags)
 Invoke pending callbacks.
ClRcT clCpmHAStateGet (CL_IN ClCpmHandleT cpmHandle, CL_IN ClNameT *compName, CL_IN ClNameT *csiName, CL_OUT ClAmsHAStateT *haState)
 Returns the HA state of the component.
ClRcT clCpmHealthcheckConfirm (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN const ClAmsCompHealthcheckKeyT *pCompHealthCheck, CL_IN ClRcT healthCheckResult)
 Inform AMF the status of component invoked healthcheck.
ClRcT clCpmHealthcheckStart (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN const ClAmsCompHealthcheckKeyT *pCompHealthCheck, CL_IN ClAmsCompHealthcheckInvocationT invocationType, CL_IN ClAmsRecoveryT recommondedRecovery)
 Starts the component healthcheck.
ClRcT clCpmHealthcheckStop (CL_IN ClCpmHandleT cpmHandle, CL_IN const ClNameT *pCompName, CL_IN const ClAmsCompHealthcheckKeyT *pCompHealthCheck)
 Stops the component healthcheck.
ClUint32T clCpmIsMaster (void)
 Informs if the node is master of the cluster.
ClBoolT clCpmIsSC (void)
 The API returns whether this node is system controller or not.
ClRcT clCpmLocalNodeNameGet (CL_IN ClNameT *nodeName)
 Returns the name of the local node.
ClRcT clCpmMasterAddressGet (CL_OUT ClIocNodeAddressT *pIocAddress)
 Returns the IOC address of the master.
ClRcT clCpmNodeRestart (CL_IN ClIocNodeAddressT iocNodeAddress, CL_IN ClBoolT graceful)
 Restarts the node.
ClRcT clCpmNodeShutDown (CL_IN ClIocNodeAddressT iocNodeAddress)
 Shuts down the node.
ClRcT clCpmNodeStatusGet (ClIocNodeAddressT nodeAddr, ClStatusT *pStatus)
 Returns the status of any ASP node in a system.
ClRcT clCpmNodeSwitchover (CL_IN ClIocNodeAddressT iocNodeAddress)
 Switch over the node.
ClRcT clCpmNotificationCallbackInstall (ClIocPhysicalAddressT compAddr, ClCpmNotificationFuncT pFunc, ClPtrT pArg, ClHandleT *pHandle)
 This API installs the callback function when the node/component arrival/departure events are to be intemated asynchronously.
ClRcT clCpmNotificationCallbackUninstall (ClHandleT *pHandle)
 The API uninstalls the callback, which would have been installed through the clCpmNotificationCallbackInstall API.
ClRcT clCpmProtectionGroupTrack (CL_IN ClCpmHandleT cpmHandle, CL_IN ClNameT *pCsiName, CL_IN ClUint8T trackFlags, CL_INOUT ClAmsPGNotificationBufferT *pNotificationBuffer)
 Track the protection group for the given CSI.
ClRcT clCpmProtectionGroupTrackStop (CL_IN ClCpmHandleT cpmHandle, CL_IN ClNameT *pCsiName)
 Stop tracking the protection group for the given CSI.
ClRcT clCpmResponse (CL_IN ClCpmHandleT cpmHandle, CL_IN ClInvocationT invocation, CL_IN ClRcT rc)
 Respond to AMF with the result of components execution of a particular request by AMF.
ClRcT clCpmSelectionObjectGet (CL_IN ClCpmHandleT cpmHandle, CL_OUT ClSelectionObjectT *pSelectionObject)
 Returns an operating system handle for detecting pending callbacks.

Variables

ClCpmHandleT clCpmHandle
 This component's handle.

Detailed Description

Header file for the APIs and data types exposed by the CPM.


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