示例#1
0
int main(int argc,char **argv)
{
	pthread_t diskTid[nCHANNEL];					/*磁盘管理线程,一个通道对应一个线程*/
	pthread_t bsTid;								/*后台线程,一个*/
	pthread_t plhTid[nCHANNEL];					/*分析线程,一个通道对应一个线程*/
	pthread_t debugTid;							/*telnet调试线程*/
	pthread_t appTid[nCHANNEL];
	
	xml_deviceConfigInit();		
#if 1
	xml_fileRecordInit();

	dm_discManagerInit(&diskTid[0], &diskTid[1]);
	sleep(1);
	dc_debugConsoleInit(&debugTid);
	sleep(1);
	
	bs_backStageInit(&bsTid);
	plh_init(&plhTid[0], &plhTid[1]);
	printf("111111111111111111111111111\n\n");
	app_Init(&appTid[0], &appTid[1]);

#endif	

	while(1)
	{
		sleep(3);
	};
	return 0;
}
示例#2
0
//--------------------------------------------------------------------------------------------------
static app_Ref_t GetAppRef
(
    const char * appNamePtr     ///< [IN] App name
)
{
    app_Ref_t appRef;

    char configPath[LIMIT_MAX_PATH_BYTES] = "";
    INTERNAL_ERR_IF(le_path_Concat("/",
                                  configPath,
                                  LIMIT_MAX_PATH_BYTES,
                                  "apps",
                                  appNamePtr,
                                  (char*)NULL) != LE_OK,
                    "Buffer size too small.");

    app_Init();

    appRef = app_Create(configPath);
    LE_FATAL_IF(appRef == NULL, "There was an error when getting app info for '%s'.", appNamePtr);

    return appRef;
}