OpenClovis Logo

clTcUtilsApi.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 
32 #ifndef TC_UTILS_API_H
33 #define TC_UTILS_API_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #include <clAmsTypes.h>
40 
44 #define TC_MAX_STR_LENGTH 256
45 
52 typedef enum ClTcParamTypeE
53 {
54  TC_PARAM_NONE,
55  TC_PARAM_STRING,
56  TC_PARAM_INT32,
57  TC_PARAM_FLOAT
59 
67 typedef union ClTcParamValU
68 {
69  ClInt32T int_val;
70  double flt_val;
71  ClCharT str_val[TC_MAX_STR_LENGTH];
73 
82 typedef struct ClTcParamT
83 {
89  ClInt32T id; /* short cut to avoid strcmps */
97 
104 typedef struct ClTcParamListT
105 {
106  ClAmsHAStateT ha_state;/* unsure if this is needed yet */
107  ClInt32T num_params;
108  ClTcParamT *params;
110 
111 
142 int
144  ClCharT *file_path,
145  ClCharT *file_name,
146  ClCharT *subsystem_name,
147  ClCharT *test_case_name,
148  ClTcParamListT *param_list );
149 
176 int
178  ClAmsCSIDescriptorT *csi_desc,
179  ClCharT *subsystem_name,
180  ClCharT *test_case_name,
181  ClTcParamListT *param_list );
182 
221  const ClCharT *subsystem,
222  const ClCharT *test_name,
223  int (*func_to_register)(ClTcParamListT *param_list) );
224 
247 void clTcFinalize ( void );
248 
249 
287 int clTcActivate ( ClAmsCSIDescriptorT *csi_desc, ClAmsHAStateT ha_state );
288 
289 //
290 //Function : clTcDeactivate
291 //
292 //Description: Set the tc_run_test_flag to false and frees up resources
293 //allocated during activate
294 //Input : none
295 //
296 //Returns : none
297 
298 void clTcDeactivate ( void );
299 
300 
332 void clTcRun ( void );
333 
334 
359 void clTcPrintParams ( void );
360 
361 #ifdef __cplusplus
362 }
363 #endif
364 
365 #endif /* TC_UTILS_API_H */
366 
void clTcRun(void)
API called to activate Test Lifecycle Control (TLC) control loop.
int clTcActivate(ClAmsCSIDescriptorT *csi_desc, ClAmsHAStateT ha_state)
API called to start the test case registered by the user in clTcInitialze.
struct ClTcParamT ClTcParamT
Basic structure to store the parsed runtime configuration paramater, by TLC.
union ClTcParamValU ClTcParamValU
Union to store parsed runtime configuration paramater value, by TLC.
struct ClTcParamListT ClTcParamListT
List to store all the parsed runtime configuration paramaters, by TLC.
void clTcFinalize(void)
Stop the Test Lifecyle Control (TLC) control loop.
int clTcParseConfigFile(ClCharT *file_path, ClCharT *file_name, ClCharT *subsystem_name, ClCharT *test_case_name, ClTcParamListT *param_list)
Parse a file containing runtime paramaters for a test case.
int clTcParseWorkLoad(ClAmsCSIDescriptorT *csi_desc, ClCharT *subsystem_name, ClCharT *test_case_name, ClTcParamListT *param_list)
Wrapper function for clTcParsConfigFile, called with the AMF CSI descriptor.
void clTcPrintParams(void)
Print utility that prints the parsed runtime configuration parameters.
ClTcParamTypeE
Current paramater types supported by TLC.
Definition: clTcUtilsApi.h:53
int clTcInitialize(const ClCharT *subsystem, const ClCharT *test_name, int(*func_to_register)(ClTcParamListT *param_list))
Initialize Test Lifecycle Control (TLC) infrastructure and register test case start function.
#define TC_MAX_STR_LENGTH
Default size of all strings used within the TLC infrastructure.
Definition: clTcUtilsApi.h:44
Union to store parsed runtime configuration paramater value, by TLC.
Definition: clTcUtilsApi.h:68
Basic structure to store the parsed runtime configuration paramater, by TLC.
Definition: clTcUtilsApi.h:83
ClTcParamValU value
parameter value (see ClTcParamValU)
Definition: clTcUtilsApi.h:95
ClCharT name[TC_MAX_STR_LENGTH]
parameter name
Definition: clTcUtilsApi.h:86
ClTcParamTypeE type
parameter type (see ClTcParamTypeE)
Definition: clTcUtilsApi.h:92
ClInt32T id
paramter id; has the same meaning as paramater name, must be unique
Definition: clTcUtilsApi.h:89
List to store all the parsed runtime configuration paramaters, by TLC.
Definition: clTcUtilsApi.h:105

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