OpenClovis Logo

clEoApi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : eo
21  * File : clEoApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  * This header contains the definitions of various Execution Object (EO)
27  * data types and APIs.
28  *
29  *
30  *****************************************************************************/
31 
32 
33 /*****************************************************************************/
34 /******************************** EO APIs ************************************/
35 /*****************************************************************************/
36 /* */
37 /* clEoCreate */
38 /* clEoWalk */
39 /* clEoServiceValidate */
40 /* clEoStateSet */
41 /* clEoClientInstall */
42 /* clEoClientUninstall */
43 /* clEoClientDataSet */
44 /* clEoClientDataGet */
45 /* clEoServiceInstall */
46 /* clEoServiceUninstall */
47 /* clEoPrivateDataSet */
48 /* clEoPrivateDataGet */
49 /* clEoMyEoIocPortSet */
50 /* clEoMyEoIocPortGet */
51 /* clEoMyEoObjectSet */
52 /* clEoMyEoObjectGet */
53 /* clEoReceiveStart */
54 /* */
55 /*****************************************************************************/
56 
68 /*******************************************************************************
69  Any execution manager in the form of a process, task or thread (let's call it
70  an execution entity) is presumed to contain a set of data and an execution
71  context.
72 
73  The execution entity running in the system without external communication is
74  not very effective in the system, unless it is capable of interacting with
75  other execution entities. Since the execution entities are distributed in
76  nature, there needs to be a common mechanism that facilitates the
77  communication of these execution entities. Basically, the execution entity
78  consists of three responsibilities:
79  - The attributes and methods required to manage the execution entity.
80  - A mechanism to communicate with external execution entities.
81  - Implementation specific to the responsibilities of the execution entity.
82 
83  Clovis provides the first two functionalities, which are encapsulated within
84  the ExecutionObject. The ExecutionObject encapsulates all the common attributes
85  and methods that are used to represent the execution entity in the system.
86  Also, provided is the mechanism that facilitates the external communication.
87  The external communication is provided by creating a background thread that
88  receives the messages on behalf of the execution entity from external entities.
89  Once the messages are received, decoded and the corresponding method within
90  the execution entity is invoked. The user of the ExecutionObject is totally
91  unaware of this processing, and can simple assume the implemented methods are
92  invoked auto magically.
93 *******************************************************************************/
94 
95 
96 #ifndef _CL_EO_API_H_
97 #define _CL_EO_API_H_
98 
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 
103 /* CL_INCLUDES */
104 #include <clCommon.h>
105 #include <clCommonErrors.h>
106 
107 #include <clOsalApi.h>
108 #include <clHeapApi.h>
109 #include <clQueueApi.h>
110 #include <clIocApi.h>
111 #include <clIocManagementApi.h>
112 #include <clRmdApi.h>
113 #include <clCntApi.h>
114 #include <clVersion.h>
115 
116 #include <clEoConfigApi.h>
117 #include <clEoErrors.h>
118 #include <clRadixTree.h>
119 
120 /******************************************************************************
121  * Constant and Macro Definitions
122  *****************************************************************************/
123 
125 extern ClCharT ASP_NODENAME[CL_MAX_NAME_LENGTH];
127 extern ClCharT ASP_COMPNAME[CL_MAX_NAME_LENGTH];
129 extern ClUint32T ASP_NODEADDR;
130 
132 extern ClCharT ASP_RUNDIR[CL_MAX_NAME_LENGTH];
134 extern ClCharT ASP_LOGDIR[CL_MAX_NAME_LENGTH];
136 extern ClCharT ASP_BINDIR[CL_MAX_NAME_LENGTH];
138 extern ClCharT CL_APP_BINDIR[CL_MAX_NAME_LENGTH];
140 extern ClCharT ASP_APP_BINDIR[CL_MAX_NAME_LENGTH];
141 
143 extern ClCharT ASP_CONFIG[CL_MAX_NAME_LENGTH];
145 extern ClCharT ASP_DBDIR[CL_MAX_NAME_LENGTH];
146 
148 extern ClBoolT SYSTEM_CONTROLLER;
150 extern ClBoolT ASP_SC_PROMOTE;
151 
153 extern ClIocPortT gEOIocPort;
154 
159 #define CL_EO_MAX_NO_FUNC 64
160 
161 typedef enum {
162 
167 
173 
177 #define CL_EO_CLIENT_BIT_SHIFT 6
178 
182 #define CL_EO_FN_MASK (0x3F)
183 
184 #define CL_EO_CLIENT_ID_MASK (ClUint32T)(~0U >> CL_EO_CLIENT_BIT_SHIFT)
185 
189 #define CL_EO_GET_FULL_FN_NUM(cl, fn) (((cl) << CL_EO_CLIENT_BIT_SHIFT) | \
190  ((fn) << 0))
191 
192 /******************************************************************************
193  * Data Types
194  *****************************************************************************/
195 
200 
204 typedef ClUint32T ClEoArgT;
205 
206 typedef enum {
207 
212 
217 
222 
227 
232 
237 
242 
243 /*
244  * This value is Debug specific.
245  */
246  CL_DEBUG_CLIENT_TABLE_ID,
247 
248 /*
249  * This value is Transaction Agent-specific.
250  */
251  CL_TXN_CLIENT_TABLE_ID,
252 
257 
262 
267 
276 
281 
286 
295 
300 /*
301  * Extended AMS mgmt server tables.
302  */
303  CL_AMS_MGMT_SERVER_TABLE2_ID,
304 
309 
311 
315 #define CL_EO_USER_CLIENT_ID_START CL_EO_CLOVIS_RESERVED_CLIENTID_END
316 
324 #define CL_EO_SERVER_COOKIE_BIT_SIZE 8
325 
326 #define CL_EO_SERVER_COOKIE_BASE(cId) ((cId) << (CL_EO_SERVER_COOKIE_BIT_SIZE))
327 
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
337 
338 /*
339  * A typical call to subscribe would be as below:
340  * rc = clEventSubscribe(eoChannelHandle, CL_EO_EVENT_DEFAULT_FILTER, 0, NULL);
341  *
342  * For a more specific filter during subscribe one can specify the pattern as below:
343  * patterns[0].patternSize = sizeof(CL_EO_NAME);
344  * patterns[0].pPattern = (ClUint8T *)CL_EO_NAME;
345  *
346  * patterns[1].patternSize = sizeof(libraryId);
347  * patterns[1].pPattern = (ClUint8T *)&libraryId;
348  *
349  * patterns[2].patternSize = sizeof(waterMarkId);
350  * patterns[2].pPattern = (ClUint8T *)&waterMarkId;
351  *
352  * patterns[3].patternSize = sizeof(waterMarkType);
353  * patterns[3].pPattern = (ClUint8T *)&waterMarkType;
354  *
355  * patterns[4].patternSize = sizeof(waterMarkValue);
356  * patterns[4].pPattern = (ClUint8T *)(&waterMarkValue);
357  */
358 
359 typedef enum {
360  CL_EO_NATIVE_COMPONENT_COOKIE_BASE
361  = CL_EO_SERVER_COOKIE_BASE(CL_EO_NATIVE_COMPONENT_TABLE_ID),
362  CL_EO_EO_MGR_SERVER_COOKIE_ID
363  = CL_EO_SERVER_COOKIE_BASE(CL_EO_EO_MGR_CLIENT_TABLE_ID),
364  CL_EO_COR_SERVER_COOKIE_ID
365  = CL_EO_SERVER_COOKIE_BASE(CL_EO_COR_CLIENT_TABLE_ID),
366  CL_EO_EVT_EVENT_DELIVERY_COOKIE_ID
367  = CL_EO_SERVER_COOKIE_BASE(CL_EO_EVT_CLIENT_TABLE_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
371  = CL_EO_SERVER_COOKIE_BASE(CL_EO_RMD_CLIENT_TABLE_ID)
372 } ClEoServerIdT;
373 
374 
393  CL_IN ClEoDataT data,
394  CL_IN ClBufferHandleT inMsgHandle,
395  CL_OUT ClBufferHandleT outMsgHandle);
396 
397 typedef struct ClEoPayloadWithReplyCallbackServer
398 {
400  ClUint32T funId;
401  ClUint32T version;
402 } ClEoPayloadWithReplyCallbackServerT;
403 
404 typedef struct ClEoPayloadWithReplyCallbackClient
405 {
406  ClUint32T funId;
407  ClUint32T version;
408 } ClEoPayloadWithReplyCallbackClientT;
409 
410 typedef struct ClEoPayloadWithReplyCallbackTableClient
411 {
412  ClUint32T clientID;
413  ClEoPayloadWithReplyCallbackClientT *funTable;
414  ClUint32T funTableSize;
415 } ClEoPayloadWithReplyCallbackTableClientT;
416 
417 typedef struct ClEoPayloadWithReplyCallbackTableServer
418 {
419  ClUint32T clientID;
420  ClEoPayloadWithReplyCallbackServerT *funTable;
421  ClUint32T funTableSize;
422 } ClEoPayloadWithReplyCallbackTableServerT;
423 
427 typedef struct ClEoServiceObj {
428 
432  void (*func)();
433 
439 
445 typedef struct {
446 
451 
456 
458 
459 #define __CLIENT_RADIX_TREE_INDEX(fun_id, version_code) ( (((fun_id & CL_EO_FN_MASK) << CL_VERSION_SHIFT) ) | ((version_code) & CL_VERSION_MASK) )
460 
461 typedef struct {
462  ClUint32T maxClients;
463  ClRadixTreeHandleT funTable;
464 }ClEoClientTableT;
465 
466 typedef struct {
467  ClUint32T maxClients;
468  ClRadixTreeHandleT funTable;
469  ClEoDataT data;
470 }ClEoServerTableT;
471 
476 typedef struct ClEoExecutionObj{
477 
482 
487 
492 
497 
501  ClUint32T threadRunning;
502 
507 
511  ClEoClientTableT *pClientTable;
512 
516  ClEoServerTableT *pServerTable;
517 
521  ClUint32T noOfThreads;
522 
527 
532 
536  ClRmdObjHandleT rmdObj;
537 
541  ClUint32T eoInitDone;
542 
546  ClUint32T eoSetDoneCnt;
547 
552 
553  ClUint32T refCnt;
554 
558  ClOsalMutexT eoMutex;
559 
560  ClOsalCondT eoCond;
561 
566 
570  ClUint32T appType;
571 
575  ClUint32T maxNoClients;
576 
581 
586 
591 
597 
599 
600 
601 
620  CL_IN ClEoDataT eoArg,
621  CL_IN ClBufferHandleT inMsgHdl,
622  CL_OUT ClBufferHandleT outMsgHdl);
623 
651 
652  CL_IN ClEoExecutionObjT* pThis,
653  CL_IN ClBufferHandleT eoRecvMsg,
654  CL_IN ClUint8T priority,
655  CL_IN ClUint8T protoType,
656  CL_IN ClUint32T length,
657  CL_IN ClIocPhysicalAddressT srcAddr);
658 
659 
664 typedef struct
665 {
666 
670  ClUint8T protoID;
671 
675  ClCharT name[CL_MAX_NAME_LENGTH];
676 
681 
686 
690  ClUint32T flags;
691 
692 } ClEoProtoDefT;
693 
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
697 
698 #if defined (__SERVER__)
699 
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]) }
708 
709 #else
710 
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]) }
719 #endif
720 
721 #define CL_EO_CALLBACK_TABLE_LIST_DEF_NULL { 0, NULL, 0 }
722 
723 extern ClEoPayloadWithReplyCallbackTableClientT EO_CLIENT_SYM(gAspFuncTable)[];
724 
725 ClRcT clEoClientInstallTables(ClEoExecutionObjT *pThis,
726  ClEoPayloadWithReplyCallbackTableServerT *table);
727 
728 ClRcT clEoClientInstallTablesWithCookie(ClEoExecutionObjT *pThis,
729  ClEoPayloadWithReplyCallbackTableServerT *table,
730  ClEoDataT data);
731 
732 ClRcT clEoClientUninstallTables(ClEoExecutionObjT *pThis,
733  ClEoPayloadWithReplyCallbackTableServerT *table);
734 
735 ClBoolT clEoClientTableFilter(ClIocPortT eoPort, ClUint32T clientID);
736 
744 
752 
753 
754 ClRcT clEoClientTableRegister(ClEoPayloadWithReplyCallbackTableClientT *clientTable,
755  ClIocPortT clientPort);
756 
769 
778  void clEoProtoUninstall(ClUint8T id);
779 
789 
790 
791 /************************ EO APIs ***************************/
792 
824  CL_IN ClEoExecutionObjT *pThis,
825  CL_IN ClUint32T func,
826  CL_IN ClEoCallFuncCallbackT pFuncCallout,
827  CL_IN ClBufferHandleT inMsgHdl,
828  CL_OUT ClBufferHandleT outMsgHdl);
829 
830 extern ClRcT clEoWalkWithVersion(
831  CL_IN ClEoExecutionObjT *pThis,
832  CL_IN ClUint32T func,
833  CL_IN ClVersionT *version,
834  CL_IN ClEoCallFuncCallbackT pFuncCallout,
835  CL_IN ClBufferHandleT inMsgHdl,
836  CL_OUT ClBufferHandleT outMsgHdl);
837 
866  CL_IN ClEoExecutionObjT *pThis,
867  CL_IN ClUint32T func);
868 
869 
903  CL_IN ClEoExecutionObjT *pThis,
904  CL_IN ClUint32T clientId,
906  CL_IN ClEoDataT data,
907  CL_IN ClUint32T nFuncs);
908 
909 extern ClRcT clEoClientInstallTable(
910  CL_IN ClEoExecutionObjT *pThis,
911  CL_IN ClUint32T clientId,
912  CL_IN ClEoDataT data,
913  CL_IN ClEoPayloadWithReplyCallbackServerT *pFuncs,
914  CL_IN ClUint32T nFuncs);
915 
944  CL_IN ClEoExecutionObjT *pThis,
945  CL_IN ClUint32T clientId);
946 
947 extern ClRcT clEoClientUninstallTable(ClEoExecutionObjT *pThis,
948  ClUint32T clientID,
949  ClEoPayloadWithReplyCallbackServerT *pfunTable,
950  ClUint32T nentries);
951 
978  CL_IN ClEoExecutionObjT *pThis,
979  CL_IN ClUint32T clientId,
980  CL_IN ClEoDataT data);
981 
982 
1009  CL_IN ClEoExecutionObjT *pThis,
1010  CL_IN ClUint32T clientId,
1011  CL_OUT ClEoDataT *pData);
1012 
1013 
1014 
1049  CL_IN ClEoExecutionObjT *pThis,
1051  CL_IN ClUint32T iFuncNum,
1053 
1084  CL_IN ClEoExecutionObjT *pThis,
1086  CL_IN ClUint32T iFuncNum);
1087 
1088 
1116  CL_IN ClEoExecutionObjT *pThis,
1117  CL_IN ClUint32T type,
1118  CL_IN void *pData);
1119 
1120 
1121 
1149  CL_IN ClUint32T type,
1150  CL_OUT void **data);
1151 
1152 
1153 
1176  CL_IN ClIocPortT iocPort);
1177 
1178 
1179 
1205  CL_OUT ClIocPortT *pIocPort);
1206 
1207 
1208 
1232  CL_IN ClEoExecutionObjT* eoObj);
1233 
1234 
1235 
1260  CL_OUT ClEoExecutionObjT** pEOObj);
1261 
1262 
1287  CL_IN ClEoExecutionObjT *pThis);
1288 
1289 
1290 
1291 
1292 /***********************************************************************/
1293 /* external symbols we expect here */
1294 /***********************************************************************/
1295 
1296 /*
1297  * This is the configuration for an EO. Since we can only do one EO
1298  * per process in RC1, this can be here. But when support for multiple
1299  * EOs per process shows up, this has to be fixed in some way.
1300  */
1301 
1302 extern ClEoConfigT clEoConfig;
1303 
1304 /*
1305  * The list of libraries to initialize and finalize. The order of elements in
1306  * the array are as follows:
1307  *
1308  * Basic and mandatory libs in clEoBasicLibs[]. These have to be set to
1309  * CL_TRUE:
1310  * Osal
1311  * Timer
1312  * Buffer
1313  * Ioc
1314  * Rmd
1315  * Eo
1316  *
1317  * Basic and optional libs in clEoBasicLibs[]. These can be CL_TRUE or
1318  * CL_FALSE:
1319  * Om
1320  * Hal
1321  * Dbal
1322  *
1323  * These are the really optional client libs in clEoClientLibs[]. These
1324  * can be either CL_TRUE or CL_FALSE:
1325  * Cor
1326  * Cm
1327  * Name
1328  * Log
1329  * Trace
1330  * Diag
1331  * Txn
1332  * Hpi
1333  * Cli
1334  * Alarm
1335  * Gms
1336  */
1337 
1338 extern ClUint8T clEoBasicLibs[];
1339 
1340 extern ClUint8T clEoClientLibs[];
1341 
1342 
1343 typedef enum
1344 {
1345  CL_EO_CRASH_DEADLOCK,
1346  CL_EO_CRASH_HUNG_SYSCALL,
1347 } ClEoCrashReasonT;
1348 
1349 typedef struct ClEoCrashNotificationT
1350 {
1351  ClEoCrashReasonT reason;
1352  pid_t pid;
1353  ClOsalTaskIdT tid;
1354  ClTimeT interval;
1355  const ClCharT *compName;
1356 } ClEoCrashNotificationT;
1357 
1358 typedef ClEoCrashNotificationT ClEoCrashDeadlockT;
1359 
1360 typedef struct ClEoCrashHungSyscall
1361 {
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 )
1366 
1367  ClEoCrashNotificationT crash;
1368  ClUint32T mask;
1369 } ClEoCrashHungSyscallT;
1370 
1371 typedef void (*ClEoCrashNotificationCallbackT)(const ClEoCrashNotificationT *crash);
1372 /*
1373  * Register a callback for crash notifications called on forced process asserts/aborts
1374  * during deadlock or any other reason
1375  */
1376 extern ClRcT clEoCrashNotificationRegister(ClEoCrashNotificationCallbackT callback);
1377 
1378 #ifdef __cplusplus
1379 }
1380 
1381 #endif
1382 
1383 
1384 #endif /* _CL_EO_API_H_ */
1385 
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

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