Defines, Structures, Typedefs, Functions. More...
Files | |
file | clEoApi.h |
Header file of EO related APIs. | |
file | clEoConfigApi.h |
Header file of EO Config Definitions. | |
file | clEoErrors.h |
Header file of EO related Error Messages. |
Classes | |
struct | ClEoClientObjT |
This structure contains the pointer to the callback functions to be registered with the EO and the client specific data. More... | |
struct | ClEoConfigT |
This structure is passed during the clEoCreate API and contains the EO related configuration parameters. More... | |
struct | ClEoExecutionObj |
The Execution Object abstracts the properties of a running OS thread or process. More... | |
struct | ClEoProtoDefT |
This structure contains a list of the protocols registered with the EO. More... | |
struct | ClEoSchedFeedBackT |
Feedback sent by the software component being polled in response of heartbeat [is-Alive]. More... | |
struct | ClEoServiceObj |
This structure is EO Service Object. More... |
Macros | |
#define | CL_EO_CLIENT_BIT_SHIFT 6 |
Logs base2 of CL_EO_MAX_NO_FUNC . | |
#define | CL_EO_DEFAULT_NAME "3RD_PARTY_COMP" |
Default name of the Execution Object in case EO doesn't provide any name. | |
#define | CL_EO_DEFAULT_THREADS 1 |
Default number of threads required for an EO. | |
#define | CL_EO_ERR_ENQUEUE_MSG 0x109 |
Enqueue this message, even though it was originally targeted as non-blocking. | |
#define | CL_EO_ERR_EO_SUSPENDED 0x101 |
EO related error codes. | |
#define | CL_EO_ERR_FUNC_NOT_REGISTERED 0x102 |
Called EO RMD function is not currently registered. | |
#define | CL_EO_ERR_IMPROPER_STATE 0x107 |
EO state can not be set to the provided value. | |
#define | CL_EO_ERR_INVALID_CLIENTID 0x103 |
Invalid client ID is passed, as one of the arguments. | |
#define | CL_EO_ERR_INVALID_SERVICEID 0x104 |
Invalid service ID is passed, as one of the arguments. | |
#define | CL_EO_ERR_LIB_ID_INVALID 0x105 |
The Library ID specified is invalid. | |
#define | CL_EO_ERR_QUEUE_OVERFLOW 0x108 |
The Action Queue has overflown. | |
#define | CL_EO_ERR_WATER_MARK_ID_INVALID 0x106 |
The Water Mark ID specified is invalid. | |
#define | CL_EO_EVENT_CHANNEL_NAME "CL_EO_EVENT_CHANNEL_NAME" |
The Event Channel on which the Water Mark Notification is published. | |
#define | CL_EO_FN_MASK (0x3F) |
Hexadecimal of CL_EO_MAX_NO_FUNC -1. | |
#define | CL_EO_GET_FULL_FN_NUM(cl, fn) |
Defines a mechanism to generate unique RMD function number for the function. | |
#define | CL_EO_MAX_NAME_LEN 32 |
Maximum length of the name of the EO. | |
#define | CL_EO_MAX_NO_FUNC 64 |
If you change CL_EO_MAX_NO_FUNC , make sure to change CL_EO_CLIENT_BIT_SHIFT CL_EO_FN_MASK. | |
#define | CL_EO_NAME clEoNameGet() |
Gives the name of the Execution Object. | |
#define | CL_EO_SERVER_COOKIE_BIT_SIZE 8 |
EO server Id enum. | |
#define | CL_EO_USER_CLIENT_ID_START CL_EO_CLOVIS_RESERVED_CLIENTID_END |
You can specify a new clientId greater than CL_EO_USER_CLIENT_ID_START . |
Typedefs | |
typedef ClRcT(* | ClEoAppCreateCallbackT )(CL_IN ClUint32T argc, CL_IN char *argv[]) |
The application should initialize itself in this function callback. | |
typedef ClRcT(* | ClEoAppDeleteCallbackT )() |
The application performs cleanup in this function callback. | |
typedef ClRcT(* | ClEoAppHealthCheckCallbackT )(CL_OUT ClEoSchedFeedBackT *schFeedback) |
The application checks the health status in this function callback. | |
typedef ClRcT(* | ClEoAppStateChgCallbackT )(CL_IN ClEoStateT state) |
The application should change the state the service it is providing. | |
typedef ClUint32T | ClEoArgT |
EO argument type, this argument will always passed. | |
typedef ClRcT(* | ClEoCallFuncCallbackT )(CL_IN ClEoPayloadWithReplyCallbackT func, CL_IN ClEoDataT eoArg, CL_IN ClBufferHandleT inMsgHdl, CL_OUT ClBufferHandleT outMsgHdl) |
Function Callback definition for the clEoWalk function. | |
typedef ClRcT(* | ClEoCustomActionT )(ClCompIdT compId, ClWaterMarkIdT wmId, ClWaterMarkT *pWaterMark, ClEoWaterMarkFlagT wmType, ClEoActionArgListT argList) |
The application performs custom action in this callback. | |
typedef ClOsalTaskDataT | ClEoDataT |
The type of the EO data. | |
typedef struct ClEoExecutionObj | ClEoExecutionObjT |
The Execution Object abstracts the properties of a running OS thread or process. | |
typedef ClUint64T | ClEoIdT |
The type of the EOId, assigned to an EO as part of registration to the Component Manager. | |
typedef ClRcT(* | ClEoPayloadWithReplyCallbackT )(CL_IN ClEoDataT data, CL_IN ClBufferHandleT inMsgHandle, CL_OUT ClBufferHandleT outMsgHandle) |
RMD with PAYLOAD with REPLY function pointer. | |
typedef ClRcT(* | ClEoProtoCallbackT )(CL_IN ClEoExecutionObjT *pThis, CL_IN ClBufferHandleT eoRecvMsg, CL_IN ClUint8T priority, CL_IN ClUint8T protoType, CL_IN ClUint32T length, CL_IN ClIocPhysicalAddressT srcAddr) |
Callback to handle incoming messages marked with a particular protocol. | |
typedef struct ClEoServiceObj | ClEoServiceObjT |
This structure is EO Service Object. |
Functions | |
ClRcT | clEoClientDataGet (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId, CL_OUT ClEoDataT *pData) |
Returns the client specific data. | |
ClRcT | clEoClientDataSet (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId, CL_IN ClEoDataT data) |
Stores the client specific data. | |
ClRcT | clEoClientInstall (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId, CL_IN ClEoPayloadWithReplyCallbackT *pFuncs, CL_IN ClEoDataT data, CL_IN ClUint32T nFuncs) |
Installs the function table for a client. | |
ClRcT | clEoClientUninstall (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId) |
Uninstalls the function table for client. | |
ClRcT | clEoMyEoIocPortGet (CL_OUT ClIocPortT *pIocPort) |
Returns EO IocPort from task specific area. | |
ClRcT | clEoMyEoIocPortSet (CL_IN ClIocPortT iocPort) |
Sets the EO thread iocPort. | |
ClRcT | clEoMyEoObjectGet (CL_OUT ClEoExecutionObjT **pEOObj) |
Returns EO Object from task specific area. | |
ClRcT | clEoMyEoObjectSet (CL_IN ClEoExecutionObjT *eoObj) |
Stores EO Object in task specific area. | |
ClCharT * | clEoNameGet (void) |
Gives the name of the EO. | |
ClRcT | clEoPrivateDataGet (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T type, CL_OUT void **data) |
Returns data from EO specific data area. | |
ClRcT | clEoPrivateDataSet (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T type, CL_IN void *pData) |
Stores data in EO specific data area. | |
ClRcT | clEoProgNameGet (ClCharT *pName, ClUint32T maxSize) |
Gives the name of the executable for the EO. | |
void | clEoProtoInstall (ClEoProtoDefT *def) |
Install a protocol handler. | |
void | clEoProtoSwitch (ClEoProtoDefT *def) |
Switch from one handler to another. | |
void | clEoProtoUninstall (ClUint8T id) |
Remove a protocol handler. | |
ClRcT | clEoReceiveStart (CL_IN ClEoExecutionObjT *pThis) |
Starts receiving messages for a thread. | |
ClRcT | clEoServiceInstall (CL_IN ClEoExecutionObjT *pThis, CL_IN ClEoPayloadWithReplyCallbackT pFunction, CL_IN ClUint32T iFuncNum, CL_IN ClEOServiceInstallOrderT order) |
Installs a particular client function. | |
ClRcT | clEoServiceUninstall (CL_IN ClEoExecutionObjT *pThis, CL_IN ClEoPayloadWithReplyCallbackT pFunction, CL_IN ClUint32T iFuncNum) |
Uninstalls a particular client function. | |
ClRcT | clEoServiceValidate (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T func) |
Validates the function registration. | |
ClRcT | clEoWalk (CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T func, CL_IN ClEoCallFuncCallbackT pFuncCallout, CL_IN ClBufferHandleT inMsgHdl, CL_OUT ClBufferHandleT outMsgHdl) |
Performs a walk. |
Variables | |
ClCharT | ASP_APP_BINDIR [CL_MAX_NAME_LENGTH] |
Dir where application binaries are located. | |
ClCharT | ASP_BINDIR [CL_MAX_NAME_LENGTH] |
Dir where ASP binaries are located. | |
ClCharT | ASP_COMPNAME [CL_MAX_NAME_LENGTH] |
Name of the component. | |
ClCharT | ASP_CONFIG [CL_MAX_NAME_LENGTH] |
Dir where xml config are located. | |
ClCharT | ASP_DBDIR [CL_MAX_NAME_LENGTH] |
Dir where persistent db files are to be stored. | |
ClCharT | ASP_LOGDIR [CL_MAX_NAME_LENGTH] |
Dir where logs are stored. | |
ClUint32T | ASP_NODEADDR |
Address of the node. | |
ClCharT | ASP_NODENAME [CL_MAX_NAME_LENGTH] |
Name of the node. | |
ClCharT | ASP_RUNDIR [CL_MAX_NAME_LENGTH] |
Working dir where programs are run. | |
ClBoolT | ASP_SC_PROMOTE |
Variable to check if the current node is a SC capable node. | |
ClCharT | CL_APP_BINDIR [CL_MAX_NAME_LENGTH] |
Dir where application binaries are located. | |
ClBoolT | SYSTEM_CONTROLLER |
Variable to check if the current node is a system controller node. |
Defines, Structures, Typedefs, Functions.
#define CL_EO_ERR_EO_SUSPENDED 0x101 |
EO related error codes.
EO is currently in suspended state, so will be be able to provide service
#define CL_EO_EVENT_CHANNEL_NAME "CL_EO_EVENT_CHANNEL_NAME" |
The Event Channel on which the Water Mark Notification is published.
Any interested component must open this global channel with the flags defined here and appropriate filters to receive the events.
#define CL_EO_SERVER_COOKIE_BIT_SIZE 8 |
EO server Id enum.
Server ID is used as a key to save server specific data, that is, server cookie into EO specific data area. Upto 256 cookies can be saved for each server. The cookie key range from XXXX_COOKIE_ID
to XXXX_COOKIE_ID+255
.
The application should initialize itself in this function callback.
Implementation of this is mainly dependent on the ClEoApplicationTypeT selected by you.
typedef ClRcT(* ClEoAppStateChgCallbackT)(CL_IN ClEoStateT state) |
The application should change the state the service it is providing.
This service can be provided by the following mechanisms:
typedef ClRcT(* ClEoCallFuncCallbackT)(CL_IN ClEoPayloadWithReplyCallbackT func, CL_IN ClEoDataT eoArg, CL_IN ClBufferHandleT inMsgHdl, CL_OUT ClBufferHandleT outMsgHdl) |
Function Callback definition for the clEoWalk function.
func | Function that implements the RMD. |
eoArg | Arguments that need to be passed. |
inMsgHdl | Request packet received including the protocol header. |
outMsgHdl | Data part of response of a protocol [PDU]. |
typedef ClRcT(* ClEoPayloadWithReplyCallbackT)(CL_IN ClEoDataT data, CL_IN ClBufferHandleT inMsgHandle, CL_OUT ClBufferHandleT outMsgHandle) |
RMD with PAYLOAD with REPLY function pointer.
data | Given while invoking clEoClientInstall. |
inMsgHandle | Received message over RMD. |
outMsgHandle | Reply message if any. |
typedef ClRcT(* ClEoProtoCallbackT)(CL_IN ClEoExecutionObjT *pThis, CL_IN ClBufferHandleT eoRecvMsg, CL_IN ClUint8T priority, CL_IN ClUint8T protoType, CL_IN ClUint32T length, CL_IN ClIocPhysicalAddressT srcAddr) |
Callback to handle incoming messages marked with a particular protocol.
pThis | Handle of the EO object. |
eoRecvMsg | Handle of the received message. |
priority | IOC message priority. |
protoType | Protocol type. This is supplied so that 1 implementation can be used to handle related protocols. |
length | Length in bytes of the message (eoRecvMsg). |
srcAddr | IOC address of the sender. |
enum ClEoApplicationTypeT |
enum ClEoClientIdT |
enum ClEoPollingTypeT |
enum ClEoStateT |
This is the EO state enumeration.
ClRcT clEoClientDataGet | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | clientId, | ||
CL_OUT ClEoDataT * | pData | ||
) |
Returns the client specific data.
pThis | Handle of the EO. |
clientId | Id of the client. |
pData | (out) Client specific data. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_ERR_INVALID_CLIENTID | On passing invalid clientId. |
ClRcT clEoClientDataSet | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | clientId, | ||
CL_IN ClEoDataT | data | ||
) |
Stores the client specific data.
pThis | Handle of the EO. |
clientId | Id of the client. |
data | Client specific data. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_ERR_INVALID_CLIENTID | On passing invalid clientId. |
ClRcT clEoClientInstall | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | clientId, | ||
CL_IN ClEoPayloadWithReplyCallbackT * | pFuncs, | ||
CL_IN ClEoDataT | data, | ||
CL_IN ClUint32T | nFuncs | ||
) |
Installs the function table for a client.
pThis | Handle of the EO. |
clientId | Id of the Client. |
pFuncs | Pointer to the function table. |
data | Client specific data. |
nFuncs | Number of functions passed that are being installed. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_NO_MEMORY | On memory allocation failure. |
CL_EO_CL_INVALID_CLIENTID | On passing invalid clientId. |
CL_EO_CL_INVALID_SERVICEID | On passing invalid serviceId. |
ClRcT clEoClientUninstall | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | clientId | ||
) |
Uninstalls the function table for client.
pThis | Handle of the EO. |
clientId | Id of the client. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_ERR_INVALID_CLIENTID | On passing invalid clientId. |
ClRcT clEoMyEoIocPortGet | ( | CL_OUT ClIocPortT * | pIocPort | ) |
Returns EO IocPort from task specific area.
pIocPort | (out) Carries the value to be retrieved. |
CL_OK | The API executed successfully. |
CL_ERR_INVALID_STATE | If state is invalid. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clEoMyEoIocPortSet | ( | CL_IN ClIocPortT | iocPort | ) |
Sets the EO thread iocPort.
iocPort | Carries the value to be set. |
CL_OK | The API executed successfully. |
ClRcT clEoMyEoObjectGet | ( | CL_OUT ClEoExecutionObjT ** | pEOObj | ) |
Returns EO Object from task specific area.
pEOObj | (out) Carries the value to be retrieved. |
CL_OK | The API executed successfully. |
CL_ERR_INVALID_STATE | If state is invalid. |
ClRcT clEoMyEoObjectSet | ( | CL_IN ClEoExecutionObjT * | eoObj | ) |
Stores EO Object in task specific area.
pEoObj | Contains ClEoExecutionObjT* to be stored. |
CL_OK | The API executed successfully. |
ClRcT clEoPrivateDataGet | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | type, | ||
CL_OUT void ** | data | ||
) |
Returns data from EO specific data area.
pThis | Handle of the EO. |
type | User specified key. |
data | (out) EO specific data. |
ClRcT clEoPrivateDataSet | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | type, | ||
CL_IN void * | pData | ||
) |
Stores data in EO specific data area.
pThis | Handle of the EO. |
type | User specified key. |
pData | EO specific data. |
void clEoProtoInstall | ( | ClEoProtoDefT * | def | ) |
Install a protocol handler.
def | The protocol definiton – this structure is copied so you may pass a temporary (stack) variable |
void clEoProtoSwitch | ( | ClEoProtoDefT * | def | ) |
Switch from one handler to another.
def | The protocol definiton – this structure is copied so you may pass a temporary (stack) variable |
void clEoProtoUninstall | ( | ClUint8T | id | ) |
Remove a protocol handler.
id | The protocol id (the first byte in the message is the protocol identifier). |
ClRcT clEoReceiveStart | ( | CL_IN ClEoExecutionObjT * | pThis | ) |
Starts receiving messages for a thread.
pThis | Handle of the EO. |
ClRcT clEoServiceInstall | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClEoPayloadWithReplyCallbackT | pFunction, | ||
CL_IN ClUint32T | iFuncNum, | ||
CL_IN ClEOServiceInstallOrderT | order | ||
) |
Installs a particular client function.
pThis | Handle of the EO. |
pFunction | Function pointer to be installed. |
iFuncNum | Function number. |
order | Order as whether to add to the front or the back of the table. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_EO_CL_INVALID_SERVICEID | On passing invalid serviceId. |
CL_ERR_INVALID_PARAMETER | On passing invalid parameters. |
ClRcT clEoServiceUninstall | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClEoPayloadWithReplyCallbackT | pFunction, | ||
CL_IN ClUint32T | iFuncNum | ||
) |
Uninstalls a particular client function.
pThis | Handle of the EO. |
pFunction | Function pointer to be uninstalled. |
iFuncNum | Function number. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_FUNC_NOT_REGISTERED | On unregistering a function which is not registered. |
CL_EO_CL_INVALID_SERVICEID | On passing invalid servide ID. |
CL_ERR_INVALID_PARAMETER | On passing invalid parameter. |
ClRcT clEoServiceValidate | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | func | ||
) |
Validates the function registration.
pThis | Handle of the EO. |
func | Function to be invoked. |
CL_OK | The API executed successfully. |
CL_EO_ERR_FUNC_NOT_REGISTERED | If function is not registered. |
CL_EO_ERR_EO_SUSPENDED | If EO is in a suspended state. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
ClRcT clEoWalk | ( | CL_IN ClEoExecutionObjT * | pThis, |
CL_IN ClUint32T | func, | ||
CL_IN ClEoCallFuncCallbackT | pFuncCallout, | ||
CL_IN ClBufferHandleT | inMsgHdl, | ||
CL_OUT ClBufferHandleT | outMsgHdl | ||
) |
Performs a walk.
pThis | Handle of the EO. |
func | Function number to be executed. |
pFuncCallout | Function that will perform the actual execution. |
inMsgHdl | Request message received including protocol header. |
outMsgHdl | (out) Data part of response of a protocol (PDU). |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_EO_ERR_FUNC_NOT_REGISTERED | If function is not registered. |
CL_EO_ERR_EO_SUSPENDED | If EO is in suspended state. |
ClCharT ASP_APP_BINDIR[CL_MAX_NAME_LENGTH] |
Dir where application binaries are located.
Derived from ASP_BINDIR and argv[0].
ClCharT ASP_BINDIR[CL_MAX_NAME_LENGTH] |
Dir where ASP binaries are located.
Loaded from the same-named environment variable.
ClCharT ASP_COMPNAME[CL_MAX_NAME_LENGTH] |
Name of the component.
Loaded from the same-named environment variable.
ClCharT ASP_CONFIG[CL_MAX_NAME_LENGTH] |
Dir where xml config are located.
Loaded from the same-named environment variable.
ClCharT ASP_DBDIR[CL_MAX_NAME_LENGTH] |
Dir where persistent db files are to be stored.
Loaded from the same-named environment variable.
ClCharT ASP_LOGDIR[CL_MAX_NAME_LENGTH] |
Dir where logs are stored.
Loaded from the same-named environment variable.
ClUint32T ASP_NODEADDR |
Address of the node.
Loaded from the same-named environment variable.
ClCharT ASP_NODENAME[CL_MAX_NAME_LENGTH] |
Name of the node.
Loaded from the same-named environment variable.
ClCharT ASP_RUNDIR[CL_MAX_NAME_LENGTH] |
Working dir where programs are run.
Loaded from the same-named environment variable.
ClBoolT ASP_SC_PROMOTE |
Variable to check if the current node is a SC capable node.
Loaded from the same-named environment variable.
ClCharT CL_APP_BINDIR[CL_MAX_NAME_LENGTH] |
Dir where application binaries are located.
Derived from ASP_BINDIR and argv[0]. Deprecated.
ClBoolT SYSTEM_CONTROLLER |
Variable to check if the current node is a system controller node.
Loaded from the same-named environment variable.