Доработка. Отслеживание ошибок во входных пакетах
This commit is contained in:
@@ -4,6 +4,7 @@ extends Control
|
||||
func on_line_changed(unit, addr): Log.message(Logger.INFO, 'Состояние связи: %s %s' % [unit, addr])
|
||||
func on_command_fail(unit, addr): Log.message(Logger.ERROR, 'Ошибка: команда не выполнена: %s %s' % [unit, addr])
|
||||
func on_threats_changed(th: Object, msg: String): Log.message(Logger.INFO, '%s: %s' % [msg, th.to_string()])
|
||||
func on_parse_error(unit, msg: String): Log.message(Logger.ERROR, '%s: %s' % [unit.to_string(), msg])
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -68,8 +68,10 @@ func on_timer_check_lost(time_lost: int, threats: Dictionary):
|
||||
|
||||
## Производит приём целей
|
||||
func on_data_capsrpb_received(unit: capsrpb.CapsRpb, threats: Dictionary):
|
||||
if not unit.json_dic.has('mis'):
|
||||
return
|
||||
if not unit.json_dic.has('ts'): return
|
||||
if unit.json_dic['ts'] != 5: return
|
||||
if not unit.json_dic.has('mis'): return
|
||||
|
||||
var mis = unit.json_dic['mis']
|
||||
var sz: = threats.size()
|
||||
for dic_th in mis:
|
||||
|
||||
Reference in New Issue
Block a user