diff --git a/coordinator/config.lua b/coordinator/config.lua index c293fa2..a29bb46 100644 --- a/coordinator/config.lua +++ b/coordinator/config.lua @@ -8,7 +8,7 @@ config.SCADA_SV_LISTEN = 16101 config.SCADA_API_LISTEN = 16200 -- max trusted modem message distance (0 to disable check) config.TRUSTED_RANGE = 0 --- time in seconds (>= 1) before assuming a remote device is no longer active +-- time in seconds (>= 2) before assuming a remote device is no longer active config.COMMS_TIMEOUT = 5 -- expected number of reactor units, used only to require that number of unit monitors diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 46f907a..8aa0d79 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -43,7 +43,7 @@ cfv.assert_port(config.SCADA_SV_LISTEN) cfv.assert_port(config.SCADA_API_LISTEN) cfv.assert_type_int(config.TRUSTED_RANGE) cfv.assert_type_num(config.COMMS_TIMEOUT) -cfv.assert_min(config.COMMS_TIMEOUT, 1) +cfv.assert_min(config.COMMS_TIMEOUT, 2) cfv.assert_type_int(config.NUM_UNITS) cfv.assert_type_bool(config.RECOLOR) cfv.assert_type_num(config.SOUNDER_VOLUME) diff --git a/reactor-plc/config.lua b/reactor-plc/config.lua index adc9b35..f3cf0f6 100644 --- a/reactor-plc/config.lua +++ b/reactor-plc/config.lua @@ -11,7 +11,7 @@ config.SERVER_PORT = 16000 config.LISTEN_PORT = 14001 -- max trusted modem message distance (0 to disable check) config.TRUSTED_RANGE = 0 --- time in seconds (>= 1) before assuming a remote device is no longer active +-- time in seconds (>= 2) before assuming a remote device is no longer active config.COMMS_TIMEOUT = 5 -- log path diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index e78b1b5..584afbe 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -33,7 +33,7 @@ cfv.assert_port(config.SERVER_PORT) cfv.assert_port(config.LISTEN_PORT) cfv.assert_type_int(config.TRUSTED_RANGE) cfv.assert_type_num(config.COMMS_TIMEOUT) -cfv.assert_min(config.COMMS_TIMEOUT, 1) +cfv.assert_min(config.COMMS_TIMEOUT, 2) cfv.assert_type_str(config.LOG_PATH) cfv.assert_type_int(config.LOG_MODE) diff --git a/rtu/config.lua b/rtu/config.lua index afd94cf..96b26ee 100644 --- a/rtu/config.lua +++ b/rtu/config.lua @@ -8,7 +8,7 @@ config.SERVER_PORT = 16000 config.LISTEN_PORT = 15001 -- max trusted modem message distance (< 1 to disable check) config.TRUSTED_RANGE = 0 --- time in seconds (>= 1) before assuming a remote device is no longer active +-- time in seconds (>= 2) before assuming a remote device is no longer active config.COMMS_TIMEOUT = 5 -- log path diff --git a/rtu/startup.lua b/rtu/startup.lua index d036203..76203a3 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -44,7 +44,7 @@ cfv.assert_port(config.SERVER_PORT) cfv.assert_port(config.LISTEN_PORT) cfv.assert_type_int(config.TRUSTED_RANGE) cfv.assert_type_num(config.COMMS_TIMEOUT) -cfv.assert_min(config.COMMS_TIMEOUT, 1) +cfv.assert_min(config.COMMS_TIMEOUT, 2) cfv.assert_type_str(config.LOG_PATH) cfv.assert_type_int(config.LOG_MODE) cfv.assert_type_table(config.RTU_DEVICES) diff --git a/supervisor/config.lua b/supervisor/config.lua index bbf4175..47d530d 100644 --- a/supervisor/config.lua +++ b/supervisor/config.lua @@ -6,7 +6,7 @@ config.SCADA_DEV_LISTEN = 16000 config.SCADA_SV_LISTEN = 16100 -- max trusted modem message distance (0 to disable check) config.TRUSTED_RANGE = 0 --- time in seconds (>= 1) before assuming a remote device is no longer active +-- time in seconds (>= 2) before assuming a remote device is no longer active config.PLC_TIMEOUT = 5 config.RTU_TIMEOUT = 5 config.CRD_TIMEOUT = 5 diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 037b62b..e04f6b6 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -31,11 +31,11 @@ cfv.assert_port(config.SCADA_DEV_LISTEN) cfv.assert_port(config.SCADA_SV_LISTEN) cfv.assert_type_int(config.TRUSTED_RANGE) cfv.assert_type_num(config.PLC_TIMEOUT) -cfv.assert_min(config.PLC_TIMEOUT, 1) +cfv.assert_min(config.PLC_TIMEOUT, 2) cfv.assert_type_num(config.RTU_TIMEOUT) -cfv.assert_min(config.RTU_TIMEOUT, 1) +cfv.assert_min(config.RTU_TIMEOUT, 2) cfv.assert_type_num(config.CRD_TIMEOUT) -cfv.assert_min(config.CRD_TIMEOUT, 1) +cfv.assert_min(config.CRD_TIMEOUT, 2) cfv.assert_type_int(config.NUM_REACTORS) cfv.assert_type_table(config.REACTOR_COOLING) cfv.assert_type_str(config.LOG_PATH)