/*=========================================================================
** Copyright	: Video Surveillance(China) Co. Ltd
** Version	  : 0.1
** File Name	: modules.h
** Description  :
** Creation	 : 9/6/2006
** Modification :
** Owner		:
** ==========================================================================
*/
#ifndef __VS_MOD_DEF_HEADER__
#define __VS_MOD_DEF_HEADER__

#include "ssi_mod.h"
#include "modules.h"

/*
 * modules
 */
#define VS_MOD_MIN		   1

/*
 * Surveillance Server Module
 */
#define VS_MOD_SS_MC		 1		/*Main controller*/
#define VS_MOD_SS_VR		 2		/*Video Recorder*/
#define VS_MOD_SS_MT		 3		/*Network transmitter*/
#define VS_MOD_SS_AD		 4

/*
 * Streaming Server Module
 */
#define VS_MOD_SM_SC		 5		/*Session Controller*/
#define VS_MOD_SM_RTSP	   6		/*RTSP stack*/
#define VS_MOD_SM_CE		 7		/*Content Engine*/

/*
 * VMS Server Module
 */
#define VS_MOD_VMS_AUTH	  8		/*authenticaon and authorization module*/ 


/*
 * Content File Manager Server Module
 */
#define VS_MOD_CTM		  9		/*general*/

/*
 * Metadata Server Module
 */
#define VS_MOD_DBS		   10		/*DBS general*/

/* 
 * !!! When adding or modifying these module macros,
 * please always remember to update macros VS_MOD_MAX and VS_MODNAMES 
 */

#define VS_MOD_COMM_FSM	11	//通用状态机
#define VS_MOD_BSD_DB	12	//VSS BSDDB

#define VS_MOD_RTSP_CLIENT 13

#define VS_MOD_TCP_STREAM	14
#define VS_MOD_TCP_AUDIO	15

#define VS_MOD_TP_BKT_VR	 16		/*BASKET WRITE*/
#define VS_MOD_TP_BKT_PB	 17		/*BASKET PLAYBACK*/

#define VS_MOD_MAX		   18  /* last module + 1 */


#define VS_MODNAMES \
/* 0 */   "",\
/* 1 */   "SS_MC",\
/* 2 */   "SS_VR",\
/* 3 */   "SS_MT",\
/* 4 */   "SS_AD",\
/* 5 */   "SM_SC",\
/* 6 */   "SM_RTSP",\
/* 7 */   "SM_CE",\
/* 8 */   "VMS_A",\
/* 9 */   "CTM",\
/* 10 */  "DBS",\
/*11*/	"FSM",\
/*12*/	"BDB",\
/*13*/	"RTSPC",\
/*14*/	"TS",\
/*15*/	"TA",\
/*16*/	"BKT_VR",\
/*17*/	"BKT_PB",\
/* XX */  "MOD_MAX"





/*
 * Metadata server
 */
#define DBS_ENTRY_TASK			0x160	  /* EPG entry task */


/*
 * Surveillance Server tasks
 */
#define MS_MC_KERNEL			 0x100	  /* main controller kernel task for processing the messages*/
#define MS_MC_TRANSMITTER	 	 0x101	  /* main controller task for communication with VS client*/
#define MS_MC_MDCLIENT	 		 0x102	  /* main controller task for receiving notification from DBS*/
#define MS_VR					0x104	  /* video recorder task */
#define MS_NT					0x105	  /* network transmitter */
#define MS_NT_SDP				0x106	  /* network transmitter socket data poller*/
#define MS_AD_CMD_TRANSMIT		 0x107	  /* Adaptor front end ask */
#define MS_AD_SIGNAL_PROCESS	0x108	  /* Adaptor signal process task */
#define MS_VR_MOUNTPATH		0x109	  /* video recorder path mount task */

#define MS_AD_VIDEO_REQ		 0x110	  /* adaptor video request process */
#define MS_AD_VIDEO_RELAY	   0x111	  /* adaptor video data relay */ 
#define MS_AD_PTZ_RELAY		 0x112	  /* adaptor dahua ptz relay */	  

#define MS_MC_NAT_TRANSMITTER			 0x113	  //路由穿越消息接收模块

#define MS_TCP_STREAM_MSG			 0x114	  //tcp流消息处理任务
#define MS_TCP_STREAM_SERVER		 0x115	  //tcp SERVER
#define MS_TCP_STREAM_RELAY			 0x116	  //tcp流数据处理任务
#define MS_TCP_STREAM_DELCLI			 0x117	  //客户端销毁任务

#define MS_TCP_AUDIO_MSG			 0x124	  //tcp流消息处理任务
#define MS_TCP_AUDIO_SERVER       0x125      /* TCP Audio Server 任务 */
#define MS_TCP_AUDIO_TRANSMIT     0x126      /* TCP Audio Server 传输任务 */

#define MS_SDR_TASK		 0x127	  //写日志

#define MS_BKT_MOUNTPATH		0x128	  /* basket path mount task */

/*
 * Streaming Server tasks
 */
#define SM_TCP_TRANACEIVER_TASK	 0x130	  /* rtsp tcp transceiver task */
#define SM_STREAM_CONTROLLER_MAIN_TASK   0x132	  /* stream controller task */
#define SM_STREAM_CONTROLLER_OPENHOLE_RECV_TASK 0x133 /* openhole msg recv task */
#define SM_STREAM_AGENT_TASK		0x134	  /* stream agent task */


/*
 * VMS Server task
 */
#define VMS_DEV_TASK			  0x14e	 /*network tcp server task*/
#define AAA_TCP_SVR			  0x14f	 /*network tcp server task*/
#define VMS_AUTH_TASK			   0x150	 /*authentication and authorization main task*/ 
#define VMS_TRANS_TASK			  0x151	 /*network transmitter task*/
#define VMS_DBSCLINET_TASK		   0x152	 /*DBS client task*/
#define VMS_ADAPTOR_TASK				 0x153	 /*VMS Adaptor task*/
#define VMS_CONNECTDBS_TASK 0x154	 /*task to connect to sdr*/
#define VMS_HBCLIENT_TASK				 0x155	 /*heart beat client task*/
#define VMS_GETDEV_TASK			  0x156	 /*network tcp server task*/
#define VMS_SDR_TASK				0x157
/*
 * Content File Manager Server tasks
 */
#define CTM_MAIN_TASK			   0x160	  /*CTM MODULE communication task*/
#define CTM_CLEAN_TASK			   0x161	  /*CTM MODULE CLEAN task*/
#define CTM_TRANSLATE_TASK			0x162	  /*CTM MODULE TRANSLATE task*/
#define CTM_RELOADCFG_TASK          0x163

/*
 * logging tasks
 */
#define VS_LOG_TASK			   0x190	  /* UTSee Log task */


#define FTP_CREATE_TASK			0x200	 

#define VMS_SEND_THREAD_BASE		0x201	/*network tcp send thread base*/
								//0X201-0X210


#endif /*  __VS_MOD_DEF_HEADER__ */


