111 #include <clIocManagementApi.h>
114 #include <clVersion.h>
118 #include <clRadixTree.h>
159 #define CL_EO_MAX_NO_FUNC 64
177 #define CL_EO_CLIENT_BIT_SHIFT 6
182 #define CL_EO_FN_MASK (0x3F)
184 #define CL_EO_CLIENT_ID_MASK (ClUint32T)(~0U >> CL_EO_CLIENT_BIT_SHIFT)
189 #define CL_EO_GET_FULL_FN_NUM(cl, fn) (((cl) << CL_EO_CLIENT_BIT_SHIFT) | \
246 CL_DEBUG_CLIENT_TABLE_ID,
251 CL_TXN_CLIENT_TABLE_ID,
303 CL_AMS_MGMT_SERVER_TABLE2_ID,
315 #define CL_EO_USER_CLIENT_ID_START CL_EO_CLOVIS_RESERVED_CLIENTID_END
324 #define CL_EO_SERVER_COOKIE_BIT_SIZE 8
326 #define CL_EO_SERVER_COOKIE_BASE(cId) ((cId) << (CL_EO_SERVER_COOKIE_BIT_SIZE))
334 #define CL_EO_EVENT_CHANNEL_NAME "CL_EO_EVENT_CHANNEL_NAME"
335 #define CL_EO_EVENT_SUBSCRIBE_FLAG (CL_EVENT_CHANNEL_SUBSCRIBER | CL_EVENT_GLOBAL_CHANNEL)
336 #define CL_EO_EVENT_DEFAULT_FILTER NULL
360 CL_EO_NATIVE_COMPONENT_COOKIE_BASE
362 CL_EO_EO_MGR_SERVER_COOKIE_ID
364 CL_EO_COR_SERVER_COOKIE_ID
366 CL_EO_EVT_EVENT_DELIVERY_COOKIE_ID
368 CL_EO_DEBUG_OBJECT_COOKIE_ID
369 = CL_EO_SERVER_COOKIE_BASE(CL_DEBUG_CLIENT_TABLE_ID),
370 CL_EO_RMD_CLIENT_COOKIE_ID
397 typedef struct ClEoPayloadWithReplyCallbackServer
402 } ClEoPayloadWithReplyCallbackServerT;
404 typedef struct ClEoPayloadWithReplyCallbackClient
408 } ClEoPayloadWithReplyCallbackClientT;
410 typedef struct ClEoPayloadWithReplyCallbackTableClient
413 ClEoPayloadWithReplyCallbackClientT *funTable;
414 ClUint32T funTableSize;
415 } ClEoPayloadWithReplyCallbackTableClientT;
417 typedef struct ClEoPayloadWithReplyCallbackTableServer
420 ClEoPayloadWithReplyCallbackServerT *funTable;
421 ClUint32T funTableSize;
422 } ClEoPayloadWithReplyCallbackTableServerT;
459 #define __CLIENT_RADIX_TREE_INDEX(fun_id, version_code) ( (((fun_id & CL_EO_FN_MASK) << CL_VERSION_SHIFT) ) | ((version_code) & CL_VERSION_MASK) )
462 ClUint32T maxClients;
463 ClRadixTreeHandleT funTable;
467 ClUint32T maxClients;
468 ClRadixTreeHandleT funTable;
654 CL_IN ClUint8T priority,
655 CL_IN ClUint8T protoType,
656 CL_IN ClUint32T length,
694 #define EO_CLIENT_SYM(sym) sym##Client
695 #define CL_EO_CLIENT_SYM_MOD(sym, mod) EO_CLIENT_SYM(sym##mod)
696 #define CL_EO_SERVER_SYM_MOD(sym, mod) sym##mod
698 #if defined (__SERVER__)
700 #define CL_EO_CALLBACK_TABLE_DECL(sym) ClEoPayloadWithReplyCallbackServerT VDECL(sym)
701 #define CL_EO_CALLBACK_TABLE_VER_DECL(sym, rel, major, minor) ClEoPayloadWithReplyCallbackServerT VDECL_VER(sym, rel, major, minor)
702 #define CL_EO_CALLBACK_TABLE_LIST_DECL(sym, module) ClEoPayloadWithReplyCallbackTableServerT sym##module
703 #define CL_EO_CALLBACK_TABLE_LIST_DEF(clnt, sym) { \
704 clnt, VDECL(sym), (ClUint32T)sizeof(VDECL(sym))/sizeof(VDECL(sym)[0]) }
705 #define CL_EO_CALLBACK_TABLE_LIST_VER_DEF(clnt, sym, rel, major, minor) { \
706 clnt, VDECL_VER(sym, rel, major, minor), \
707 (ClUint32T)sizeof(VDECL_VER(sym, rel, major, minor))/sizeof(VDECL_VER(sym, rel, major, minor)[0]) }
711 #define CL_EO_CALLBACK_TABLE_DECL(sym) ClEoPayloadWithReplyCallbackClientT VDECL(EO_CLIENT_SYM(sym))
712 #define CL_EO_CALLBACK_TABLE_VER_DECL(sym, rel, major, minor) ClEoPayloadWithReplyCallbackClientT VDECL_VER(EO_CLIENT_SYM(sym), rel, major, minor)
713 #define CL_EO_CALLBACK_TABLE_LIST_DECL(sym, module) ClEoPayloadWithReplyCallbackTableClientT EO_CLIENT_SYM(sym##module)
714 #define CL_EO_CALLBACK_TABLE_LIST_DEF(clnt, sym) { clnt, VDECL(EO_CLIENT_SYM(sym) ), \
715 (ClUint32T)sizeof(VDECL(EO_CLIENT_SYM(sym))) / sizeof(VDECL(EO_CLIENT_SYM(sym))[0]) }
716 #define CL_EO_CALLBACK_TABLE_LIST_VER_DEF(clnt, sym, rel, major, minor) { \
717 clnt, VDECL_VER(EO_CLIENT_SYM(sym), rel, major, minor), \
718 (ClUint32T) sizeof(VDECL_VER(EO_CLIENT_SYM(sym), rel, major, minor)) / sizeof(VDECL_VER(EO_CLIENT_SYM(sym), rel, major, minor)[0]) }
721 #define CL_EO_CALLBACK_TABLE_LIST_DEF_NULL { 0, NULL, 0 }
723 extern ClEoPayloadWithReplyCallbackTableClientT EO_CLIENT_SYM(gAspFuncTable)[];
726 ClEoPayloadWithReplyCallbackTableServerT *table);
729 ClEoPayloadWithReplyCallbackTableServerT *table,
733 ClEoPayloadWithReplyCallbackTableServerT *table);
735 ClBoolT clEoClientTableFilter(
ClIocPortT eoPort, ClUint32T clientID);
754 ClRcT clEoClientTableRegister(ClEoPayloadWithReplyCallbackTableClientT *clientTable,
825 CL_IN ClUint32T func,
830 extern ClRcT clEoWalkWithVersion(
832 CL_IN ClUint32T func,
867 CL_IN ClUint32T func);
904 CL_IN ClUint32T clientId,
907 CL_IN ClUint32T nFuncs);
909 extern ClRcT clEoClientInstallTable(
911 CL_IN ClUint32T clientId,
913 CL_IN ClEoPayloadWithReplyCallbackServerT *pFuncs,
914 CL_IN ClUint32T nFuncs);
945 CL_IN ClUint32T clientId);
949 ClEoPayloadWithReplyCallbackServerT *pfunTable,
979 CL_IN ClUint32T clientId,
1010 CL_IN ClUint32T clientId,
1051 CL_IN ClUint32T iFuncNum,
1086 CL_IN ClUint32T iFuncNum);
1117 CL_IN ClUint32T type,
1149 CL_IN ClUint32T type,
1338 extern ClUint8T clEoBasicLibs[];
1340 extern ClUint8T clEoClientLibs[];
1345 CL_EO_CRASH_DEADLOCK,
1346 CL_EO_CRASH_HUNG_SYSCALL,
1349 typedef struct ClEoCrashNotificationT
1351 ClEoCrashReasonT reason;
1355 const ClCharT *compName;
1356 } ClEoCrashNotificationT;
1358 typedef ClEoCrashNotificationT ClEoCrashDeadlockT;
1360 typedef struct ClEoCrashHungSyscall
1362 #define _TASK_SND_MASK (1)
1363 #define _TASK_RCV_MASK (2)
1364 #define _IS_TASK_SND(mask) ( (mask) & _TASK_SND_MASK )
1365 #define _IS_TASK_RCV(mask) ( (mask) & _TASK_RCV_MASK )
1367 ClEoCrashNotificationT crash;
1369 } ClEoCrashHungSyscallT;
1371 typedef void (*ClEoCrashNotificationCallbackT)(
const ClEoCrashNotificationT *crash);
1376 extern ClRcT clEoCrashNotificationRegister(ClEoCrashNotificationCallbackT callback);
Typical defines found in any software project.
Common Error Codes shared across multiple Clovis ASP Components.
Header file of Clovis Container Related APIs.
Header file of EO Config Definitions.
Header file of EO related Error Messages.
Header file of Ioc Data Structures and APIs.
Operating System Abstraction Layer API.
Header file of RMD Interface.
Header file of Heap Management related APIs.
Header file of Queue Management related APIs.
ClPtrT ClBufferHandleT
The type of the handle for the buffer messages.
Definition: clBufferApi.h:82
ClPtrT ClCntHandleT
Handle of the container.
Definition: clCntApi.h:88
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
ClInt64T ClTimeT
Time duration specified in nanoseconds.
Definition: clCommon.h:154
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_MAX_NAME_LENGTH
The Maximum length of most string names in the OpenClovis ASP framework.
Definition: clCommon.h:194
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClRcT clEoMyEoIocPortSet(CL_IN ClIocPortT iocPort)
Sets the EO thread iocPort.
ClUint32T ClEoArgT
EO argument type, this argument will always passed.
Definition: clEoApi.h:204
struct ClEoServiceObj ClEoServiceObjT
This structure is EO Service Object.
ClRcT(* ClEoAppCreateCallbackT)(CL_IN ClUint32T argc, CL_IN char *argv[])
The application should initialize itself in this function callback.
Definition: clEoConfigApi.h:213
ClCharT ASP_CONFIG[CL_MAX_NAME_LENGTH]
Dir where xml config are located.
ClCharT ASP_APP_BINDIR[CL_MAX_NAME_LENGTH]
Dir where application binaries are located.
ClEoStateT
This is the EO state enumeration.
Definition: clEoConfigApi.h:94
ClCharT ASP_COMPNAME[CL_MAX_NAME_LENGTH]
Name of the component.
ClCharT ASP_RUNDIR[CL_MAX_NAME_LENGTH]
Working dir where programs are run.
ClUint64T ClEoIdT
The type of the EOId, assigned to an EO as part of registration to the Component Manager.
Definition: clEoConfigApi.h:63
ClCharT CL_APP_BINDIR[CL_MAX_NAME_LENGTH]
Dir where application binaries are located.
void clEoRefInc(ClEoExecutionObjT *eo)
NAME: clEoRefInc This function increments the reference count of the execution object.
ClRcT clEoMyEoIocPortGet(CL_OUT ClIocPortT *pIocPort)
Returns EO IocPort from task specific area.
ClRcT clEoClientDataSet(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId, CL_IN ClEoDataT data)
Stores the client specific data.
ClEoClientIdT
Definition: clEoApi.h:206
void clEoProtoUninstall(ClUint8T id)
Remove a protocol handler.
ClRcT(* ClEoAppStateChgCallbackT)(CL_IN ClEoStateT state)
The application should change the state the service it is providing.
Definition: clEoConfigApi.h:240
struct ClEoExecutionObj ClEoExecutionObjT
The Execution Object abstracts the properties of a running OS thread or process.
ClRcT clEoClientDataGet(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId, CL_OUT ClEoDataT *pData)
Returns the client specific data.
void clEoProtoInstall(ClEoProtoDefT *def)
Install a protocol handler.
ClUint32T ASP_NODEADDR
Address of the node.
ClIocPortT gEOIocPort
The IOC port assigned to this component.
ClRcT(* ClEoPayloadWithReplyCallbackT)(CL_IN ClEoDataT data, CL_IN ClBufferHandleT inMsgHandle, CL_OUT ClBufferHandleT outMsgHandle)
RMD with PAYLOAD with REPLY function pointer.
Definition: clEoApi.h:392
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.
ClCharT ASP_DBDIR[CL_MAX_NAME_LENGTH]
Dir where persistent db files are to be stored.
ClRcT clEoServiceUninstall(CL_IN ClEoExecutionObjT *pThis, CL_IN ClEoPayloadWithReplyCallbackT pFunction, CL_IN ClUint32T iFuncNum)
Uninstalls a particular client function.
ClRcT clEoClientUninstall(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T clientId)
Uninstalls the function table for client.
ClRcT clEoMyEoObjectSet(CL_IN ClEoExecutionObjT *eoObj)
Stores EO Object in task specific area.
ClRcT clEoServiceValidate(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T func)
Validates the function registration.
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(* ClEoAppHealthCheckCallbackT)(CL_OUT ClEoSchedFeedBackT *schFeedback)
The application checks the health status in this function callback.
Definition: clEoConfigApi.h:255
ClRcT(* ClEoAppDeleteCallbackT)()
The application performs cleanup in this function callback.
Definition: clEoConfigApi.h:250
ClRcT clEoPrivateDataSet(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T type, CL_IN void *pData)
Stores data in EO specific data area.
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.
Definition: clEoApi.h:618
ClCharT ASP_BINDIR[CL_MAX_NAME_LENGTH]
Dir where ASP binaries are located.
ClEOServiceInstallOrderT
Definition: clEoApi.h:161
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.
Definition: clEoApi.h:650
ClCharT ASP_NODENAME[CL_MAX_NAME_LENGTH]
Name of the node.
ClRcT clEoReceiveStart(CL_IN ClEoExecutionObjT *pThis)
Starts receiving messages for a thread.
void clEoProtoSwitch(ClEoProtoDefT *def)
Switch from one handler to another.
ClRcT clEoServiceInstall(CL_IN ClEoExecutionObjT *pThis, CL_IN ClEoPayloadWithReplyCallbackT pFunction, CL_IN ClUint32T iFuncNum, CL_IN ClEOServiceInstallOrderT order)
Installs a particular client function.
ClBoolT ASP_SC_PROMOTE
Variable to check if the current node is a SC capable node.
#define CL_EO_MAX_NAME_LEN
Maximum length of the name of the EO.
Definition: clEoConfigApi.h:68
ClCharT ASP_LOGDIR[CL_MAX_NAME_LENGTH]
Dir where logs are stored.
ClBoolT SYSTEM_CONTROLLER
Variable to check if the current node is a system controller node.
ClRcT clEoPrivateDataGet(CL_IN ClEoExecutionObjT *pThis, CL_IN ClUint32T type, CL_OUT void **data)
Returns data from EO specific data area.
#define CL_EO_MAX_NO_FUNC
If you change CL_EO_MAX_NO_FUNC, make sure to change CL_EO_CLIENT_BIT_SHIFT CL_EO_FN_MASK.
Definition: clEoApi.h:159
ClRcT clEoMyEoObjectGet(CL_OUT ClEoExecutionObjT **pEOObj)
Returns EO Object from task specific area.
ClOsalTaskDataT ClEoDataT
The type of the EO data.
Definition: clEoApi.h:199
void clEoRefDec(ClEoExecutionObjT *eo)
NAME: clEoRefInc This function increments the reference count of the execution object.
@ CL_EO_CLOVIS_RESERVED_CLIENTID_END
CLIENT IDs till this value are reserved by Clovis.
Definition: clEoApi.h:308
@ CL_AMS_MGMT_CLIENT_TABLE_ID
This value AMS Mgmt Client-specific.
Definition: clEoApi.h:266
@ CL_LOG_CLIENT_TABLE_ID
This value is specific to Log Client.
Definition: clEoApi.h:271
@ CL_AMS_MGMT_SERVER_TABLE_ID
This value AMS Mgmt Server-specific.
Definition: clEoApi.h:261
@ CL_MSG_CLIENT_TABLE_ID
This value is specific to MSG clients.
Definition: clEoApi.h:294
@ CL_EO_COR_CLIENT_TABLE_ID
This value is COR specific.
Definition: clEoApi.h:226
@ CL_EO_CKPT_CLIENT_TABLE_ID
This value is specific to Ckpt Client.
Definition: clEoApi.h:275
@ CL_ALARM_CLIENT_TABLE_ID
This value is Alarm Manager specific.
Definition: clEoApi.h:241
@ CL_EO_EO_MGR_CLIENT_TABLE_ID
This value is EO Manager specific.
Definition: clEoApi.h:221
@ CL_GMS_CLIENT_TABLE_ID
This value is GMS specific.
Definition: clEoApi.h:256
@ CL_EO_RMD_CLIENT_TABLE_ID
This value is specific to RMD Client.
Definition: clEoApi.h:280
@ CL_EO_DEFAULT_SERVICE_TABLE_ID
This value is native EO specific.
Definition: clEoApi.h:216
@ CL_EO_EVT_CLIENT_TABLE_ID
This value is Event Manager specific.
Definition: clEoApi.h:231
@ CL_CPM_MGR_CLIENT_TABLE_ID
This value is CPM specific.
Definition: clEoApi.h:236
@ CL_MSG_CLIENT_SERVER_TABLE_ID
This value is specific to MSG clients & servers.
Definition: clEoApi.h:299
@ CL_CPM_MGMT_CLIENT_TABLE_ID
This value is specific to CPM mgmt.
Definition: clEoApi.h:290
@ CL_EO_NATIVE_COMPONENT_TABLE_ID
This is the service provided by Host EO.
Definition: clEoApi.h:211
@ CL_AMS_ENTITY_TRIGGER_TABLE_ID
This value is specific to AMS metric trigger client.
Definition: clEoApi.h:285
@ CL_EO_ADD_TO_FRONT
Adds to the front of the list.
Definition: clEoApi.h:166
@ CL_EO_ADD_TO_BACK
Adds to back of the list.
Definition: clEoApi.h:171
ClWordT ClIocCommPortHandleT
The Communication port handle.
Definition: clIocApi.h:353
ClUint32T ClIocPortT
The IOC communication port.
Definition: clIocApi.h:348
pthread_cond_t ClOsalCondT
The thread condition type wrapped.
Definition: clOsalApi.h:204
ClOsalThreadPriorityT
The following enumeration type contains the various thread priorities.
Definition: clOsalApi.h:295
ClPtrT ClOsalTaskDataT
The type of an identifier to the OSAL Task Data type.
Definition: clOsalApi.h:253
ClUint64T ClOsalTaskIdT
The type of an identifier to the OSAL Task ID.
Definition: clOsalApi.h:210
Version Information for various services.
Definition: clCommon.h:250
This structure is EO Service Object.
Definition: clEoApi.h:427
struct ClEoServiceObj * pNextServObj
This is the pointer to the next service on the same serviceID.
Definition: clEoApi.h:437
void(* func)()
This is the client service function pointer.
Definition: clEoApi.h:432
This structure contains the pointer to the callback functions to be registered with the EO and the cl...
Definition: clEoApi.h:445
ClEoDataT data
This is the client-specific data.
Definition: clEoApi.h:455
The Execution Object abstracts the properties of a running OS thread or process.
Definition: clEoApi.h:476
ClEoClientObjT * pClient
This is the pointer to EO client APIs.
Definition: clEoApi.h:506
ClOsalMutexT eoMutex
This mutex is used to protect the Execution Object.
Definition: clEoApi.h:558
ClEoAppDeleteCallbackT clEoDeleteCallout
This application function is called when the EO gets terminated.
Definition: clEoApi.h:585
ClUint32T threadRunning
This is the receive loop thread State.
Definition: clEoApi.h:501
ClEoIdT eoID
The eoID must be unique on a blade.
Definition: clEoApi.h:486
ClCntHandleT eoTaskIdInfo
This is the TaskID information of receive loop.
Definition: clEoApi.h:551
ClCntHandleT pEOPrivDataHdl
This is the handle of the container of EO specific data.
Definition: clEoApi.h:526
ClEoServerTableT * pServerTable
This is the pointer to EO server tables.
Definition: clEoApi.h:516
ClEoClientTableT * pClientTable
This is the pointer to EO client tables.
Definition: clEoApi.h:511
ClEoAppCreateCallbackT clEoCreateCallout
This application function is called from Main during the initialization process.
Definition: clEoApi.h:580
ClEoStateT state
This indicates the EO State.
Definition: clEoApi.h:496
ClEoAppHealthCheckCallbackT clEoHealthCheckCallout
This is the application function that is called when EO healthcheck is performed by CPM.
Definition: clEoApi.h:596
ClOsalThreadPriorityT pri
This indicates the priority of the EO threads where RMD is executed.
Definition: clEoApi.h:491
ClUint32T eoSetDoneCnt
This is used to set State related flag and counter.
Definition: clEoApi.h:546
ClUint32T noOfThreads
This indicates the number of RMD threads spawned.
Definition: clEoApi.h:521
ClUint32T appType
This indicates the whether application needs main thread or not.
Definition: clEoApi.h:570
ClUint32T eoInitDone
This indicates whether EOInit() has been called or not.
Definition: clEoApi.h:541
ClRmdObjHandleT rmdObj
This is the RMD object associated with the EO.
Definition: clEoApi.h:536
ClIocPortT eoPort
This indicates the requested IOC Communication Port.
Definition: clEoApi.h:565
ClEoAppStateChgCallbackT clEoStateChgCallout
This is application function is called when the EO is moved into suspended state.
Definition: clEoApi.h:590
ClCharT name[CL_EO_MAX_NAME_LEN]
Execution object name.
Definition: clEoApi.h:481
ClIocCommPortHandleT commObj
This indicates the EO communication object.
Definition: clEoApi.h:531
ClUint32T maxNoClients
This is the maximum number of EO clients.
Definition: clEoApi.h:575
This structure contains a list of the protocols registered with the EO.
Definition: clEoApi.h:665
ClEoProtoCallbackT nonblockingHandler
Non-blocking receive function of the protocol.
Definition: clEoApi.h:685
ClUint32T flags
Flags controlling how this protocol is handled.
Definition: clEoApi.h:690
ClUint8T protoID
ID of the protocol being registered.
Definition: clEoApi.h:670
ClEoProtoCallbackT func
Blocking receive function of the protocol.
Definition: clEoApi.h:680
This structure is passed during the clEoCreate API and contains the EO related configuration paramete...
Definition: clEoConfigApi.h:272
The IOC Physical address of an application's communication end point.
Definition: clIocApi.h:383