OpenClovis Logo

clEoConfigApi.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 : clEoConfigApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  * This header contains Execution Object [EO] config definitions.
27  *
28  *
29  *****************************************************************************/
30 
45 #ifndef _CL_EO_CONFIG_API_H_
46 #define _CL_EO_CONFIG_API_H_
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 #include <clCommon.h>
53 
54 
55 /******************************************************************************
56  * Constant and Macro Definitions
57  *****************************************************************************/
58 
63 typedef ClUint64T ClEoIdT;
64 
68 #define CL_EO_MAX_NAME_LEN 32
72 #define CL_EO_DEFAULT_THREADS 1
73 
77 #define CL_EO_NAME clEoNameGet()
78 
83 #define CL_EO_DEFAULT_NAME "3RD_PARTY_COMP"
84 
85 
86 
87 /******************************************************************************
88  * Data Types
89  *****************************************************************************/
90 
94 typedef enum {
95 
100 
105 
110 
115 
120 
125 
130 
135 
140 
145 
146 
147 } ClEoStateT;
148 
149 typedef enum {
150 
157 
165 
167 
168 typedef enum {
169 
175 
181 
187 
189 
194 typedef struct {
195 
200 
205 
207 
214 
218  CL_IN ClUint32T argc,
219 
223  CL_IN char *argv[]);
224 
225 
226 
241 
245  CL_IN ClEoStateT state);
246 
251 
256 
260  CL_OUT ClEoSchedFeedBackT *schFeedback);
261 
265 typedef ClRcT (*ClEoCustomActionT)(ClCompIdT compId, ClWaterMarkIdT wmId,
266  ClWaterMarkT *pWaterMark, ClEoWaterMarkFlagT wmType, ClEoActionArgListT argList);
267 
272 typedef struct {
273 
277  ClCharT EOname[CL_EO_MAX_NAME_LEN];
278 
283 
287  ClUint32T noOfThreads;
288 
293 
297  ClUint32T maxNoClients;
298 
303 
309 
315 
321 
327 
333 
334  ClBoolT needSerialization;
335 
336 }ClEoConfigT;
337 
341 ClRcT clEoProgNameGet(ClCharT *pName,ClUint32T maxSize);
342 
346 ClCharT* clEoNameGet(void);
347 
348 /***********************************************************************/
349 /* external symbols we expect here */
350 /***********************************************************************/
351 
352 /*
353  * This is the configuration for an EO. Since we can only do one EO
354  * per process in RC1, this can be here. But when support for multiple
355  * EOs per process shows up, this has to be fixed in some way.
356  */
357 
358 extern ClEoConfigT clEoConfig;
359 
360 extern ClCharT *clEoProgName;
361 
362 #ifdef __cplusplus
363 }
364 
365 #endif
366 
367 #endif /* _CL_EO_CONFIG_API_H_ */
368 
Typical defines found in any software project.
#define CL_FALSE
define the False
Definition: clCommon.h:61
#define CL_TRUE
define the Truth
Definition: clCommon.h:59
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
ClPtrT * ClEoActionArgListT
The argument list that can be provided to the custom action taken on water mark hit.
Definition: clCommon.h:537
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
ClCompIdT
Clovis Component Ids.
Definition: clCommon.h:304
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClRcT(* ClEoAppCreateCallbackT)(CL_IN ClUint32T argc, CL_IN char *argv[])
The application should initialize itself in this function callback.
Definition: clEoConfigApi.h:213
ClEoStateT
This is the EO state enumeration.
Definition: clEoConfigApi.h:94
ClUint64T ClEoIdT
The type of the EOId, assigned to an EO as part of registration to the Component Manager.
Definition: clEoConfigApi.h:63
ClRcT(* ClEoAppStateChgCallbackT)(CL_IN ClEoStateT state)
The application should change the state the service it is providing.
Definition: clEoConfigApi.h:240
ClRcT clEoProgNameGet(ClCharT *pName, ClUint32T maxSize)
Gives the name of the executable for the EO.
ClEoApplicationTypeT
Definition: clEoConfigApi.h:149
ClRcT(* ClEoCustomActionT)(ClCompIdT compId, ClWaterMarkIdT wmId, ClWaterMarkT *pWaterMark, ClEoWaterMarkFlagT wmType, ClEoActionArgListT argList)
The application performs custom action in this callback.
Definition: clEoConfigApi.h:265
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
ClEoPollingTypeT
Definition: clEoConfigApi.h:168
#define CL_EO_MAX_NAME_LEN
Maximum length of the name of the EO.
Definition: clEoConfigApi.h:68
ClCharT * clEoNameGet(void)
Gives the name of the EO.
@ CL_EO_STATE_ACTIVE
This indicates that the EO is in active state.
Definition: clEoConfigApi.h:104
@ CL_EO_STATE_STOP
This indicates that the EO is in stopped state.
Definition: clEoConfigApi.h:119
@ CL_EO_STATE_FAILED
This indicates that the EO is in failed state.
Definition: clEoConfigApi.h:134
@ CL_EO_STATE_STDBY
This indicates that the EO is in standby state.
Definition: clEoConfigApi.h:109
@ CL_EO_STATE_RESUME
This indicates that the state of the EO is resumed from the standby state.
Definition: clEoConfigApi.h:129
@ CL_EO_STATE_SUSPEND
This indicates that the EO is in suspended state.
Definition: clEoConfigApi.h:114
@ CL_EO_STATE_BITS
All states.
Definition: clEoConfigApi.h:144
@ CL_EO_STATE_INIT
This indicates the initial state of the EO.
Definition: clEoConfigApi.h:99
@ CL_EO_STATE_THREAD_SAFE
This indicates that the EO is thread safe.
Definition: clEoConfigApi.h:139
@ CL_EO_STATE_KILL
This indicates that the EO is in killed state.
Definition: clEoConfigApi.h:124
@ CL_EO_USE_THREAD_FOR_APP
Give main thread to user application.
Definition: clEoConfigApi.h:164
@ CL_EO_USE_THREAD_FOR_RECV
Use main thread for RMD message receive.
Definition: clEoConfigApi.h:156
@ CL_EO_DONT_POLL
This indicated that the Component Manager will stop heartbeat of an EO if CL_CPM_DONT_POLL is receive...
Definition: clEoConfigApi.h:174
@ CL_EO_BUSY_POLL
This indicated that the Component Manager will increase heartbeat timeout to maximum polling timeout.
Definition: clEoConfigApi.h:180
@ CL_EO_DEFAULT_POLL
This indicated that the Component Manager will continue with default heartbeat timeout.
Definition: clEoConfigApi.h:186
ClUint32T ClIocPortT
The IOC communication port.
Definition: clIocApi.h:348
ClOsalThreadPriorityT
The following enumeration type contains the various thread priorities.
Definition: clOsalApi.h:295
Feedback sent by the software component being polled in response of heartbeat [is-Alive].
Definition: clEoConfigApi.h:194
ClRcT status
This indicates the health of the EO.
Definition: clEoConfigApi.h:204
ClEoPollingTypeT freq
This indicates the polling Type ClEoPollingTypeT.
Definition: clEoConfigApi.h:199
This structure is passed during the clEoCreate API and contains the EO related configuration paramete...
Definition: clEoConfigApi.h:272
ClEoApplicationTypeT appType
Indicates whether the application needs main thread or not.
Definition: clEoConfigApi.h:302
ClOsalThreadPriorityT pri
Indicates the EO thread priority.
Definition: clEoConfigApi.h:282
ClIocPortT reqIocPort
The requested IOC communication port.
Definition: clEoConfigApi.h:292
ClEoCustomActionT clEoCustomAction
Application function that has to be called when a Water Mark has been hit.
Definition: clEoConfigApi.h:332
ClUint32T noOfThreads
Indicates the number of RMD threads.
Definition: clEoConfigApi.h:287
ClEoAppDeleteCallbackT clEoDeleteCallout
Application function that is called when EO needs to be terminated.
Definition: clEoConfigApi.h:314
ClUint32T maxNoClients
Indicates the maximum number of EO client.
Definition: clEoConfigApi.h:297
ClEoAppStateChgCallbackT clEoStateChgCallout
Application function that is called when EO is moved into the suspended state.
Definition: clEoConfigApi.h:320
ClEoAppHealthCheckCallbackT clEoHealthCheckCallout
Application function that is called when EO healthcheck is performed by Component Manager.
Definition: clEoConfigApi.h:326
ClEoAppCreateCallbackT clEoCreateCallout
Application function that is called from main during the initialization process.
Definition: clEoConfigApi.h:308

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