#ifndef _UT_PTZ_H_
#define _UT_PTZ_H_

#define PTZ_CTRL_CMD_LEN		6//FIXME sizeof(Ctrl_cmd_t)
#define MAX_PTZ_POSITION_LEN	128
#define MAX_PTZ_TRACKSEQ_LEN	248

typedef struct 
{
	struct{
		U8	ChannelNo; 				// 0- portnum-1 , which PTZ device
		U8  COMMNo;		  // 0
		U8  PanType;
		U8  PanCmd;		  //PTZ command
		U8  Data1;		   // parameter: PTZ speed or preset position , or call track
		U8  Data2;															   
	}Ctrl_cmd_t;

	union{
		S8 PrePosDescr[MAX_PTZ_POSITION_LEN];
		S8 TrackSeq[MAX_PTZ_TRACKSEQ_LEN];
	}Ctrl_seq_t;

}CAM_PAN_CTRL;



//CAM Command
#define	CAM_UP					1	//云台上
#define	CAM_DOWN					2	//云台下	
#define	CAM_LEFT					3	//云台左
#define	CAM_RIGHT				4	//云台右
#define	CAM_FOCUSADD				5	//聚焦+
#define	CAM_FOCUSSUB				6	//聚焦-
#define	CAM_IRISADD				7	//光圈+
#define	CAM_IRISSUB				8	//光圈-
#define	CAM_ZOOMADD				9	//变倍+
#define	CAM_ZOOMSUB				10	//变倍-
#define	CAM_AUTOOPEN				11	//自动开
#define	CAM_AUTOCLOSE			12	//自动关
#define	CAM_LAMPOPEN				13	//灯光开
#define	CAM_LAMPCLOSE			14	//灯光关
#define	CAM_BRUSHOPEN			15	//雨刮开
#define	CAM_BRUSHCLOSE			16	//雨刮关
#define	CAM_WATEROPEN			17	//放水开
#define	CAM_WATERCLOSE			18	//放水关
#define	CAM_PRESET				19	//预置 + 号
#define	CAM_CALL					20	//调用 + 号
#define	CAM_STOP					21	//停止
#define	CAM_UP_STOP				30	//云台上-停	
#define	CAM_DOWN_STOP			31	//云台下-停	
#define	CAM_LEFT_STOP			32	//云台左-停
#define	CAM_RIGHT_STOP			33	//云台右-停
#define	CAM_FOCUSADD_STOP		34	//聚焦+ -停
#define	CAM_FOCUSSUB_STOP		35	//聚焦- -停
#define	CAM_IRISADD_STOP			36	//光圈+ -停
#define	CAM_IRISSUB_STOP			37	//光圈- -停
#define	CAM_ZOOMADD_STOP			38	//变倍+ -停
#define	CAM_ZOOMSUB_STOP			39	//变倍- -停	

/* Added for Hik start */
#define CAM_FAN_PWRON		   41	/* 接通风扇开关 */
#define CAM_HEATER_PWRON		42	/* 接通加热器开关 */
#define CAM_AUX_PWRON1		  43	/* 接通辅助设备开关1 */
#define CAM_AUX_PWRON2		  44	/* 接通辅助设备开关2 */
#define CAM_AUTO_ZOOM		   45	/* 开自动焦距(自动倍率) */
#define CAM_AUTO_FOCUS		  46	/* 开自动调焦 */
#define CAM_AUTO_IRIS		   47	/* 开自动光圈 */
#define CAM_UP_LEFT			 48	/* 云台以SS的速度上仰和左转 */
#define CAM_UP_RIGHT			49	/* 云台以SS的速度上仰和右转 */
#define CAM_DOWN_LEFT		   50	/* 云台以SS的速度下俯和左转 */
#define CAM_DOWN_RIGHT		  51	/* 云台以SS的速度下俯和右转 */
#define CAM_FAN_PWROFF		  52	/* 断开风扇开关 */
#define CAM_HEATER_PWROFF	   53	/* 断开加热器开关 */
#define CAM_AUX_PWROFF1		 54	/* 断开辅助设备开关1 */
#define CAM_AUX_PWROFF2		 55	/* 断开辅助设备开关2 */
#define CAM_AUTO_ZOOM_CLOSE	 56	/* 关自动焦距(自动倍率) */
#define CAM_AUTO_FOCUS_CLOSE	57	/* 关自动调焦 */
#define CAM_AUTO_IRIS_CLOSE	 58	/* 关自动光圈 */
#define CAM_UP_LEFT_STOP		59	/* 云台以SS的速度上仰和左转-停 */
#define CAM_UP_RIGHT_STOP	   60	/* 云台以SS的速度上仰和右转-停 */
#define CAM_DOWN_LEFT_STOP	  61	/* 云台以SS的速度下俯和左转-停 */
#define CAM_DOWN_RIGHT_STOP	 62	/* 云台以SS的速度下俯和右转-停 */
/* Added for Hik end */

/* Added by Terry start */
#define CAM_UNSUPPORT			   0x0FF
/* Added by Terry end */

#define CAM_CALLTRACK			   100  //调轨迹

#endif
