Mini Kabibi Habibi

Current Path : C:/Program Files/Smart Professional Surveillance System/PC-NVR/Common/Lua/ptz/
Upload File :
Current File : C:/Program Files/Smart Professional Surveillance System/PC-NVR/Common/Lua/ptz/HAIYU.lua

--����HAIYU����̨Э��
local Protocol = {};

Protocol.Attr = 
{
	Name = "HAIYU",	
	Type = "PTZ",
	Internal = 200,
	CamAddrRange 		= {0x00, 0xFF}, 
	MonAddrRange		= {0x00, 0xFF},	
	PresetRange 		= {0x00, 0xFF},
	TourRange		= {0xFF, 0xFF},
	PatternRange		= {0xFF, 0xFF},
	TileSpeedRange 		= {0xFF, 0xFF},
	PanSpeedRange 		= {0xFF, 0xFF},
	AuxRange 		= {0x01, 0x08},
}

Protocol.CommandAttr =
{
	AddrPos 		= 3, 
	PresetPos 		= 6, 
	TileSpeedPos 		= 6,
	PanSpeedPos 		= 5,
	AuxPos 			= 6,
}

Protocol.Command = 
{
	Start= 
	{
		TileUp 		= "0x40, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x0D",
		TileDown 	= "0x40, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x0D",
		PanLeft 	= "0x40, 0x00, 0x00, 0x50, 0x20, 0x00, 0x00, 0x0D",
		PanRight 	= "0x40, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00, 0x0D",
		LeftUp 		= "0x40, 0x00, 0x00, 0x50, 0x24, 0x00, 0x00, 0x0D",
		LeftDown 	= "0x40, 0x00, 0x00, 0x50, 0x28, 0x00, 0x00, 0x0D",
		RightUp		= "0x40, 0x00, 0x00, 0x50, 0x14, 0x00, 0x00, 0x0D",
		RightDown 	= "0x40, 0x00, 0x00, 0x50, 0x18, 0x00, 0x00, 0x0D",
		ZoomWide 	= "0x40, 0x00, 0x00, 0x4C, 0x03, 0x00, 0x00, 0x0D",
		ZoomTele 	= "0x40, 0x00, 0x00, 0x4C, 0x04, 0x00, 0x00, 0x0D",
		FocusNear	= "0x40, 0x00, 0x00, 0x4C, 0x11, 0x00, 0x00, 0x0D",
		FocusFar 	= "0x40, 0x00, 0x00, 0x4C, 0x08, 0x00, 0x00, 0x0D",
		IrisSmall 	= "0x40, 0x00, 0x00, 0x4C, 0x09, 0x00, 0x00, 0x0D",
		IrisLarge 	= "0x40, 0x00, 0x00, 0x4C, 0x10, 0x00, 0x00, 0x0D",		
		AutoScanOn 	= "0x40, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0D",
		AutoScanOff	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
	},
	Stop = 
	{
		TileUp 		= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		TileDown 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		PanLeft 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		PanRight 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		LeftUp 		= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		LeftDown 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		RightUp		= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		RightDown 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",		
		ZoomWide 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		ZoomTele 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		FocusNear 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		FocusFar 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		IrisSmall 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
		IrisLarge 	= "0x40, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x0D",
	},
}

Protocol.Checksum = function (s)
	s[7] = math.mod((s[3] + s[4] + s[5] + s[6]), 256);
	return s;
end;

Protocol.SpeedProcess = function(s, ver, hor)
	return s;
end;

return Protocol;