Index: tests/dg_tests.py =================================================================== diff -u -r32acd47e8becfebc92e9e65720d41a4dd4eab864 -r7a5d111bbe111ee305ab9da5ee85b98beabe20f4 --- tests/dg_tests.py (.../dg_tests.py) (revision 32acd47e8becfebc92e9e65720d41a4dd4eab864) +++ tests/dg_tests.py (.../dg_tests.py) (revision 7a5d111bbe111ee305ab9da5ee85b98beabe20f4) @@ -1,19 +1,20 @@ ########################################################################### # -# Copyright (c) 2022-2023 Diality Inc. - All Rights Reserved. +# Copyright (c) 2022-2024 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file dg_tests.py # # @author (last) Dara Navaei -# @date (last) 21-Jul-2023 +# @date (last) 24-Oct-2024 # @author (original) Dara Navaei # @date (original) 16-Jan-2022 # ############################################################################ import os +import time from dialin.dg.dialysate_generator import DG from dialin.hd.hemodialysis_device import HD @@ -362,8 +363,11 @@ def get_blood_leak_info(): - info = ('Blood_leak_state, {}, Blood_leak_status, {}, ' - .format(hd.blood_leak.get_blood_leak_state(), hd.blood_leak.get_blood_leak_status())) + info = ('Blood_leak_state, {}, Blood_leak_status, {}, Blood_leak_intensity, {}, Blood_leak_detect, {}, ' + 'Blood_leak_int_mv_avg, {}, ' + .format(hd.blood_leak.get_blood_leak_state(), hd.blood_leak.get_blood_leak_status(), + hd.blood_leak.blood_leak_intensity, hd.blood_leak.blood_leak_blood_detect, + hd.blood_leak.blood_leak_intensity_moving_average)) return info @@ -436,7 +440,7 @@ #dg.voltages.cmd_monitored_voltages_broadcast_interval_override(50) #dg.concentrate_pumps.cmd_concentrate_pump_broadcast_interval_override(50) #sleep(1) - + """ dg.test_configs.cmd_set_test_config(DGTestConfigOptions.TEST_CONFIG_MIX_WITH_WATER.value) sleep(0.5) hd.test_configs.cmd_set_test_config(HDTestConfigOptions.TEST_CONFIG_USE_WET_CARTRIDGE.value) @@ -450,11 +454,16 @@ dg.test_configs.cmd_set_test_config(DGTestConfigOptions.TEST_CONFIG_DISABLE_INLET_WATER_TEMP_CHECK.value) sleep(0.5) hd.test_configs.cmd_set_test_config(HDTestConfigOptions.TEST_CONFIG_SKIP_DISINFECT_AND_SERVICE_TX_BLOCKERS.value) - + """ #dg.hd_proxy.cmd_start_stop_dg() #sleep(4) #dg.hd_proxy.cmd_fill() + hd.cmd_hd_set_operation_mode(4) + sleep(1) + dg.hd_proxy.cmd_start_stop_dg() + sleep(1) + dg.dialysate_fill.cmd_set_mode_fill_cal_check_state(2) try: while True: @@ -531,6 +540,7 @@ # sleep(1) #dg.hd_proxy.cmd_start_stop_dg_heat_disinfect() #dg.hd_proxy.cmd_start_stop_dg_heat_disinfect_active_cool() + dg.hd_proxy.cmd_start_stop_dg_passive_cool_heat_disinfect() try: while True: @@ -769,17 +779,18 @@ #hd.ui.cmd_set_ro_only_mode_status(1) - #while True: + #hd.blood_leak.cmd_blood_leak_emb_mode_info_cmds_override(EmbModeCommands.I.value, 1000, reset=1) + hd.blood_leak.cmd_blood_leak_intensity_moving_average_override(1100.3, reset=1) + + while True: # print(dg.switches.dg_switches_status) - # sleep(1) + print(time.time(), get_blood_leak_info()) + sleep(1) #dg.hd_proxy.cmd_start_stop_dg_heat_disinfect() #while True: # print(hd.alarms.get_alarm_state(286), hd.alarms.get_alarm_state(289), dg.alarms.get_alarm_state(286), # dg.alarms.get_alarm_state(289)) # sleep(0.5) - hd.blood_leak.cmd_blood_leak_set_embedded_mode_command(EmbModeCommands.D.value) - - while True: - print(hd.blood_leak.blood_leak_emb_mode_cmds[EmbModeCommands.D.name]) - sleep(0.2) - \ No newline at end of file + #hd.test_configs.cmd_set_test_config(HDTestConfigOptions.TEST_CONFIG_SKIP_DISINFECT_AND_SERVICE_TX_BLOCKERS.value) + #dg.cmd_dg_set_operation_mode(3) + #hd.cmd_hd_set_operation_mode(1)