coso_air780epm/c210m/status.lua

21 lines
563 B
Lua

local _C = {
MSG = {
_default = "未知状态",
[0] = "成功",
[1] = "【数据库】初始化失败",
[2] = "【数据库】状态异常",
[3] = "【数据库】数据初始化失败",
[4] = "【4G网络】联网超时",
[5] = "【OTA】升级中",
[101] = "【OTA】无效的update字段",
[102] = "【OTA】升级请求异常",
}
}
function _C.handling(code)
log.warn(COSO, _C.MSG[code] or _C.MSG._default)
if code == 5 then sys.publish("ota_update") end
end
return _C