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. |
Defines, Structures, Typedefs, Functions.
#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 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].
invocation | Particular invocation of this callback function. |
pCompName | Pointer to the name of the component to which a CSI needs to be assigned. |
pCsiName | Pointer to the csiName that must be removed from component identified by compName. |
csiFlags | Flags, which specify whether one or more CSI are affected. |
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].
invocation | Particular invocation of this callback function. |
pCompName | Pointer to the name of the component to which a CSI needs to be assigned. |
haState | HA-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]. |
csiDescriptor | Information about the CSI. |
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].
invocation | Particular invocation of this callback function. |
pCompName | Pointer to the name of the component that must undergo healthcheck. |
pHealthCheckKey | Key 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.
event | Type of the event indicating whether it is node arrival/departure or component arrival/departure. |
pArg | Argument to the callback fuction. |
pAddress | Address 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]
pCsiName | Pointer to the csiName that must be removed from component identified by compName. |
pNotificationBuffer | Pointer to a notification buffer, which contains the requested information. |
numberOfMembers | Number of components that belongs to protection group associated with the CSI, designated by csiName. |
error | Indication 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].
invocation | Particular invocation of this callback function. |
pProxiedCompName | Pointer to the name of the component to which needs to be cleaned up. |
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].
invocation | Particular invocation of this callback function. |
pProxiedCompName | Pointer to the name of the component which needs to be instantiated. |
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].
invocation | Particular invocation of this callback function. |
pCompName | Pointer to the name of the component that must gracefully terminate. |
enum ClCpmCompEventT |
Flags that can be used by subscriber to distinguish diffrent component events.
enum ClCpmCompProcessRelT |
This definition of enum indicates the relationship between the component and the process.
enum ClCpmEventTypeT |
enum ClCpmNodeEventT |
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().
ClRcT clCpmClientFinalize | ( | CL_IN ClCpmHandleT | cpmHandle | ) |
Cleans up the client Component Manager library.
cpmHandle | Handle returned by clCpmClientInitialize API. |
CL_OK | The API executed successfully. |
ClRcT clCpmClientInitialize | ( | CL_OUT ClCpmHandleT * | pCpmHandle, |
CL_IN const ClCpmCallbacksT * | pCallback, | ||
CL_INOUT ClVersionT * | pVersion | ||
) |
Initializes the client Component Manager library.
pCpmHandle | Handle of the component. |
pCallback | Callbacks provided by the application to the Component Manager. |
pVersion | Required version number. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
The API gets the comp CSI List from the component CSI cache maintained per-process.
pCompName | Name of the component to query to obtain the CSI list |
pCSIRef | List of CSI references cached for the component is returned through this variable |
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | The API was invoked with invalid arguments |
ClRcT clCpmCompInfoGet | ( | const ClNameT * | compName, |
const ClIocNodeAddressT | nodeAddress, | ||
CL_OUT ClCpmCompSpecInfoT * | compInfo | ||
) |
The API returns component specific information.
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | The API was invoked with invalid arguments. |
CL_ERR_NO_MEMORY | Not enough memory to complete the request. |
ClRcT clCpmComponentAddressGet | ( | CL_IN ClIocNodeAddressT | nodeAddress, |
CL_IN ClNameT * | pCompName, | ||
CL_OUT ClIocAddressT * | pCompAddress | ||
) |
Returns the IOC address of a component.
nodeAddress | Node IOC Address. |
pCompName | Name of the component. |
pCompAddress | IOC address of the component including port information. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clCpmComponentFailureClear | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_IN ClNameT * | pCompName | ||
) |
Notifies about the restoration of the failed component.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Pointer to the component name for which the failure is notified. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Pointer to the component name for which the failure is notified. |
errorDetectionTime | Time when the error is detected. |
recommendedRecovery | Recommonded recovery to be performed using AMF. |
alarmHandle | This is the key returned by the clAlarmRaise function. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
pCompId | (out) Unique Id of the component. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clCpmComponentNameGet | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_OUT ClNameT * | pCompName | ||
) |
Returns the component name.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
Returns the process ID of the component.
compName | Name of the component. | |
[out] | pid | Process ID of the component. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NOT_EXIST | On passing invalid component name. |
ClRcT clCpmComponentRegister | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_IN const ClNameT * | pCompName, | ||
CL_IN const ClNameT * | pProxyCompName | ||
) |
Registers a component with CPM.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
pProxyCompName | Name of the component, proxy for pCompName. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing Null Pointer |
CL_CPM_ERR_INIT | If callbacks are provided during the initialization is improper. |
CL_CPM_ERR_EXIST | If the component has already been registered. |
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.
pCompName | Name of the component. |
pNodeName | IOC address of the component. |
pPresenceState | Presence state of the component. |
pOperationalState | Operational state of the component. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clCpmComponentUnregister | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_IN const ClNameT * | pCompName, | ||
CL_IN const ClNameT * | pProxyCompName | ||
) |
Un-registers a component.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
pProxyCompName | Name of the component proxied by pCompName component. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_CPM_ERR_BAD_OPERATION | If the component identified by pCompName has not unregistered all the proxied components OR proxyComp is not the proxy for pCompName. |
ClRcT clCpmCompStatusGet | ( | ClIocAddressT | compAddr, |
ClStatusT * | pStatus | ||
) |
Returns the status of any component in a system.
compAddr | The physical address of a component, whose status is to be know. |
pStatus | The pointer to a variable to hold the status of the component. |
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | If an invalid address is passed. nodeName. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
invocation | Associates an invocation of this response function with a particular invocation of a callback function by the CPM. |
retCode | Indicates the status of the quiescing operation. |
CL_OK | The API executed successfully. |
CL_AMS_HA_STATE_QUIESCING
HA state for that particular component service instance or to all component service instances.ClRcT clCpmDispatch | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_OUT ClDispatchFlagsT | dispatchFlags | ||
) |
Invoke pending callbacks.
cpmHandle | Handle returned by clCpmClientInitialize API. |
dispatchFlags | Flags that specify the callback execution behaviour of this function |
CL_OK | The API executed successfully. |
ClRcT clCpmEventPayLoadExtract | ( | CL_IN ClEventHandleT | eventHandle, |
CL_IN ClSizeT | eventDataSize, | ||
CL_IN ClCpmEventTypeT | cpmEventType, | ||
CL_OUT void * | payLoad | ||
) |
Extracts the event payload data.
eventHandle | Event handle. |
eventDataSize | Size of the event data. |
cpmEventType | Type of the event published. |
payLoad | (out) The actual payload. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
compName | A pointer to the name of the component for which the information is requested |
csiName | A pointer to the name of the component service instance for which the information is requested |
haState | Pointer 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. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | on passing the unallocated node Name |
CL_ERR_DOESNT_EXIST | CPM library is not able to retrieve the nodeName. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
pCompHealthCheck | Key used to fetch healthcheck parameters for this component. Not used. |
healthCheckResult | Result of the component invoked healthcheck. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | The passed CPM handle is invalid. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCompName | Name of the component. |
pCompHealthCheck | Key used to fetch healthcheck parameters for this component. Not used. |
invocationType | Indicates whether the AMF should initiate the healthcheck or the component itself performs the healthcheck. |
recommondedRecovery | Recommended recovery to be performed by the AMF if the component fails a healthcheck. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_PARAMETER | One of the parameters are invalid. |
CL_ERR_INVALID_HANDLE | The passed CPM handle is invalid. |
ClRcT clCpmHealthcheckStop | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_IN const ClNameT * | pCompName, | ||
CL_IN const ClAmsCompHealthcheckKeyT * | pCompHealthCheck | ||
) |
Stops the component healthcheck.
cpmHandle | handle returned by clCpmClientInitialize API. |
pCompName | Name of the component for which health-check needs to be stopped. |
pCompHealthCheck | Key used to fetch healthcheck parameters for this component. Not used. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | The passed CPM handle is invalid. |
ClRcT clCpmIocAddressForNodeGet | ( | CL_IN ClNameT | nodeName, |
CL_OUT ClIocAddressT * | pIocAddress | ||
) |
Returns the IOC address for the given node.
nodeName | The name of the node whose IocAddress is required |
pIocAddress | IOC address of the given node nodeName. |
CL_OK | The API executed successfully. |
CL_ERR_DOESNT_EXIST | CPM library is not able to retrieve the nodeName. |
Checks if the given component has been restarted.
compName | The name of the component. |
CL_OK | The API executed successfully. |
CL_ERR_DOESNT_EXIST | CPM library is not able to retrieve the component name. |
ClUint32T clCpmIsMaster | ( | void | ) |
Informs if the node is master of the cluster.
CL_TRUE | The node is the master. |
CL_FALSE | The node is not the master. |
ClBoolT clCpmIsSC | ( | void | ) |
The API returns whether this node is system controller or not.
CL_YES | If the current node is system controller. |
CL_NO | If 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. |
Returns the name of the local node.
nodeName | Local node name. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing the unallocated node Name. |
CL_ERR_DOESNT_EXIST | CPM library is not able to retrieve the nodeName. |
ClRcT clCpmMasterAddressGet | ( | CL_OUT ClIocNodeAddressT * | pIocAddress | ) |
Returns the IOC address of the master.
pIocAddress | (out) IOC address of the master. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clCpmNodeRestart | ( | CL_IN ClIocNodeAddressT | iocNodeAddress, |
CL_IN ClBoolT | graceful | ||
) |
Restarts the node.
iocNodeAddress | IOC address of the node. |
graceful | Specifies whether to restart the node gracefully |
CL_OK | The API executed successfully. |
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.
ClRcT clCpmNodeShutDown | ( | CL_IN ClIocNodeAddressT | iocNodeAddress | ) |
Shuts down the node.
iocNodeAddress | IOC address of the node. |
CL_OK | The API executed successfully. |
ClRcT clCpmNodeStatusGet | ( | ClIocNodeAddressT | nodeAddr, |
ClStatusT * | pStatus | ||
) |
Returns the status of any ASP node in a system.
compAddr | The ASP node address, whose status is to be know. |
pStatus | The pointer to a variable to hold the status of the component. |
CL_OK | The API executed successfully. |
ClRcT clCpmNodeSwitchover | ( | CL_IN ClIocNodeAddressT | iocNodeAddress | ) |
Switch over the node.
iocNodeAddress | IOC address of the node. |
CL_OK | The API executed successfully. |
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.
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.
compAddr | The 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. |
pFunc | The callback function pointer, which will get called on arrival/departure event. |
pArg | The argument which will be passed back in the callback. |
pHandle | The pointer to a varible in which a handle will be returned, which should used to unistall a function installed. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | If there is no memory to register the callback. |
ClRcT clCpmNotificationCallbackUninstall | ( | ClHandleT * | pHandle | ) |
The API uninstalls the callback, which would have been installed through the clCpmNotificationCallbackInstall API.
pHandle | The handle for unistalling the callback, returned by clCpmNotificationCallbackInstall API. |
CL_OK | The API executed successfully. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCsiName | Pointer to the CSI for which protection group needs to be tracked. |
trackFlags | The 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 . |
pNotificationBuffer | pointer 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. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clCpmProtectionGroupTrackStop | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_IN ClNameT * | pCsiName | ||
) |
Stop tracking the protection group for the given CSI.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pCsiName | Pointer to the CSI for which protection group needs to be tracked. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
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.
cpmHandle | Handle returned by clCpmClientInitialize API. |
invocation | associates an invocation of this response function with a particular invocation of a callback function by the cpm. |
rc | Status of executing a particular callback of AMF. |
CL_OK | The API executed successfully. |
ClRcT clCpmSelectionObjectGet | ( | CL_IN ClCpmHandleT | cpmHandle, |
CL_OUT ClSelectionObjectT * | pSelectionObject | ||
) |
Returns an operating system handle for detecting pending callbacks.
cpmHandle | Handle returned by clCpmClientInitialize API. |
pSelectionObject | A pointer to the operating system handle that the process can use to detect pending callbacks |
CL_OK | The API executed successfully. |
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.
flag | The flag which indicates that which field of the structure slotInfo is filled in by the user. |
slotInfo | The 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. |
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | On passing the invalid flag or passing invalid value in any of the fields. |
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.
flag | The flag which indicates that which field of the structure slotInfo is filled in by the user. |
slotInfo | The 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. |
CL_OK | The API executed successfully. |
CL_ERR_DOESNT_EXIST | On passing the invalid flag or passing invalid value in any of the fields. |