37 lines
878 B
Python
37 lines
878 B
Python
|
|
|
|
class EcmService:
|
|
"""事件处理服务
|
|
"""
|
|
|
|
@staticmethod
|
|
def dispatch_dahua_event(data:dict):
|
|
"""分发大华事件进行处理
|
|
"""
|
|
pass
|
|
|
|
|
|
@staticmethod
|
|
def dispatch_xunxi_event(data:dict):
|
|
"""分发寻息事件进行处理
|
|
"""
|
|
if data.type == 'rail':
|
|
if data.data.type == 1:
|
|
# 围栏进入
|
|
pass
|
|
elif data.data.type == 2:
|
|
# 围栏离开
|
|
pass
|
|
elif data.type == 'onKeyAlarm':
|
|
# 一键呼救
|
|
pass
|
|
elif data.type == 'onOffLine':
|
|
if data.data.online:
|
|
# 标签定位在线
|
|
pass
|
|
else:
|
|
# 标签定位离线
|
|
pass
|
|
elif data.type == 'lowpower':
|
|
# 低电量
|
|
pass |