1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/wibim-luat-jt808

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
linkin.lua 1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
wibim.zhao@gmail.com Отправлено 15.02.2020 09:44 4ce2b11
require"manage"
module(...,package.seeall)
local smatch,schar = string.match,string.char
local function addparaver()
nvm.set("paraver",nvm.get("paraver")+1)
end
local function qryloc(p)
deveventrsp(p)
-- linkout.locReport(protoair.QRYPOS)
end
local function restore(p)
sys.publish("SVR_RESTORE_IND","SVR")
deveventrsp(p)
end
local setclked
local function datetime(p)
--print("Server datetime p",p.year,p.month,p.day,p.hour,p.min,p.sec)
if not setclked then
misc.setClock(p)
setclked = true
end
end
function procMsg(socketClient)
local r,data
while true do
r,data = socketClient:recv(2000)
if r and data~="timeout" then
log.info("--zbb--linkin.procMsg <<<:",r,string.toHex(data))
local packet = protoairdef.unpack(data)
-- if packet and packet.id and cmds[packet.id] then
-- packet.topic = data.topic
-- cmds[packet.id](packet)
-- if linkout.waitForSend() then return true end
-- end
if linkout.waitForSend() then return true end
else
break
end
end
return data=="timeout" or r
end

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/wibim-luat-jt808.git
git@api.gitlife.ru:oschina-mirror/wibim-luat-jt808.git
oschina-mirror
wibim-luat-jt808
wibim-luat-jt808
master