File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,12 @@ def initializer():
6161 device_config .configuration .ip_address , device_config .configuration .port )
6262
6363 def error_handler ():
64- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
64+ if device_config .configuration .source == 0 :
65+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
66+ "192.168.193.125" ])
67+ else :
68+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
69+ device_config .configuration .ip_address ])
6570
6671 return ConfigurableDevice (
6772 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ def initializer():
5353 client = ModbusTcpClient_ (device_config .configuration .ip_address , device_config .configuration .port )
5454
5555 def error_handler ():
56- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
56+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
57+ device_config .configuration .ip_address ])
5758
5859 return ConfigurableDevice (
5960 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -63,7 +63,12 @@ def initializer():
6363 device_config .configuration .port )
6464
6565 def error_handler ():
66- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
66+ if HuaweiType (device_config .configuration .type ) == HuaweiType .Huawei_Kit :
67+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
68+ "192.168.193.126" ])
69+ else :
70+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
71+ device_config .configuration .ip_address ])
6772
6873 return ConfigurableDevice (
6974 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ def initializer():
5454 device_config .configuration .port )
5555
5656 def error_handler ():
57- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
57+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
58+ device_config .configuration .ip_address ])
5859
5960 return ConfigurableDevice (
6061 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ def initializer():
3232 client = modbus .ModbusTcpClient_ ("192.168.193.19" , 8899 )
3333
3434 def error_handler ():
35- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
35+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
36+ "192.168.193.19" ])
3637
3738 return ConfigurableDevice (
3839 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ def initializer():
4343 client = modbus .ModbusTcpClient_ ("192.168.193.15" , 8899 )
4444
4545 def error_handler ():
46- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
46+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
47+ "192.168.193.15" ])
4748
4849 return ConfigurableDevice (
4950 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ def initializer():
5050 client = ModbusTcpClient_ (device_config .configuration .ip_address , device_config .configuration .port )
5151
5252 def error_handler ():
53- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
53+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
54+ device_config .configuration .ip_address ])
5455
5556 return ConfigurableDevice (
5657 device_config = device_config ,
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ def initializer():
3232 client = modbus .ModbusTcpClient_ ("192.168.193.13" , 8899 )
3333
3434 def error_handler ():
35- run_command (f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" )
35+ run_command ([f"{ Path (__file__ ).resolve ().parents [4 ]} /modules/common/restart_protoss_admin" ,
36+ "192.168.193.13" ])
3637
3738 return ConfigurableDevice (
3839 device_config = device_config ,
You can’t perform that action at this time.
0 commit comments