local v1 = ReqBody.value1
local v2 = ReqBody.value2
local v3 = ReqBody.value3
local MAX_SUBJECT_INDEX = 65535
if type(v1) ~= 'string' then
return {}
end
if v1 == 'stopall' then
if type(v2) == 'string' then
return {}
end
else
if type(v3) == 'string' and v3 ~= 'stop' and v3 ~= 'assert' and v3 ~= 'deassert' then
return {}
end
if type(v3) ~= 'string' and v2 ~= 'stop' and v2 ~= 'assert' and v2 ~= 'deassert' then
return {}
end
end
if type(v3) == 'string' then
local subject_idx = math.tointeger(v2)
if not subject_idx or v2 ~= tostring(subject_idx) or subject_idx <= 0 or subject_idx > MAX_SUBJECT_INDEX then
return {}
end
if v1 == '0xFFFFFFFF' or v1 == '0x00FFFFFF' then
return {}
end
end
if v1 == 'stopall' and type(v2) ~= 'string' then
return { '0xFFFFFFFF', 0, 0, 0 }
elseif v2 == 'stop' and type(v3) ~= 'string' then
return { v1, 0, 0, 0 }
elseif v2 == 'assert' and type(v3) ~= 'string' then
return { v1, 1, 0, 1 }
elseif v2 == 'deassert' and type(v3) ~= 'string' then
return { v1, 1, 0, 0 }
elseif v3 == 'stop' then
return { v1, 0, v2, 0 }
elseif v3 == 'assert' then
return { v1, 1, v2, 1 }
elseif v3 == 'deassert' then
return { v1, 1, v2, 0 }
else
return {}
end