OpenClovis Logo

Files | Classes | Macros | Typedefs | Enumerations | Functions | Variables
API Reference Pages
Component Manager

Defines, Structures, Typedefs, Functions. More...

Files

file  clCpmApi.h
 Header file for the APIs and data types exposed by the CPM.
file  clCpmConfigApi.h
 Header file for definitions of configuration parameters used by the CPM.
file  clCpmErrors.h
 Header file of error Messages that are CPM specific.
file  clCpmExtApi.h
 Header file for APIs and data types exposed by CPM for providing extended functionality.

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...
struct  ClCpmNodeClassTypeT
 This is the definition of the class of the node. More...
struct  ClCpmSlotClassTypesT
 This structure is used by the clCpmCardMatch() API. More...
struct  ClCpmSlotInfoT
 The structure filled by the clCpmSlotInfoGet() API. 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_DEFAULT_MAX_FREQ   32000
 Maximum frequency at which Component Manager will check the heartbeats of the component.
#define CL_CPM_DEFAULT_MIN_FREQ   2000
 Default frequency at which Component Manager performs the heartbeats of the component.
#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_ERR_BAD_OPERATION   0x107
 Component Manager returns this error when it receives an invalid request.
#define CL_CPM_ERR_EO_UNREACHABLE   0x101
 EO is not reachable.
#define CL_CPM_ERR_EXIST   0x108
 Component Manager returns this error when the same registration request is performed multiple times.
#define CL_CPM_ERR_FORWARDING_FAILED   0x104
 Component Manager is not able to forward the request to the required node.
#define CL_CPM_ERR_INIT   0x106
 Component Manager returns this error if the initialization was not in a proper way and other functions are being accessed.
#define CL_CPM_ERR_INVALID_ARGUMENTS   0x102
 One of the passed argument is invalid.
#define CL_CPM_ERR_OPER_ABANDONED   0x109
 Bug 3610: Added this message.
#define CL_CPM_ERR_OPERATION_FAILED   0x103
 Requested operation could not be performed by Component Manager.
#define CL_CPM_ERR_OPERATION_IN_PROGRESS   0x105
 Component Manager cannot handle this request at this point, as it is currently doing similar operation.
#define CL_CPM_ERR_OPERATION_NOT_ALLOWED   0x100
 Requested operation is not allowed.
#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_RC(ERROR_CODE)   CL_RC(CL_CID_CPM, (ERROR_CODE))
 Error macro definitions for CPM.
#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  ClCpmCompProcessRelT {
  CL_CPM_COMP_NONE = 0,
  CL_CPM_COMP_MULTI_PROCESS = 1,
  CL_CPM_COMP_SINGLE_PROCESS = 2,
  CL_CPM_COMP_THREADED = 3
}
 This definition of enum indicates the relationship between the component and the process. More...
enum  ClCpmEventTypeT {
  CL_CPM_COMP_EVENT,
  CL_CPM_NODE_EVENT
}
 Types of the events published by the Component Manager. 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...
enum  ClCpmSlotInfoFieldIdT {
  CL_CPM_SLOT_ID,
  CL_CPM_IOC_ADDRESS,
  CL_CPM_NODE_MOID,
  CL_CPM_NODENAME
}
 The enum which indicates which field of ClCpmSlotInfoT is set and all other information related to it will be filled. 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 clCpmComponentPIDGet (CL_IN ClNameT *compName, CL_OUT ClUint32T *pid)
 Returns the process ID of the component.
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 clCpmEventPayLoadExtract (CL_IN ClEventHandleT eventHandle, CL_IN ClSizeT eventDataSize, CL_IN ClCpmEventTypeT cpmEventType, CL_OUT void *payLoad)
 Extracts the event payload data.
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.
ClRcT clCpmIocAddressForNodeGet (CL_IN ClNameT nodeName, CL_OUT ClIocAddressT *pIocAddress)
 Returns the IOC address for the given node.
ClBoolT clCpmIsCompRestarted (CL_IN ClNameT compName)
 Checks if the given component has been restarted.
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.
ClRcT clCpmSlotGet (CL_IN ClCpmSlotInfoFieldIdT flag, CL_OUT ClCpmSlotInfoT *slotInfo)
 Returns the Slot related information [ nodeName and IocAddress], provides the mapping between slot ID, IOC address,and name of the given node depending on the flag that is passed to it.
ClRcT clCpmSlotInfoGet (CL_IN ClCpmSlotInfoFieldIdT flag, CL_OUT ClCpmSlotInfoT *slotInfo)
 Returns the Slot related information [node moID, nodeName and IocAddress], provides the mapping between slot ID, IOC address, mo ID and name of the given node depending on the flag that is passed to it.

Variables

ClCpmHandleT clCpmHandle
 This component's handle.

Detailed Description

Defines, Structures, Typedefs, Functions.

Macro Definition Documentation

#define CL_CPM_DEFAULT_MAX_FREQ   32000

Maximum frequency at which Component Manager will check the heartbeats of the component.

This value is in miliseconds. This value can be overwritten in the Component Manager configuration file.

#define CL_CPM_DEFAULT_MIN_FREQ   2000

Default frequency at which Component Manager performs the heartbeats of the component.

This value is in milliseconds. This value can be overwritten in the Component Manager configuration file.

#define CL_CPM_ERR_OPER_ABANDONED   0x109

Bug 3610: Added this message.

Component Manager returns this error when processing of the request was abandoned due to higher priority request.

#define CL_CPM_EVENT_CHANNEL_NAME   "CPM_EVENT_CHANNEL"

Event Channel information related to Component failure.

Component Manager publishes event for the component failures using event filters. At present you may subscribe to it using the IOC address.

#define CL_CPM_RELEASE_CODE   'B'

SAF version supported by the CPM.

Release code.

Typedef Documentation

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.

Component Manager requests the component, identified by compName, to remove a particular CSI or all the CSIs [Asynchronous Call].

Parameters
invocationParticular invocation of this callback function.
pCompNamePointer to the name of the component to which a CSI needs to be assigned.
pCsiNamePointer to the csiName that must be removed from component identified by compName.
csiFlagsFlags, which specify whether one or more CSI are affected.
See Also
ClCpmCSISetCallbackT
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].

Parameters
invocationParticular invocation of this callback function.
pCompNamePointer to the name of the component to which a CSI needs to be assigned.
haStateHA-state to be assigned for CSI identified by csiDescriptor, or for all CSIs, already supported by component [if CSI_TARGET_ALL is set in csiFlags of csiDescriptor].
csiDescriptorInformation about the CSI.
See Also
ClCpmCSIRmvCallbackT
typedef ClHandleT ClCpmHandleT

The type of the handle supplied by the CPM to the process which calls the clCpmClientInitialize() API.

This indicates the association of the process with the CPM(AMF) client library.

typedef ClRcT(* ClCpmHealthCheckCallbackT)(CL_IN ClInvocationT invocation, CL_IN const ClNameT *pCompName, CL_IN ClAmsCompHealthcheckKeyT *pHealthCheckKey)

SAF compliant APIs and data types of CPM.

Component Manager requests the component, identified by compName, to execute healthcheck using healthcheckkey [Asynchronous Call].

Parameters
invocationParticular invocation of this callback function.
pCompNamePointer to the name of the component that must undergo healthcheck.
pHealthCheckKeyKey to fetch the healthcheck related attributes.
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.

Parameters
eventType of the event indicating whether it is node arrival/departure or component arrival/departure.
pArgArgument to the callback fuction.
pAddressAddress of the node/component where the event occurred.
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.

Type of information returned in this buffer depends on the trackFlag parameter of the clAMSProtectionGroupTrack function [Asynchronous Call]

Parameters
pCsiNamePointer to the csiName that must be removed from component identified by compName.
pNotificationBufferPointer to a notification buffer, which contains the requested information.
numberOfMembersNumber of components that belongs to protection group associated with the CSI, designated by csiName.
errorIndication whether Component Manager was able to perform the operation.
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].

Parameters
invocationParticular invocation of this callback function.
pProxiedCompNamePointer to the name of the component to which needs to be cleaned up.
See Also
ClCpmProxiedComponentInstantiateCallbackT
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].

Parameters
invocationParticular invocation of this callback function.
pProxiedCompNamePointer to the name of the component which needs to be instantiated.
See Also
ClCpmProxiedComponentCleanupCallbackT
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].

Parameters
invocationParticular invocation of this callback function.
pCompNamePointer to the name of the component that must gracefully terminate.

Enumeration Type Documentation

Flags that can be used by subscriber to distinguish diffrent component events.

Enumerator:
CL_CPM_COMP_ARRIVAL 

Indicates that component is ready to provide service.

CL_CPM_COMP_DEPARTURE 

Indicates that component was terminated gracefully.

CL_CPM_COMP_DEATH 

Indicates that component was terminated ungracefully, i.e.

failure event.

This definition of enum indicates the relationship between the component and the process.

Enumerator:
CL_CPM_COMP_NONE 

This indicates the component does not have any execution context.

CL_CPM_COMP_MULTI_PROCESS 

This indicates the component consists of multiple processes.

CL_CPM_COMP_SINGLE_PROCESS 

This indicates the component consists of a single process.

CL_CPM_COMP_THREADED 

This indicates that the component consists of multiple threads, but the process does not belong to the component.

Types of the events published by the Component Manager.

Enumerator:
CL_CPM_COMP_EVENT 

Component death event.

CL_CPM_NODE_EVENT 

Node arrival/departure event.

Flags that can be used by subscriber to distinguish diffrent events related to node.

Enumerator:
CL_CPM_NODE_ARRIVAL 

Indicates a node's arrival.

CL_CPM_NODE_DEPARTURE 

Indicates a node's graceful departure.

CL_CPM_NODE_DEATH 

Indicates a node's sudden/ungraceful departure.

The enum which indicates which field of ClCpmSlotInfoT is set and all other information related to it will be filled.

It is used by the API clCpmSlotInfoGet().

Enumerator:
CL_CPM_SLOT_ID 

Flag indicating that slot ID of the node is being passed.

CL_CPM_IOC_ADDRESS 

Flag indicating that IOC address of the node is being passed.

CL_CPM_NODE_MOID 
   Flag indicating that MO ID of the node is

\ being passed.

CL_CPM_NODENAME 

Flag indicating that name of the node is being passed.

Function Documentation

ClRcT clCpmClientFinalize ( CL_IN ClCpmHandleT  cpmHandle)

Cleans up the client Component Manager library.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
Return values
CL_OKThe API executed successfully.
Description:
This API is used to clean up the client Component Manager library. It releases all the resources acquired when clCpmClientInitialize() was called. The cpmHandle will become invalid after calling this API.
Note
This API is equivalent to saAmfFinalize, which makes an asynchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize()
ClRcT clCpmClientInitialize ( CL_OUT ClCpmHandleT pCpmHandle,
CL_IN const ClCpmCallbacksT pCallback,
CL_INOUT ClVersionT pVersion 
)

Initializes the client Component Manager library.

Header File:
clCpmApi.h
Parameters
pCpmHandleHandle of the component.
pCallbackCallbacks provided by the application to the Component Manager.
pVersionRequired version number.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
Before invoking this API, the EO must be created. This API is used to update the EO client table internally based on ClCpmCallbacksT. It also ensures that the Component Manager client and Server Libraries are compatible in version.
Note
This API is equivalent to saAmfInitialize, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientFinalize()
ClRcT clCpmCompCSIList ( const ClNameT pCompName,
ClCpmCompCSIRefT *  pCSIRef 
)

The API gets the comp CSI List from the component CSI cache maintained per-process.

Header File:
clCpmApi.h
Parameters
pCompNameName of the component to query to obtain the CSI list
pCSIRefList of CSI references cached for the component is returned through this variable
Return values
CL_OKThe API executed successfully.
CL_ERR_INVALID_PARAMETERThe API was invoked with invalid arguments
Description:
This API should be used to obtain the cached CSI list for a component The csi list is returned through the pCSIRef argument. The API returns the cached haState and the csiDescriptor for the component for each CSI.
Library Files:
ClAmfClient
ClRcT clCpmCompInfoGet ( const ClNameT compName,
const ClIocNodeAddressT  nodeAddress,
CL_OUT ClCpmCompSpecInfoT compInfo 
)

The API returns component specific information.

Header File:
clCpmApi.h
Return values
CL_OKThe API executed successfully.
CL_ERR_INVALID_PARAMETERThe API was invoked with invalid arguments.
CL_ERR_NO_MEMORYNot enough memory to complete the request.
Description:
This API should be used by the application to fetch any component specific information maintained by CPM.
Note
This API allocates a array of pointers as well as memory for each of the components argument for
  • args. It is the responsibility of the user to free the memory allocated by this API.
Library Files:
ClAmfClient
ClRcT clCpmComponentAddressGet ( CL_IN ClIocNodeAddressT  nodeAddress,
CL_IN ClNameT pCompName,
CL_OUT ClIocAddressT pCompAddress 
)

Returns the IOC address of a component.

Header File:
clCpmApi.h
Parameters
nodeAddressNode IOC Address.
pCompNameName of the component.
pCompAddressIOC address of the component including port information.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to return the IOC address of a component identified by pCompName. This represents the physical address of the node where the CPM is running.
Note
This is a synchronous API.
Library Files:
ClAmfClient
See Also
clCpmComponentStatusGet()
ClRcT clCpmComponentFailureClear ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN ClNameT pCompName 
)

Notifies about the restoration of the failed component.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNamePointer to the component name for which the failure is notified.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to notify the Component Manager that the failed component is restored. It cancels the failure notification made by clCpmComponentFailureReport().
Note
This API is equivalent to saAmfComponentFailureClear, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentFailureReport()
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNamePointer to the component name for which the failure is notified.
errorDetectionTimeTime when the error is detected.
recommendedRecoveryRecommonded recovery to be performed using AMF.
alarmHandleThis is the key returned by the clAlarmRaise function.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to notify the Component Manager about the failure of a component. It reports an error and provides a recovery recommendation to the AMF. The AMF will react on the error report and carry out a recovery operation to retain the availability of component service instances supported by the erroneous component. The AMF will not carry out weaker recovery action than that recommended by the above API, but it may decide to escalate to higher recovery level.
Note
This API is equivalent to saAmfComponentFailureReport, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentFailureClear()
ClRcT clCpmComponentIdGet ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN ClNameT pCompName,
CL_OUT ClUint32T *  pCompId 
)

Other utility APIs exposed by CPM.

Returns the component ID of a component.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
pCompId(out) Unique Id of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to return the component ID for a component identified by pCompName. This unique component ID is node internal and is not known to outside entities. Each time a component is instantiated, a new component ID is assigned to it.
Note
This is a synchronous API.
Library Files:
ClAmfClient
ClRcT clCpmComponentNameGet ( CL_IN ClCpmHandleT  cpmHandle,
CL_OUT ClNameT pCompName 
)

Returns the component name.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API returns the name of the component the calling process belongs to. This API can be invoked by the process before its component has been registered with the CPM. The component name provided by this API should be used by a process when it registers its local component.
Note
This API is equivalent to saAmfComponentNameGet.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentRegister()
ClRcT clCpmComponentPIDGet ( CL_IN ClNameT compName,
CL_OUT ClUint32T *  pid 
)

Returns the process ID of the component.

Header File:
clCpmApi.h
Parameters
compNameName of the component.
[out]pidProcess ID of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
CL_ERR_NOT_EXISTOn passing invalid component name.
Description:
This API returns the process id pid of the component compName.
Library Files:
ClAmfClient
ClRcT clCpmComponentRegister ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN const ClNameT pCompName,
CL_IN const ClNameT pProxyCompName 
)

Registers a component with CPM.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
pProxyCompNameName of the component, proxy for pCompName.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing Null Pointer
CL_CPM_ERR_INITIf callbacks are provided during the initialization is improper.
CL_CPM_ERR_EXISTIf the component has already been registered.
Description:
This API is used to register a component with CPM. It can also be used by a proxy component to register a proxied component. By calling this API, the component is indicating that it is up and running and is ready to provide service.
Note
This API is equivalent to saAmfComponentRegister, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmComponentUnregister()
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.

Header File:
clCpmApi.h
Parameters
pCompNameName of the component.
pNodeNameIOC address of the component.
pPresenceStatePresence state of the component.
pOperationalStateOperational state of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to return the presence and operational state of a component identified by pCompName. The presence state of the component reflects the component life cycle and the operational state of the component is used by the AMF to determine whether a component is capable of taking component service instance assignments.
Note
This is a synchronous API.
Library Files:
ClAmfClient
See Also
clCpmComponentAddressGet()
ClRcT clCpmComponentUnregister ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN const ClNameT pCompName,
CL_IN const ClNameT pProxyCompName 
)

Un-registers a component.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
pProxyCompNameName of the component proxied by pCompName component.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
CL_CPM_ERR_BAD_OPERATIONIf the component identified by pCompName has not unregistered all the proxied components OR proxyComp is not the proxy for pCompName.
Description:
This API is used for two purposes: Either a proxy component can unregister one of its proxied components or a component can unregister itself. The cpmHandle in this API must be same as that used in the corresponding clCpmComponentRegister() call.
Note
This API is equivalent to saAmfComponentUnregister, which makes an asynchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentRegister()
ClRcT clCpmCompStatusGet ( ClIocAddressT  compAddr,
ClStatusT pStatus 
)

Returns the status of any component in a system.

Header File:
clCpmApi.h
Parameters
compAddrThe physical address of a component, whose status is to be know.
pStatusThe pointer to a variable to hold the status of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_INVALID_PARAMETERIf an invalid address is passed. nodeName.
Description:
This API should be used to get the status of a component present on any ASP-node in a system. The *pStatus will contain CL_STATUS_UP or CL_STATUS_DOWN if the component is up or down respectively.
Library Files:
ClAmfClient
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
invocationAssociates an invocation of this response function with a particular invocation of a callback function by the CPM.
retCodeIndicates the status of the quiescing operation.
Return values
CL_OKThe API executed successfully.
Description:
This API is used to respond the success and failure of the callback invoked by CPM for the quiescing the HA state of a given CSI. Using this call a component can notify the CPM that it has successfully stopped its activity related to a particular component service instance or to all component service instances assigned to it, following a previous request by the AMS to enter the CL_AMS_HA_STATE_QUIESCING HA state for that particular component service instance or to all component service instances.
Note
This API is equivalent to saAmfCSIQuiescingComplete.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentRegister(), clCpmResponse()
ClRcT clCpmDispatch ( CL_IN ClCpmHandleT  cpmHandle,
CL_OUT ClDispatchFlagsT  dispatchFlags 
)

Invoke pending callbacks.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
dispatchFlagsFlags that specify the callback execution behaviour of this function
Return values
CL_OKThe API executed successfully.
Description:
This API invokes, in the context of the calling EO, pending callbacks for handle cpmHandle in a way that is specified by the dispatchFlags parameter.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmSelectionObjectGet()
ClRcT clCpmEventPayLoadExtract ( CL_IN ClEventHandleT  eventHandle,
CL_IN ClSizeT  eventDataSize,
CL_IN ClCpmEventTypeT  cpmEventType,
CL_OUT void *  payLoad 
)

Extracts the event payload data.

Header File:
clCpmApi.h
Parameters
eventHandleEvent handle.
eventDataSizeSize of the event data.
cpmEventTypeType of the event published.
payLoad(out) The actual payload.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API extracts the payload data from the flat buffer returned by the event delivery callback for the events published by the CPM. The eventHandle and eventDataSize are the parameters obtained from event delivery callback. This API must be called only in the event subscriber's context of event delivery callback, which is invoked when the event is published by the CPM.
Library Files:
ClAmfClient
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
compNameA pointer to the name of the component for which the information is requested
csiNameA pointer to the name of the component service instance for which the information is requested
haStatePointer to the HA state that the AMS is assigning to the component, identified by compName, on behalf of the component service instance, identified by csiName.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTERon passing the unallocated node Name
CL_ERR_DOESNT_EXISTCPM library is not able to retrieve the nodeName.
Description:
This API returns the HA state of a component, identified by compName, on behalf of the component service instance, identified by csiName. The HA state of the component indicates whether it is currently responsible to provide service characterized by the component service instance assigned to it, whether it is a standby or whether it is in the quiesced state.
Library Files:
libClAmfClient
See Also
clCpmClientInitialize()
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
pCompHealthCheckKey used to fetch healthcheck parameters for this component. Not used.
healthCheckResultResult of the component invoked healthcheck.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
CL_ERR_INVALID_HANDLEThe passed CPM handle is invalid.
Description:
This API is used by the component to inform AMF that, it has performed a healthcheck on component pCompName and whether the healthcheck was successful or not using healthCheckResult, which is the exit status of the healthcheck performed on the component.
Note
This API is equivalent to saAmfHealthCheckConfirm.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmHealthcheckStart(), clCpmHealthcheckStop()
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCompNameName of the component.
pCompHealthCheckKey used to fetch healthcheck parameters for this component. Not used.
invocationTypeIndicates whether the AMF should initiate the healthcheck or the component itself performs the healthcheck.
recommondedRecoveryRecommended recovery to be performed by the AMF if the component fails a healthcheck.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
CL_ERR_INVALID_PARAMETEROne of the parameters are invalid.
CL_ERR_INVALID_HANDLEThe passed CPM handle is invalid.
Description:
This API starts health check of the component pCompName. The invocationType specifies whether this is an AMF invoked healthcheck or a component invoked healthcheck. If the invocationType is CL_AMS_COMP_HEALTHCHECK_AMF_INVOKED, the appHealthCheck() callback function must be supplied when calling clCpmClientInitialize().
Note
This API is equivalent to saAmfHealthCheckStart.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmHealthcheckConfirm(), clCpmHealthcheckStop()
ClRcT clCpmHealthcheckStop ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN const ClNameT pCompName,
CL_IN const ClAmsCompHealthcheckKeyT *  pCompHealthCheck 
)

Stops the component healthcheck.

Header File:
clCpmApi.h
Parameters
cpmHandlehandle returned by clCpmClientInitialize API.
pCompNameName of the component for which health-check needs to be stopped.
pCompHealthCheckKey used to fetch healthcheck parameters for this component. Not used.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
CL_ERR_INVALID_HANDLEThe passed CPM handle is invalid.
Description:
This API is used to stop the healthcheck of the component compName.
Note
This API is equivalent to saAmfComponentHealthCheckStop.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentHealthCheckStart()
ClRcT clCpmIocAddressForNodeGet ( CL_IN ClNameT  nodeName,
CL_OUT ClIocAddressT pIocAddress 
)

Returns the IOC address for the given node.

Header File:
clCpmApi.h
Parameters
nodeNameThe name of the node whose IocAddress is required
pIocAddressIOC address of the given node nodeName.
Return values
CL_OKThe API executed successfully.
CL_ERR_DOESNT_EXISTCPM library is not able to retrieve the nodeName.
Description:
This API returns the physical IOC address of the node which is passed as an argument.
Library Files:
libClAmfClient
ClBoolT clCpmIsCompRestarted ( CL_IN ClNameT  compName)

Checks if the given component has been restarted.

Header File:
clCpmExtApi.h
Parameters
compNameThe name of the component.
Return values
CL_OKThe API executed successfully.
CL_ERR_DOESNT_EXISTCPM library is not able to retrieve the component name.
Description:
This API returns true if the component has been restarted before.
Library Files:
libClAmfClient
ClUint32T clCpmIsMaster ( void  )

Informs if the node is master of the cluster.

Header File:
clCpmApi.h
Parameters:
None
Return values
CL_TRUEThe node is the master.
CL_FALSEThe node is not the master.
Description:
This API indicates if the node is master of the cluster. This API can be used by the component to determine whether it is running on the CPM master (CPM/G (global) or CPM/L (local)).
Library Files:
ClAmfClient
See Also
clCpmMasterAddressGet()
ClBoolT clCpmIsSC ( void  )

The API returns whether this node is system controller or not.

Header File:
clCpmApi.h
Return values
CL_YESIf the current node is system controller.
CL_NOIf the current node is not system controller (i.e. it is a payload node) or the application calling this API is running out side of AMF for e.g. using safplus_run script.
Description:
This API should be used by the application to check if the node on which it is running is system controller.
Library Files:
ClAmfClient
ClRcT clCpmLocalNodeNameGet ( CL_IN ClNameT nodeName)

Returns the name of the local node.

Header File:
clCpmApi.h
Parameters
nodeNameLocal node name.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing the unallocated node Name.
CL_ERR_DOESNT_EXISTCPM library is not able to retrieve the nodeName.
Description:
This API provides the local node Name, in the buffer provided by the user. This API can be used by a component to determine the name of the node on which it is running.
Library Files:
ClAmfClient
ClRcT clCpmMasterAddressGet ( CL_OUT ClIocNodeAddressT pIocAddress)

Returns the IOC address of the master.

Header File:
clCpmApi.h
Parameters
pIocAddress(out) IOC address of the master.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to retrieve the IOC address of the master. The address returned by this API represents the physical address of the node where the CPM/G is running.
Library Files:
ClAmfClient
See Also
clCpmIsMaster()
ClRcT clCpmNodeRestart ( CL_IN ClIocNodeAddressT  iocNodeAddress,
CL_IN ClBoolT  graceful 
)

Restarts the node.

Header File:
clCpmApi.h
Parameters
iocNodeAddressIOC address of the node.
gracefulSpecifies whether to restart the node gracefully
Return values
CL_OKThe API executed successfully.
Description:
This API is used to restart the node, which corresponds to the given IOC Address. If graceful is non zero, then all the application components are terminated gracefully running on the node. If graceful is zero, applications are abruptly terminated, either by killing the applications on the node or rebooting the node. The node may or may not be restarted depending on the environment variables ASP_NODE_RESTART, ASP_NODE_REBOOT_DISABLE and ASP_RESTART_ASP.

This APIs behavior depends on the environment variables ASP_NODE_RESTART, ASP_NODE_REBOOT_DISABLE and ASP_RESTART_ASP, documented in the command line and environment variable reference section of the SDK guide.

Note
This is an asynchronous API.
Library Files:
ClAmfClient
ClRcT clCpmNodeShutDown ( CL_IN ClIocNodeAddressT  iocNodeAddress)

Shuts down the node.

Header File:
clCpmApi.h
Parameters
iocNodeAddressIOC address of the node.
Return values
CL_OKThe API executed successfully.
Description:
This API is used to shut down the node, which corresponds to the given IOC Address. Shutting down the node terminates all the services running on that node.
Note
This is an asynchronous API.
Library Files:
ClAmfClient
ClRcT clCpmNodeStatusGet ( ClIocNodeAddressT  nodeAddr,
ClStatusT pStatus 
)

Returns the status of any ASP node in a system.

Header File:
clCpmApi.h
Parameters
compAddrThe ASP node address, whose status is to be know.
pStatusThe pointer to a variable to hold the status of the component.
Return values
CL_OKThe API executed successfully.
Description:
This API should be used to get the status of an ASP node in a system. The *pStatus will contain CL_STATUS_UP if that particular ASP node is up and CL_STATUS_DOWN if the node is down.
Library Files:
ClAmfClient
ClRcT clCpmNodeSwitchover ( CL_IN ClIocNodeAddressT  iocNodeAddress)

Switch over the node.

Header File:
clCpmApi.h
Parameters
iocNodeAddressIOC address of the node.
Return values
CL_OKThe API executed successfully.
Description:

This API is used to switch over the node, which corresponds to the given IOC Address. All the application components running on the node are switched over and terminated gracefully and the node is shutdown. The node may or may not be restarted depending on the environment variables ASP_NODE_RESTART, ASP_NODE_REBOOT_DISABLE and ASP_RESTART_ASP.

This APIs behavior depends on the environment variables ASP_NODE_RESTART, ASP_NODE_REBOOT_DISABLE and ASP_RESTART_ASP, documented in the command line and environment variable reference section of the SDK guide.

Note
This is an asynchronous API.
Library Files:
ClAmfClient
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.

Header File:
clCpmApi.h
Parameters
compAddrThe ASP component address, whose arrival/departure is of importance. If the callback is for a node's arrival/departure then the compAddr.portId should be 0.
pFuncThe callback function pointer, which will get called on arrival/departure event.
pArgThe argument which will be passed back in the callback.
pHandleThe pointer to a varible in which a handle will be returned, which should used to unistall a function installed.
Return values
CL_OKThe API executed successfully.
CL_ERR_NO_MEMORYIf there is no memory to register the callback.
Description:
This API should be used, when a node's or a component's arrival/departure event is of importance and some action needs to be taken depending on the event occured. This API will register the callback function and the callback will be invoked when node/component arrival/departure event occurs.
Library Files:
ClAmfClient
ClRcT clCpmNotificationCallbackUninstall ( ClHandleT *  pHandle)

The API uninstalls the callback, which would have been installed through the clCpmNotificationCallbackInstall API.

Header File:
clCpmApi.h
Parameters
pHandleThe handle for unistalling the callback, returned by clCpmNotificationCallbackInstall API.
Return values
CL_OKThe API executed successfully.
Description:
This API should be used, when the callback installed through clCpmNotificationCallbackInstall API, is to be uninstalled. The handle passed to this API should be the correct one as this API doent do any kind of verification on the handle.
Library Files:
ClAmfClient
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCsiNamePointer to the CSI for which protection group needs to be tracked.
trackFlagsThe kind of tracking that is requested, which is the bitwise OR of one or more of the flags CL_AMS_PG_TRACK_CURRENT, CL_AMS_PG_TRACK_CHANGES or CL_AMS_PG_TRACK_CHANGES_ONLY.
pNotificationBufferpointer to a buffer of type ClAmsPGNotificationT. This parameter is ignored if CL_AMS_PG_TRACK_CURRENT is not set in trackFlags; otherwise, if notificationBuffer is not NULL, the buffer will contain information about all components in the protection group when clCpmProtectionGroupTrack() returns.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
This API is used to request the framework to start tracking changes in the protection group associated with the component service instance, identified by csiName, or changes of attributes of any component in the protection group. These changes are notified via the invocation of the ClCpmProtectionGroupTrackCallbackT() callback function, which must have been supplied when the process invoked the clCpmClientInitialize call.
Note
This API is equivalent to saAmfProtectionGroupTrack, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmProtectionGroupTrackStop()
ClRcT clCpmProtectionGroupTrackStop ( CL_IN ClCpmHandleT  cpmHandle,
CL_IN ClNameT pCsiName 
)

Stop tracking the protection group for the given CSI.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pCsiNamePointer to the CSI for which protection group needs to be tracked.
Return values
CL_OKThe API executed successfully.
CL_ERR_NULL_POINTEROn passing a NULL pointer.
Description:
The invoking process requests the Availability Management Framework to stop tracking protection group changes for the component service instance designated by pCsiName.
Note
This API is equivalent to saAmfProtectionGroupTrackStop, which makes a synchronous call.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmProtectionGroupTrack()
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.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
invocationassociates an invocation of this response function with a particular invocation of a callback function by the cpm.
rcStatus of executing a particular callback of AMF.
Return values
CL_OKThe API executed successfully.
Description:
This API is used to respond the success and failure of the callback invoked by CPM. Through this API the component responds to the CPM with the result of its execution of a particular request of the CPM designated by the invocation.
Note
This API is equivalent to saAmfResponse.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmComponentRegister()
ClRcT clCpmSelectionObjectGet ( CL_IN ClCpmHandleT  cpmHandle,
CL_OUT ClSelectionObjectT *  pSelectionObject 
)

Returns an operating system handle for detecting pending callbacks.

Header File:
clCpmApi.h
Parameters
cpmHandleHandle returned by clCpmClientInitialize API.
pSelectionObjectA pointer to the operating system handle that the process can use to detect pending callbacks
Return values
CL_OKThe API executed successfully.
Description:
This API returns the operating system handle pSelectionObject, associated with the handle cpmHandle. The process can use this operating system handle to detect pending callbacks, instead of repeatedly invoking clCpmDispatch() for this purpose.
The operating system handle returned by this API is a file descriptor that is used with poll() or select() systems call detect incoming callbacks.
The pSelectionObject returned by this API is valid until clCpmClientFinalize() is invoked on the same handle cpmHandle.
Library Files:
ClAmfClient
See Also
clCpmClientInitialize(), clCpmDispatch()
ClRcT clCpmSlotGet ( CL_IN ClCpmSlotInfoFieldIdT  flag,
CL_OUT ClCpmSlotInfoT slotInfo 
)

Returns the Slot related information [ nodeName and IocAddress], provides the mapping between slot ID, IOC address,and name of the given node depending on the flag that is passed to it.

Header File:
clCpmExtApi.h
Parameters
flagThe flag which indicates that which field of the structure slotInfo is filled in by the user.
slotInfoThe structure which will get filled by this API and will contain other information about node corresponding to the field which was filled by the user.
Return values
CL_OKThe API executed successfully.
CL_ERR_INVALID_PARAMETEROn passing the invalid flag or passing invalid value in any of the fields.
Description:
This API provides mapping between the attributes which are unique to node namely, slot ID, IOC address and node name. Depending on the flag which is given by the user, this API assumes that the corresponding field has been given a proper value by the user and fills the remaining fields of the structure corresponding to the information in this field. For example suppose the user wants to know the nodename given the slot ID, then he should pass the flag CL_CPM_SLOT_NODENAME (which are exposed in clCpmApi.h) and set the slotId field of slotInfo structure to some valid slot number.
Library Files:
libClAmfClient
ClRcT clCpmSlotInfoGet ( CL_IN ClCpmSlotInfoFieldIdT  flag,
CL_OUT ClCpmSlotInfoT slotInfo 
)

Returns the Slot related information [node moID, nodeName and IocAddress], provides the mapping between slot ID, IOC address, mo ID and name of the given node depending on the flag that is passed to it.

Header File:
clCpmApi.h
Parameters
flagThe flag which indicates that which field of the structure slotInfo is filled in by the user.
slotInfoThe structure which will get filled by this API and will contain other information about node corresponding to the field which was filled by the user.
Return values
CL_OKThe API executed successfully.
CL_ERR_DOESNT_EXISTOn passing the invalid flag or passing invalid value in any of the fields.
Description:
This API provides mapping between the attributes which are unique to node namely, slot ID, IOC address, MOID and node name. Depending on the flag which is given by the user, this API assumes that the corresponding field has been given a proper value by the user and fills the remaining fields of the structure corresponding to the information in this field. For example suppose the user wants to know the MOID given the slot ID, then he should pass the flag CL_CPM_SLOT_ID (which are exposed in clCpmApi.h) and set the slotId field of slotInfo structure to some valid slot number.
Library Files:
libClAmfClient

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