Mini Kabibi Habibi
local Protocol = {};
Protocol.Attr =
{
Name = "SHARP",
Type = "PTZ",
Internal = 200,
CamAddrRange = {0x00, 0xFF},
MonAddrRange = {0x00, 0xFF},
PresetRange = {0xFF, 0xFF},
TourRange = {0xFF, 0xFF},
PatternRange = {0xFF, 0xFF},
TileSpeedRange = {0xFF, 0xFF},
PanSpeedRange = {0xFF, 0xFF},
AuxRange = {0xFF, 0xFF},
}
Protocol.CommandAttr =
{
AddrPos = 4,
PresetPos = 5,
TileSpeedPos = 5,
PanSpeedPos = 5,
AuxPos = 5,
}
Protocol.Command =
{
Start=
{
TileUp = "0x30, 0x30, 0x55, 0x00, 0x00, 0x00, 0x7E",
TileDown = "0x30, 0x30, 0x44, 0x00, 0x00, 0x00, 0x7E",
PanLeft = "0x30, 0x30, 0x4C, 0x00, 0x00, 0x00, 0x7E",
PanRight = "0x30, 0x30, 0x52, 0x00, 0x00, 0x00, 0x7E",
ZoomWide = "0x30, 0x30, 0x49, 0x00, 0x00, 0x00, 0x7E",
ZoomTele = "0x30, 0x30, 0x4F, 0x00, 0x00, 0x00, 0x7E",
FocusNear = "0x30, 0x30, 0x4E, 0x00, 0x00, 0x00, 0x7E",
FocusFar = "0x30, 0x30, 0x46, 0x00, 0x00, 0x00, 0x7E",
IrisSmall = "0x30, 0x30, 0x0A, 0x00, 0x00, 0x00, 0x7E",
IrisLarge = "0x30, 0x30, 0x0B, 0x00, 0x00, 0x00, 0x7E",
},
Stop =
{
TileUp = "0x30, 0x30, 0x11, 0x00, 0x00, 0x00, 0x7E",
TileDown = "0x30, 0x30, 0x11, 0x00, 0x00, 0x00, 0x7E",
PanLeft = "0x30, 0x30, 0x13, 0x00, 0x00, 0x00, 0x7E",
PanRight = "0x30, 0x30, 0x13, 0x00, 0x00, 0x00, 0x7E",
ZoomWide = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
ZoomTele = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
FocusNear = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
FocusFar = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
IrisSmall = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
IrisLarge = "0x30, 0x30, 0x16, 0x00, 0x00, 0x00, 0x7E",
},
}
Protocol.Checksum = function (s)
return s;
end;
Protocol.CamAddrProcess = function(s, addr)
local gg = math.mod(addr, 10) + 0x30;
addr = math.floor(addr / 10);
local ss = math.mod(addr, 10) + 0x30;
addr = math.floor(addr / 10);
local bb = math.mod(addr, 10) + 0x30;
s[6] = gg;
s[5] = ss;
s[4] = bb;
return s;
end;
Protocol.SpeedProcess = function(s, ver, hor)
return s;
end;
return Protocol;