Index: tst_ui_logs/test.py =================================================================== diff -u -rf8128de4d1ee087822fdc851e7cadb442075f73c -r6a14a242667488bea0e14dc9faf7655b880faed6 --- tst_ui_logs/test.py (.../test.py) (revision f8128de4d1ee087822fdc851e7cadb442075f73c) +++ tst_ui_logs/test.py (.../test.py) (revision 6a14a242667488bea0e14dc9faf7655b880faed6) @@ -29,6 +29,8 @@ from configuration import config import builtins from dialin.common.msg_ids import MsgIds +from dialin.common import msg_defs +# from dialin.utils import YES logger= logging.getLogger("INFO") messenger= DenaliCanMessenger('can0') @@ -37,660 +39,729 @@ hd_simulator = HDSimulator() dg_simulator = DGSimulator() -YES = 'Y' - - -def verify_log(msg_id, ack = None, msg = None): - utils.waitForGUI(0.1) +def verify_log(msg_id,msg = None, param = None): + utils.waitForGUI(0.2) + ack = False + if not msg_id in msg_defs.ACK_NOT_REQUIRED: + ack = True message_extracted = utility.get_current_log_details(message_ack = ack, message_text = msg) - if ack == YES: + if ack == True: test.verify(config.ACK_REQ_STATUS in message_extracted, "ack request is verified") test.verify(config.ACK_BAK_STATUS in message_extracted, "ack back is verified") -# if msg != None: -# test.verify(msg in message_extracted, "message is verified") - - message_id_hex = builtins.hex(builtins.int(msg_id)) - message_id_str = builtins.str(message_id_hex) - test.log(message_id_str) + message_id_hex = builtins.hex(builtins.int(msg_id)) + message_id_str = builtins.str(message_id_hex) + test.verify(message_id_str in message_extracted, "message ID is verified") + if param != None: + test.verify(param in message_extracted, "parameters are verified") test.log(str(message_extracted)) - test.verify(message_id_str in message_extracted, "message ID is verified") - def main(): startApplication("denaliSquish") #HD Broadcast #0x0D00 - hd_simulator.cmd_set_treatment_time(200,60) - verify_log(msg_id = MsgIds.MSG_ID_TREATMENT_TIME.value, ack = YES, msg = "TreatmentTime") + hd_simulator.cmd_set_treatment_time(200,60,0) + verify_log(msg_id = MsgIds.MSG_ID_TREATMENT_TIME.value, msg = "TreatmentTime", param = [200,60,0]) #0x0500 hd_simulator.cmd_set_treatment_blood_flow_rate(flow_set_pt=20, measured_flow=10.5, rot_speed = 112.2 , mot_speed = 120.3, mc_speed = 100.0, mc_current = 12.5, pwm = 32.3, rotor_count = 30) - verify_log(msg_id = MsgIds.MSG_ID_BLOOD_FLOW_DATA.value, ack = YES, msg = "BloodFlow") + verify_log(msg_id = MsgIds.MSG_ID_BLOOD_FLOW_DATA.value, msg = "BloodFlow", param = [20,10.5,112.2,120.3,100.0,12.5,32.3,30]) #0x0800 hd_simulator.cmd_set_treatment_dialysate_flow_rate(flow_set_pt=20, measured_flow=10.5, rot_speed = 112.2 , mot_speed = 120.3, mc_speed = 100.0, mc_current = 12.5, pwm = 32.3) - verify_log(msg_id = MsgIds.MSG_ID_DIALYSATE_FLOW_DATA.value, ack = YES, msg = "DialysateFlow") + verify_log(msg_id = MsgIds.MSG_ID_DIALYSATE_FLOW_DATA.value, msg = "DialysateFlow", param = [20,10.5,112.2,120.3,100.0,12.5,32.3]) #0x0900 hd_simulator.cmd_set_pressure_occlusion_data(arterial_prs = 54.5, venous_prs = 20.1, blood_pump_occlusion = 3, dialysate_inlet_pump_occlusion = 2, dialysate_outlet_pump_occlusion = 5) - verify_log(msg_id = MsgIds.MSG_ID_PRESSURE_OCCLUSION_DATA.value, ack = YES, msg = "Pressure/Occlusion") + verify_log(msg_id = MsgIds.MSG_ID_PRESSURE_OCCLUSION_DATA.value, msg = "Pressure/Occlusion", param = [54.5,20.1,3,2,5]) #0x0B00 hd_simulator.cmd_set_treatment_ultrafiltration_outlet_flow_data(ref_uf_vol = 77.5, measured_uf_vol = 22.6, rot_speed = 54.0, mot_speed = 66.2, mc_speed = 33.3, mc_current = 21.2, pwm = 322.2) - verify_log(msg_id = MsgIds.MSG_ID_DIALYSATE_OUT_FLOW_DATA.value, ack = YES, msg = "OutletFlow") + verify_log(msg_id = MsgIds.MSG_ID_DIALYSATE_OUT_FLOW_DATA.value, msg = "OutletFlow",param = [77.5,22.6,54.0,66.2,33.3,21.2,322.2]) #0x1A00 hd_simulator.cmd_set_treatment_parameter_ranges(min_treatment_duration = 300, max_treatment_duration = 500, min_uf_volume = 22.6, max_uf_volume = 34.2, min_dialysate_flow_rate = 3, max_dialysate_flow_rate = 5) - verify_log(msg_id = str(MsgIds.MSG_ID_TREATMENT_PARAM_CHANGE_RANGES.value), ack = YES, msg = "TreatmentRanges") + verify_log(msg_id = str(MsgIds.MSG_ID_TREATMENT_PARAM_CHANGE_RANGES.value), msg = "TreatmentRanges", param = [300,500,22.6,34.2,3,5]) #0x2F00 hd_simulator.cmd_set_treatment_saline_bolus_data(target = 2, cumulative = 90.0, delivered = 67.2) - verify_log(msg_id = MsgIds.MSG_ID_SALINE_BOLUS_DATA.value, ack = YES, msg = "Saline") + verify_log(msg_id = MsgIds.MSG_ID_SALINE_BOLUS_DATA.value, msg = "Saline", param = [2,90.0,67.2]) #0x4D00 hd_simulator.cmd_set_treatment_heparin_data(cumulative = 4) - verify_log(msg_id = MsgIds.MSG_ID_HD_HEPARIN_DATA_BROADCAST.value, ack = YES, msg = "Heparin") + verify_log(msg_id = MsgIds.MSG_ID_HD_HEPARIN_DATA_BROADCAST.value, msg = "Heparin", param = [4]) #0x3300 hd_simulator.cmd_send_accelerometer_hd_data(x = 12.3, y = 22.2, z = 4.0, x_max = 14.0, y_max = 30.2, z_max = 10.5, x_tilt = 11.0, y_tilt = 22.1, z_tilt = 5.5) - verify_log(msg_id = MsgIds.MSG_ID_HD_ACCELEROMETER_DATA.value, ack = YES, msg = "Accel") + verify_log(msg_id = MsgIds.MSG_ID_HD_ACCELEROMETER_DATA.value, msg = "Accel", param = [12.3,22.2,4.0,14.0,30.2,10.5,11.0,22.1,5.5]) #0x3A00 hd_simulator.cmd_send_hd_general_response(message_id = 58, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_VALVES_DATA.value, ack = YES, msg = "~HD_Valves_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_VALVES_DATA.value, msg = "~HD_Valves_Data") #0x3E00 #hd_simulator.cmd_send_hd_general_response(message_id = 62, accepted = 1, reason = 1) hd_simulator.cmd_send_hd_air_trap_data(lower_level = 1, upper_level = 10) - verify_log(msg_id = MsgIds.MSG_ID_HD_AIR_TRAP_DATA.value, ack = YES, msg = "AirTrap") + verify_log(msg_id = MsgIds.MSG_ID_HD_AIR_TRAP_DATA.value, msg = "AirTrap", param = [1,10]) #0x6900 hd_simulator.cmd_send_hd_general_response(message_id = 105, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_SYRINGE_PUMP_DATA.value, ack = YES) + verify_log(msg_id = MsgIds.MSG_ID_HD_SYRINGE_PUMP_DATA.value, msg = "Syringe") #0x6A00 hd_simulator.cmd_send_hd_general_response(message_id = 106, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_FLUID_LEAK_STATE.value, ack = YES, msg = "~HD_Fluid_Leak_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_FLUID_LEAK_STATE.value, msg = "~HD_Fluid_Leak_Data") #0x6C00 hd_simulator.cmd_send_hd_blood_leak_data(blood_leak_status = 0, blood_leak_state = 1, blood_leak_zero_status_counter = 2, blood_leak_counter = 3, blood_leak_zeroed_status = 2, blood_leak_detect_set_point = 1, blood_leak_detect_level = 1, blood_leak_st_count = 1, blood_leak_led_intensity = 2, blood_leak_register_counter = 3) - verify_log(msg_id = MsgIds.MSG_ID_HD_BLOOD_LEAK_DATA.value, ack = YES, msg = "BloodLeak") + verify_log(msg_id = MsgIds.MSG_ID_HD_BLOOD_LEAK_DATA.value, msg = "BloodLeak", param = [0,1,2,3,2,1,1,1,2,3]) #0x9300 hd_simulator.cmd_send_hd_air_bubble_data(venous_air_bubble_status = 2, venous_air_bubble_state = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_BUBBLES_DATA.value, ack = YES, msg = "AirBubble") + verify_log(msg_id = MsgIds.MSG_ID_HD_BUBBLES_DATA.value, msg = "AirBubble", param = [2,0]) #0x7B00 hd_simulator.cmd_send_hd_general_response(message_id = 123, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_VOLTAGES_DATA.value, ack = YES, msg = "~HD_Voltages_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_VOLTAGES_DATA.value, msg = "~HD_Voltages_Data") #0x7D00 hd_simulator.cmd_send_hd_general_response(message_id = 125, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_ALARM_INFORMATION.value, ack = YES, msg = "~HD_Alarm_Information") + verify_log(msg_id = MsgIds.MSG_ID_HD_ALARM_INFORMATION.value, msg = "~HD_Alarm_Information") #0xA200 hd_simulator.cmd_send_hd_general_response(message_id = 162, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_SWITCHES_DATA.value, ack = YES, msg = "~HD_Switches_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_SWITCHES_DATA.value, msg = "~HD_Switches_Data") #0x9D00 hd_simulator.cmd_send_hd_general_response(message_id = 157, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_TEMPERATURES_DATA.value, ack = YES, msg = "~HD_Temperature_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_TEMPERATURES_DATA.value, msg = "~HD_Temperature_Data") #0xA300 hd_simulator.cmd_send_hd_general_response(message_id = 163, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_FANS_DATA.value, ack = YES, msg = "~HD_Fans_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_FANS_DATA.value, msg = "~HD_Fans_Data") #0xA800 hd_simulator.cmd_send_hd_general_response(message_id = 168, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_RESERVOIRS_DATA.value, ack = YES, msg = "~HD_Reservoirs_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_RESERVOIRS_DATA.value, msg = "~HD_Reservoirs_Data") #HD Operation Mode #0x2500 for mode in range(9): - hd_simulator.cmd_send_hd_operation_mode(op_mode = mode) - verify_log(msg_id = MsgIds.MSG_ID_HD_OP_MODE.value, ack = YES, msg = "OpMode") + hd_simulator.cmd_send_hd_operation_mode(op_mode = mode, sub_mode = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_OP_MODE.value, msg = "OpMode", param = [mode,0]) #0x5C00 for s_mode in range(9): hd_simulator.cmd_send_pre_treatment_state_data(sub_mode = s_mode, water_sample_state = 0, consumables_self_test_state = 0, no_cartridge_self_test_state = 0, installation_state = 0, dry_self_test_state = 0, prime_state = 0, recirculate_state = 0, patient_connection_state = 0) - verify_log(msg_id = MsgIds.MSG_ID_PRE_TREATMENT_STATE.value, ack = YES, msg = "PreTreatmentStates") + verify_log(msg_id = MsgIds.MSG_ID_PRE_TREATMENT_STATE.value, msg = "PreTreatmentStates",param = [s_mode,0,0,0,0,0,0,0,0]) #0x0F00 for s_mode in range(3): hd_simulator.cmd_set_treatment_states_data(sub_mode = s_mode, uf_state = 0, saline_state = 0, heparin_state = 0, rinseback_state = 0, recirculate_state = 0, blood_prime_state = 0, treatment_end_state = 0, treatment_stop_state = 0, dialysis_state = 0) - verify_log(msg_id = MsgIds.MSG_ID_TREATMENT_STATE.value, ack = YES, msg = "TreatmentStates") + verify_log(msg_id = MsgIds.MSG_ID_TREATMENT_STATE.value, msg = "TreatmentStates", param = [s_mode,0,0,0,0,0,0,0,0,0]) #0x7700 #for s_mode in range(3): hd_simulator.cmd_send_hd_general_response(message_id = 119, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_POST_TREATMENT_STATE.value, ack = YES, msg = "PostTreatmentStates") + verify_log(msg_id = MsgIds.MSG_ID_HD_POST_TREATMENT_STATE.value, msg = "PostTreatmentStates") #0x7E00 for s_mode in range(3): hd_simulator.cmd_send_hd_disinfection_state(sub_mode = s_mode, flush_mode = 0, heat_mode = 0, chemical_mode = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, ack = YES, msg = "DisinfectStates") + verify_log(msg_id = MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, msg = "DisinfectStates", param = [s_mode,0,0,0]) #0x9A00 UI-HD #0x9B00 # hd_simulator.cmd_send_hd_disinfect_response(accepted = True, reason =1) hd_simulator.cmd_send_hd_general_response(message_id = 155, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_SET_STANDBY_DISINFECT_SUB_MODE_RESPONSE.value, ack = YES, msg = "~HD_Set_Standby_Disinfect_State_Response") + verify_log(msg_id = MsgIds.MSG_ID_HD_SET_STANDBY_DISINFECT_SUB_MODE_RESPONSE.value, msg = "~HD_Set_Standby_Disinfect_State_Response") #RINSEBACK #0x5200 UI-HD #0x5300 hd_simulator.cmd_send_treatment_adjust_rinseback_response(accepted = 1, reason = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_RINSEBACK_CMD_RESPONSE.value, ack = YES, msg = "AdjustRinseback") + verify_log(msg_id = MsgIds.MSG_ID_HD_RINSEBACK_CMD_RESPONSE.value, msg = "AdjustRinseback", param = [1,0]) #0x5400 #0x5500 hd_simulator.cmd_send_treatment_adjust_recirculate_response(accepted = 1, reason = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_RECIRC_CMD_RESPONSE.value, ack = YES, msg = "AdjustRecirculate") + verify_log(msg_id = MsgIds.MSG_ID_HD_RECIRC_CMD_RESPONSE.value, msg = "AdjustRecirculate", param = [1,0]) #0x5600 hd_simulator.cmd_send_treatment_rinseback_data(target_vol = 2.4, current_vol = 1.9, flow_rate = 1, timeout = 4, timeout_countdown = 8, is_completed = False) - verify_log(msg_id = MsgIds.MSG_ID_HD_RINSEBACK_PROGRESS.value, ack = YES, msg = "Rinseback") + verify_log(msg_id = MsgIds.MSG_ID_HD_RINSEBACK_PROGRESS.value, msg = "Rinseback", param = [2.4,1.9,1,4,8,False]) #0x5A00 hd_simulator.cmd_send_treatment_recirculate_data(timeout_total = 200, timeout_count_down = 100) - verify_log(msg_id = MsgIds.MSG_ID_HD_RECIRC_PROGRESS.value, ack = YES, msg = "Recirculate") + verify_log(msg_id = MsgIds.MSG_ID_HD_RECIRC_PROGRESS.value, msg = "Recirculate", param = [200,100]) + #Treatment End(sub-mode) #0x5800 hd_simulator.cmd_send_treatment_adjust_end_response(accepted = 1, reason = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_TX_END_CMD_RESPONSE.value, ack = YES, msg = "AdjustTxEnd") + verify_log(msg_id = MsgIds.MSG_ID_HD_TX_END_CMD_RESPONSE.value, msg = "AdjustTxEnd", param = [1,0]) - #0x5900 + #Treatment Blood Prime(sub-mode) + #0x5900 + #there is an additional parameter in the log hd_simulator.cmd_send_treatment_blood_prime_data(target = 22.2, current = 33.3) - verify_log(msg_id = MsgIds.MSG_ID_HD_BLOOD_PRIME_PROGRESS.value, ack = YES, msg = "BloodPrime") + verify_log(msg_id = MsgIds.MSG_ID_HD_BLOOD_PRIME_PROGRESS.value, msg = "BloodPrime", param = [22.2,33.3]) + #Treatment Stop(sub-mode) #0x4900 hd_simulator.cmd_send_hd_general_response(message_id = 73, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_STOP_TIMER_DATA.value, ack = YES, msg = "Stop") + verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_STOP_TIMER_DATA.value, msg = "Stop") #RTC #0x0A00 hd_simulator.cmd_send_hd_general_response(message_id = 10, accepted = 1, reason = 1) - verify_log(msg_id = MsgIds.MSG_ID_RTC_EPOCH.value, ack = YES, msg = "~HD_RTC_Epoch_Data") + verify_log(msg_id = MsgIds.MSG_ID_RTC_EPOCH.value, msg = "~HD_RTC_Epoch_Data") #0x6E00 hd_simulator.cmd_send_set_rtc_response(response = 1, reason = 0) - verify_log(msg_id = MsgIds.MSG_ID_HD_UI_SET_RTC_RESPONSE.value, ack = YES, msg = "AdjustHDDateTime") + verify_log(msg_id = MsgIds.MSG_ID_HD_UI_SET_RTC_RESPONSE.value, msg = "AdjustHDDateTime", param = [1,0]) #0x7000 dg_simulator.cmd_send_set_rtc_response(response = 1, reason = 0) - verify_log(msg_id = MsgIds.MSG_ID_DG_UI_SET_RTC_RESPONSE.value, ack = YES, msg = "AdjustDGDateTime") + verify_log(msg_id = MsgIds.MSG_ID_DG_UI_SET_RTC_RESPONSE.value, msg = "AdjustDGDateTime", param = [1,0]) + #Power + #0x0100 + hd_simulator.cmd_send_poweroff_button_pressed() + verify_log(msg_id = MsgIds.MSG_ID_OFF_BUTTON_PRESS.value, msg = "PowerOff") + #0x0E00 + hd_simulator.cmd_send_broadcast_poweroff_imminent() + verify_log(msg_id = MsgIds.MSG_ID_POWER_OFF_WARNING.value, msg = "ShuttingDown") + + #Events + #0xA400 + hd_simulator.cmd_send_hd_general_response(message_id=164, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_HD_EVENT.value, msg = "General") + + #0xA500 + dg_simulator.cmd_send_dg_general_response(message_id=165, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_EVENT.value) + + #Power-On Self-Test [POST] + #0x8E00 + hd_simulator.cmd_send_hd_post(item = 1, passed = True, done = False) + verify_log(msg_id = MsgIds.MSG_ID_HD_POST_SINGLE_TEST_RESULT.value, msg = "POSTItem", param = [1,1]) + + #0x8F00 + hd_simulator.cmd_send_hd_post(item = 1, passed = False, done = True) + verify_log(msg_id = MsgIds.MSG_ID_HD_POST_FINAL_TEST_RESULT.value, msg = "POSTDone", param = [0]) + + #0x9000 + dg_simulator.cmd_send_dg_post(item = 1, passed = True, done = False) + verify_log(msg_id = MsgIds.MSG_ID_DG_POST_SINGLE_TEST_RESULT.value, msg = "POSTItem", param = [1,1]) + + #0x9100 + dg_simulator.cmd_send_dg_post(item = 1, passed = False, done = True) + verify_log(msg_id = MsgIds.MSG_ID_DG_POST_FINAL_TEST_RESULT.value, msg = "POSTDone", param = [0]) + + #0x9C00 + hd_simulator.cmd_send_hd_general_response(message_id=156, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_HD_DG_POST_RESULT_REQUEST.value) + + #Versions + #0x1D00 + hd_simulator.cmd_send_version_hd_data(major=1, minor=1, micro=0, build=4, + fpga_id=5, fpga_major=1, fpga_minor=2, fpga_lab=3, + compatibility_rev=6) + verify_log(msg_id = MsgIds.MSG_ID_HD_VERSION.value, msg = "VersionRsp", param = [1,1,0,4,5,1,2,3,6]) + + #0x1E00 + dg_simulator.cmd_send_version_dg_data(major=1, minor=1, micro=0, build=4, + fpga_id=5, fpga_major=1, fpga_minor=2, fpga_lab=3, + compatibility_rev=6) + verify_log(msg_id = MsgIds.MSG_ID_DG_VERSION.value, msg = "Version", param = [1,1,0,4,5,1,2,3,6]) + + #0x9900 + hd_simulator.cmd_send_serial_hd_data(serial = 'AGHHG1234GHJ') + verify_log(msg_id = MsgIds.MSG_ID_HD_SERIAL_NUMBER.value, msg = "Serial") + + #0x8800 + dg_simulator.cmd_send_serial_dg_data(serial = 'AGHHG1234GHJ') + verify_log(msg_id = MsgIds.MSG_ID_DG_SERIAL_NUMBER.value, msg = "Serial") + + #0x9E00 + hd_simulator.cmd_send_hd_request_ui_version() +# verify_log(msg_id = MsgIds.MSG_ID_HD_UI_VERSION_INFO_REQUEST.value, msg = "VersionReq") + + #DG Broadcast Data + + #0x1F00 + #Message is not getting logged, therefore parameter verification is also failing + dg_simulator.cmd_set_dg_ro_pump_data(set_pt_pressure = 0, flow_rate = 1.0, pwm = 2.0) + verify_log(msg_id = MsgIds.MSG_ID_RO_PUMP_DATA.value, msg = "ROPump", param = [0, 1.0, 2.0]) + + #0x2000 + dg_simulator.cmd_set_dg_pressures_data(ro_inlet_pressure = 0.0, ro_outlet_pressure = 1.0, drain_inlet_pressure = 2.0, drain_outlet_pressure = 3.0) + verify_log(msg_id = MsgIds.MSG_ID_DG_PRESSURES_DATA.value, msg = "Pressures", param = [0.0, 1.0, 2.0, 3.0]) + + #0x2400 + #Message is not getting logged, therefore parameter verification is also failing + dg_simulator.cmd_set_dg_drain_pump_data(set_pt_pwm = 1, dac_value = 2) + verify_log(msg_id = MsgIds.MSG_ID_DRAIN_PUMP_DATA.value, msg = "DrainPump", param = [1, 2]) + + #0x2700 + #Message is not getting logged, therefore parameter verification is also failing + dg_simulator.cmd_set_dg_operation_mode(dg_op_mode = 1) + verify_log(msg_id = MsgIds.MSG_ID_DG_OP_MODE.value, msg = "OpMode", param = [1]) + + #0x2800 + dg_simulator.cmd_set_dg_reservoir_data(active_reservoir = 0, fill_to_vol_ml = 1, drain_to_vol_ml = 2) + verify_log(msg_id = MsgIds.MSG_ID_DG_RESERVOIRS_DATA.value, msg = "Reservoir", param = [0, 1, 2]) + + #0x2A00 + #there is a parameter mismatch here as the log contains a series of boolean values instead of one integer + dg_simulator.cmd_set_dg_valves_states(valves_states = 3) + verify_log(msg_id = MsgIds.MSG_ID_DG_VALVES_STATES.value, msg = "ValvesStates", param = [3]) + + #0x2C00 + #there is a parameter mismatch here as the log contains a 3 float values [0.0,0.0,0.0] instead of 3 given integers + dg_simulator.cmd_set_dg_heaters_data(main_primary_dc = 1, small_primary_dc = 2, trimmer_dc = 3) + verify_log(msg_id = MsgIds.MSG_ID_DG_HEATERS_DATA.value, msg = "Heaters", param = [1, 2, 3]) + + #0x0C00 + dg_simulator.cmd_set_dg_load_cell_readings_data(reservoir1_primary = 1.0, reservoir1_backup = 2.0,reservoir2_primary = 3.0, reservoir2_backup = 4.0) + verify_log(msg_id = MsgIds.MSG_ID_LOAD_CELL_READINGS.value, msg = "LoadCell", param = [1.0,2.0,3.0,4.0]) + + #0x2D00 + dg_simulator.cmd_set_dg_temperatures_data(inlet_primary_heater = 1.0, outlet_primary_heater = 2.0, + conductivity_sensor1 = 3.0, conductivity_sensor2 = 4.0, + outlet_redundancy = 5.0, inlet_dialysate = 6.0, + primary_heater_thermocouple = 7.0, trimmer_heater_thermocouple = 8.0, + primary_heater_cold_junction = 9.0, trimmer_heater_cold_junction = 10.0, + primary_heater_internal_temp = 11.0, trimmer_heater_internal_temp = 12.0) + verify_log(msg_id = MsgIds.MSG_ID_DG_TEMPERATURE_DATA.value, msg = "Temperatures", param = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0]) + + #0x3100 + dg_simulator.cmd_send_dg_conductivity_data(ro_rejection_ratio = 1.0, cpi_conductivity = 2.0, + cpo_conductivity = 3.0, cd1_conductivity = 4.0, + cd2_conductivity = 5.0) + verify_log(msg_id = MsgIds.MSG_ID_DG_CONDUCTIVITY_DATA.value, msg = "Conductivity", param = [1.0, 2.0, 3.0, 4.0,5.0]) + + #0x3700 + dg_simulator.cmd_send_dg_general_response(message_id=55, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_HEAT_DISINFECT_DATA.value, msg = "~DG_Heat_Disinfect_Data") + + #0x4200 + dg_simulator.cmd_send_dg_general_response(message_id=66, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_CONCENTRATE_PUMP_DATA.value, msg = "~DG_Concentrate_Pump_Data") + + #0x4400 + dg_simulator.cmd_send_dg_general_response(message_id=68, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_UV_REACTORS_DATA.value, msg = "~DG_UV_Reactors_Data") + + #0x4500 + dg_simulator.cmd_send_dg_general_response(message_id=69, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_THERMISTORS_DATA.value, msg = "~DG_Thermistors_Data") + + #0x4800 + dg_simulator.cmd_send_dg_general_response(message_id=72, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_FANS_DATA.value, msg = "~DG_Fans_Data") + + #0x3400 + dg_simulator.cmd_send_accelerometer_dg_data(x=1.0, y=2.0, z=3.0, x_max=2.0, y_max=2.0, z_max=3.0, x_tilt=2.0, y_tilt=3.0, z_tilt=4.0) + verify_log(msg_id = MsgIds.MSG_ID_DG_ACCELEROMETER_DATA.value, msg = "Accel", param = [1.0, 2.0, 3.0, 2.0, 2.0, 3.0, 2.0, 3.0, 4.0]) + + #0x6B00 + dg_simulator.cmd_send_dg_general_response(message_id=107, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_FLUID_LEAK_STATE.value, msg = "~DG_Fluid_Leak_Data") + + #0x7A00 + dg_simulator.cmd_send_dg_general_response(message_id=122, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_FLUSH_DATA.value, msg = "~DG_Flush_Data") + + #0x8600 + dg_simulator.cmd_send_dg_general_response(message_id=134, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_VOLTAGES_DATA.value, msg = "~DG_Voltages_Data") + + #0x8700 + dg_simulator.cmd_send_dg_general_response(message_id=135, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_CHEM_DISINFECT_DATA.value, msg = "~DG_Chemical_Disinfect_Data") + + #0xA100 + dg_simulator.cmd_send_dg_general_response(message_id=161, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_SWITCHES_DATA.value, msg = "~DG_Switches_Data") + + #0xA700 + dg_simulator.cmd_send_dg_general_response(message_id=167, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_ALARM_INFO.value, msg = None) + + #0xAA00 + dg_simulator.cmd_send_dg_general_response(message_id=170, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_CONCENTRATE_MIXING_RATIOS_DATA.value, msg = None) + + #0xA600 + dg_simulator.cmd_send_dg_general_response(message_id=166, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_DIALYSATE_FLOW_METER_DATA.value, msg = "~DG_Dialysate_Flow_Data") + + #0xAB00 + dg_simulator.cmd_send_dg_general_response(message_id=171, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_SCHEDULED_RUNS_DATA.value, msg = "DG scheduled runs data") + + #0xAC00 + dg_simulator.cmd_send_dg_general_response(message_id=172, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_SCHEDULED_RUNS_INFO.value, msg = "DG scheduled runs info") + + #0xAE00 + dg_simulator.cmd_send_dg_general_response(message_id=174, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_FILL_MODE_DATA.value, msg = "DG Fill Mode Data") + + #0xAF00 + dg_simulator.cmd_send_dg_general_response(message_id=175, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_IDLE_MODE_BAD_FILL_SUB_STATES.value, msg = "DG Idle Mode Bad Fill Sub-states") + + #Alarm + + #0x0200 + hd_alarm.cmd_send_clear_alarms() + verify_log(msg_id = MsgIds.MSG_ID_ALARM_STATUS.value, msg = "AlarmStatus") + + #0x0300 + #parameter data type mismatch + hd_alarm.cmd_set_alarm_triggered(alarm_id = 1, field_descriptor_1 = 1, data_field_1 = '2', + field_descriptor_2 = 3, data_field_2 = '4', + priority = 5, rank = 6, clear_top = 7) + verify_log(msg_id = MsgIds.MSG_ID_ALARM_TRIGGERED.value, msg = "AlarmTriggered", param = [1, 1, '2', 3, '4', 5, 6, 7]) + + #0x0400 + hd_alarm.cmd_set_alarm_cleared(alarm_id = 4) + verify_log(msg_id = MsgIds.MSG_ID_ALARM_CLEARED.value, msg = "AlarmCleared", param = [4]) + + + #0x7C00 + hd_simulator.cmd_send_hd_general_response(message_id=124, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_HD_ALARM_AUDIO_VOLUME_SET_RESPONSE.value, msg = "AdjustHDAlarmVolume") + + + #0x3F00 + hd_simulator.cmd_send_hd_general_response(message_id=63, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_ALARM_CONDITION_CLEARED.value, msg = "AlarmCondition") + + #0x3200 + hd_simulator.cmd_send_hd_general_response(message_id=50, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_USER_REQUEST_ALARM_SILENCE.value, msg = "AlarmCondition") + + #0x9800 + hd_alarm.cmd_send_active_list_response(accept = True, reason = 0, + a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0, + a5 = 0, a6 = 0, a7 = 0, a8 = 0, a9 = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_ACTIVE_ALARMS_LIST_REQUEST_RESPONSE.value, msg = "AlarmActiveList", param = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + + + #UF Vol. + + #0x4100 + #parameter mismatch : expected 1 int but 3 integers are logged + hd_simulator.cmd_set_treatment_adjust_ultrafiltration_accepted(state = 1) + verify_log(msg_id = MsgIds.MSG_ID_USER_UF_PAUSE_RESUME_RESPONSE.value, msg = "AdjustUFState", param = [1]) + + #0x1300 + hd_simulator.cmd_send_hd_general_response(message_id=19, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE.value, msg = None) + + #0x2E00 + #parameter mismatch : expected 1 int but 3 integers are logged + hd_simulator.cmd_set_treatment_adjust_ultrafiltration_confirm_rejected(reason = 1) + verify_log(msg_id = MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE.value, msg = "AdjustUFConfirm", param = [1]) + + #Saline + + #0x1400 + hd_simulator.cmd_set_saline_bolus_response(accepted = 0, reason = 1, target = 2) + verify_log(msg_id = MsgIds.MSG_ID_USER_SALINE_BOLUS_RESPONSE.value, msg = "AdjustSaline", param = [0,1,2]) + + #Heparin + + #0x4C00 + hd_simulator.cmd_set_heparin_pause_resume_response(accepted = 0, reason = 1) + verify_log(msg_id = MsgIds.MSG_ID_HD_HEPARIN_PAUSE_RESUME_RESPONSE.value, msg = "AdjustHeparin", param = [0,1]) + + #Duration + + #0x1B00 + hd_simulator.cmd_send_treatment_adjust_duration_response(accepted = 0, reason = 1, + duration = 2, ultrafiltration = 3.0) + verify_log(msg_id = MsgIds.MSG_ID_USER_TREATMENT_TIME_CHANGE_RESPONSE.value, msg = "AdjustDuration", param = [0, 1, 2, 3.0]) + + #Blood / Dialysate + + #0x1800 + hd_simulator.cmd_send_treatment_adjust_blood_dialysate_response(accepted = 0, reason = 1, + blood_rate = 2, dialysate_flow_rate = 3) + verify_log(msg_id = MsgIds.MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_RESPONSE.value, msg = "AdjustBloodDialysate", param = [0, 1, 2, 3]) + + #PRS-58: In-Line Blood Pressure Limits + + #0x4700 + hd_simulator.cmd_send_treatment_adjust_pressures_limit_response(accepted = 0, reason = 1, + arterial_low = 2, arterial_high = 3, + venous_low = 4, venous_high = 5) + verify_log(msg_id = MsgIds.MSG_ID_HD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, msg = "AdjustPressuresLimits", param = [0, 1, 2, 3, 4, 5]) + #Service Information #0x8A00 - hd_simulator._handler_system_usage_response() - verify_log(msg_id = MsgIds.MSG_ID_HD_SERVICE_SCHEDULE_DATA.value, ack = YES, msg = "ServiceDate") + # hd_simulator._handler_system_usage_response() + hd_simulator.cmd_send_hd_general_response(message_id=138, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_HD_SERVICE_SCHEDULE_DATA.value, msg = "ServiceDate") #0x8C00 - dg_simulator._handler_system_usage_response() - verify_log(msg_id = MsgIds.MSG_ID_DG_SERVICE_SCHEDULE_DATA.value, ack = YES, msg = "ServiceDate") + # dg_simulator._handler_system_usage_response() + dg_simulator.cmd_send_dg_general_response(message_id=140, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_SERVICE_SCHEDULE_DATA.value, msg = "ServiceDate") #System Usage Information #0x8B00 hd_simulator.cmd_send_hd_general_response(message_id=139, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_HD_USAGE_DATA.value, ack = YES, msg = "~HD_Usage_Data") + verify_log(msg_id = MsgIds.MSG_ID_HD_USAGE_DATA.value, msg = "~HD_Usage_Data") #0x8D00 dg_simulator.cmd_send_dg_general_response(message_id=141, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_USAGE_DATA.value, ack = YES, msg = "~DG_Usage_Data") + verify_log(msg_id = MsgIds.MSG_ID_DG_USAGE_DATA.value, msg = "~DG_Usage_Data") #DG Command #0x2100 hd_simulator.cmd_send_hd_general_response(message_id=33, accepted=0, reason=1) - verify_log(msg_id = MsgIds. MSG_ID_DG_SWITCH_RESERVOIR_CMD.value, ack = YES, msg = "~DG_Switch_Res_Cmd") + verify_log(msg_id = MsgIds. MSG_ID_DG_SWITCH_RESERVOIR_CMD.value, msg = "~DG_Switch_Res_Cmd") #0x2200 hd_simulator.cmd_send_hd_general_response(message_id=34, accepted=0, reason=1) - verify_log(msg_id = MsgIds. MSG_ID_DG_FILL_CMD.value, ack = YES, msg = "~DG_Fill_Cmd") + verify_log(msg_id = MsgIds. MSG_ID_DG_FILL_CMD.value, msg = "~DG_Fill_Cmd") #0x2300 hd_simulator.cmd_send_hd_general_response(message_id=35, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_DRAIN_CMD.value, ack = YES, msg = "~DG_Drain_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_DRAIN_CMD.value, msg = "~DG_Drain_Cmd") #0x1900 hd_simulator.cmd_send_hd_general_response(message_id=25, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS.value, ack = YES, msg = "~DG_Dialysate_Tgt_Temps") + verify_log(msg_id = MsgIds.MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS.value, msg = "~DG_Dialysate_Tgt_Temps") #0x2600 hd_simulator.cmd_send_hd_general_response(message_id=38, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_STARTING_STOPPING_TREATMENT_CMD.value, ack = YES, msg = "~DG_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_STARTING_STOPPING_TREATMENT_CMD.value, msg = "~DG_Cmd") #0x2900 hd_simulator.cmd_send_hd_general_response(message_id=41, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_SAMPLE_WATER_CMD.value, ack = YES, msg = "~DG_Sample_Water_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_SAMPLE_WATER_CMD.value, msg = "~DG_Sample_Water_Cmd") #0x2B00 hd_simulator.cmd_send_hd_general_response(message_id=43, accepted=0, reason=1) - verify_log(msg_id = MsgIds. MSG_ID_DG_START_STOP_TRIMMER_HEATER_CMD.value, ack = YES, msg = "~DG_Trimmer_Htr_Cmd") + verify_log(msg_id = MsgIds. MSG_ID_DG_START_STOP_TRIMMER_HEATER_CMD.value, msg = "~DG_Trimmer_Htr_Cmd") #0x3000 hd_simulator.cmd_send_hd_general_response(message_id=48, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_HEAT_DISINFECT.value, ack = YES, msg = "~DG_Heat_Disinfect_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_HEAT_DISINFECT.value, msg = "~DG_Heat_Disinfect_Cmd") #0x5B00 hd_simulator.cmd_send_hd_general_response(message_id=91, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_CHANGE_VALVE_SETTING_CMD.value, ack = YES, msg = "~DG_Chg_Valves_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_CHANGE_VALVE_SETTING_CMD.value, msg = "~DG_Chg_Valves_Cmd") #0x5100 hd_simulator.cmd_send_hd_general_response(message_id=81, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_COMMAND_RESPONSE.value, ack = YES, msg = "~DG_Cmd_Rsp") + verify_log(msg_id = MsgIds.MSG_ID_DG_COMMAND_RESPONSE.value, msg = "~DG_Cmd_Rsp") #0x7800 hd_simulator.cmd_send_hd_general_response(message_id=120, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_CHEM_DISINFECT.value, ack = YES, msg = "~DG_Chem_Disinfect_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_CHEM_DISINFECT.value, msg = "~DG_Chem_Disinfect_Cmd") #0x7900 hd_simulator.cmd_send_hd_general_response(message_id=121, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_FLUSH.value, ack = YES, msg = "~DG_Flush_Cmd") + verify_log(msg_id = MsgIds.MSG_ID_DG_START_STOP_FLUSH.value, msg = "~DG_Flush_Cmd") #0xA900 hd_simulator.cmd_send_hd_general_response(message_id=169, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_HD_REQUEST_DG_CONCENTRATE_MIXING_RATIOS.value, ack = YES, msg = "~DG_Mixing_Ratio_Fill_Prep_Request") + verify_log(msg_id = MsgIds.MSG_ID_HD_REQUEST_DG_CONCENTRATE_MIXING_RATIOS.value, msg = "~DG_Mixing_Ratio_Fill_Prep_Request") - #reading of 4 digit messages has to be dealt with in utility - # #0xFFF1 - # hd_simulator.cmd_send_hd_general_response(message_id=65521, accepted=0, reason=1) - # verify_log(msg_id = MsgIds.MSG_ID_HD_DEBUG_EVENT.value, ack = YES, msg = "None") - # - # - # #0xFFF2 - # dg_simulator.cmd_send_dg_general_response(message_id=65522, accepted=0, reason=1) - # verify_log(msg_id = MsgIds.MSG_ID_DG_DEBUG_EVENT.value, ack = YES, msg = "None") + #FW Debug + #0xF1FF + hd_simulator.cmd_send_hd_general_response(message_id=65521, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_HD_DEBUG_EVENT.value, msg = "Debug") - #Power - #0x0100 - hd_simulator.cmd_send_poweroff_button_pressed() - verify_log(msg_id = MsgIds.MSG_ID_OFF_BUTTON_PRESS.value, ack = YES, msg = "PowerOff") - - #0x0E00 - hd_simulator.cmd_send_broadcast_poweroff_imminent() - verify_log(msg_id = MsgIds.MSG_ID_POWER_OFF_WARNING.value, ack = YES, msg = "ShuttingDown") - - #Events - #0xA400 - hd_simulator.cmd_send_hd_general_response(message_id=164, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_HD_EVENT.value, ack = YES) - - #0xA500 - dg_simulator.cmd_send_dg_general_response(message_id=165, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_EVENT.value, ack = YES) - - #Power-On Self-Test [POST] - #0x8E00 - hd_simulator.cmd_send_hd_post(1, True, False) - verify_log(msg_id = MsgIds.MSG_ID_HD_POST_SINGLE_TEST_RESULT.value, ack = YES, msg = "POSTItem") - - #0x8F00 - hd_simulator.cmd_send_hd_post(2, False, True) - verify_log(msg_id = MsgIds.MSG_ID_HD_POST_FINAL_TEST_RESULT.value, ack = YES, msg = "POSTDone") - - #0x9000 - dg_simulator.cmd_send_dg_post(1, True, False) - verify_log(msg_id = MsgIds.MSG_ID_DG_POST_SINGLE_TEST_RESULT.value, ack = YES, msg = "POSTItem") - - #0x9100 - dg_simulator.cmd_send_dg_post(2, False, True) - verify_log(msg_id = MsgIds.MSG_ID_DG_POST_FINAL_TEST_RESULT.value, ack = YES, msg = "POSTDone") - - #0x9C00 - hd_simulator.cmd_send_hd_general_response(message_id=156, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_HD_DG_POST_RESULT_REQUEST.value, ack = YES) - - #Versions - #0x1D00 - hd_simulator.cmd_send_version_hd_data(1, 1, 0, 4, 5,1, 2, 3, 6) - verify_log(msg_id = MsgIds.MSG_ID_HD_VERSION.value, ack = YES, msg = "VersionRsp") - - #0x1E00 - dg_simulator.cmd_send_version_dg_data(1, 1, 0, 4, 5,1, 2, 3, 6) - verify_log(msg_id = MsgIds.MSG_ID_DG_VERSION.value, ack = YES, msg = "Version") - - #0x9900 - hd_simulator.cmd_send_serial_hd_data('AGHHG1234GHJ') - verify_log(msg_id = MsgIds.MSG_ID_HD_SERIAL_NUMBER.value, ack = YES) - - #0x8800 - dg_simulator.cmd_send_serial_dg_data('AGHHG1234GHJ') - verify_log(msg_id = MsgIds.MSG_ID_DG_SERIAL_NUMBER.value, ack = YES) + #0xF2FF + dg_simulator.cmd_send_dg_general_response(message_id=65522, accepted=0, reason=1) + verify_log(msg_id = MsgIds.MSG_ID_DG_DEBUG_EVENT.value, msg = "Debug") - #0x9E00 -# failing due to quick acknowledgement from ui resulting in 0x9f in the last ID. -# will be uncommented once acknowledgements are finalized from Diality -# hd_simulator.cmd_send_hd_request_ui_version() -# verify_log(msg_id = MsgIds.MSG_ID_HD_UI_VERSION_INFO_REQUEST.value, ack = YES, msg = "VersionReq") - - #Initiate (Create/Select) a Treatment ( and later validate the parameters ) + #Initiate (Create/Select) a Treatment #ID:0x3900 - hd_simulator.cmd_initiate_treatment_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_INITIATE_TREATMENT_RESPONSE.value, ack = YES, msg= "Initiate treatment response") - - #Treatment Parameters Validation + hd_simulator.cmd_initiate_treatment_response(response = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_INITIATE_TREATMENT_RESPONSE.value, msg= "InitTreatment", param = [1,0]) + + #Treatment Parameters Validation #ID:0x3600 (API is not reflecting with rejection messages) #hd_simulator.cmd_send_treatment_parameter_validation_response([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]) hd_simulator.cmd_send_hd_general_response(message_id=54, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_HD_NEW_TREATMENT_PARAMS_RESPONSE.value, ack = YES, msg= "Validate New Create Treatment Response") - - #Pre-Treatment Water Sample (sub-mode) + verify_log(msg_id = MsgIds.MSG_ID_HD_NEW_TREATMENT_PARAMS_RESPONSE.value, msg= "Validate New Create Treatment Response") + + #Pre-Treatment Water Sample (sub-mode) #ID:0x5E00 - hd_simulator.cmd_send_pre_treatment_water_sample_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_SAMPLE_WATER_CMD_RESPONSE.value, ack = YES, msg = "Water Sample Response") + hd_simulator.cmd_send_pre_treatment_water_sample_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_SAMPLE_WATER_CMD_RESPONSE.value, msg = "AdjustWaterSample", param = [1,0]) #ID:0x6000 - dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(120,60) - verify_log(msg_id = MsgIds.MSG_ID_DG_FILTER_FLUSH_PROGRESS.value, ack = YES, msg = "Filter Flush Progress") - - #Pre-Treatment No Cartridge Self-Test (sub-mode) + dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_DG_FILTER_FLUSH_PROGRESS.value, msg = "FilterFlush", param = [120,60]) + + #Pre-Treatment No Cartridge Self-Test (sub-mode) #ID:0x6100 - hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(120,60) - verify_log(msg_id = MsgIds.MSG_ID_HD_NO_CART_SELF_TEST_PROGRESS.value, ack = YES, msg = "No Cartridge Self-Tests Progress") - - #Pre-Treatment Disposable Installation (sub-mode) + hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_HD_NO_CART_SELF_TEST_PROGRESS.value, msg = "SelfTestNoCartridge", param = [120,60]) + + #Pre-Treatment Disposable Installation (sub-mode) #ID:0xAD00(API is missing, also message id is not present in msgs.py file hd_simulator.cmd_send_hd_general_response(message_id=173, accepted=0, reason=1) - #verify_log(msg_id = MsgIds. .value, ack = YES, msg = "Disposable Installation Response") - - #Pre-Treatment Dry Self-Test (sub-mode) + verify_log(msg_id = MsgIds.MSG_ID_HD_UI_DISPOSABLE_INSTALLATION_RESPONSE.value, msg = "AdjustDisposablesConfirm", param = [0,1]) + + #Pre-Treatment Dry Self-Test (sub-mode) #ID:0x6300 - hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(120,60) - verify_log(msg_id = MsgIds.MSG_ID_HD_DRY_SELF_TEST_PROGRESS.value, ack = YES, msg = "Dry Self-Tests Progress") - - #Pre-Treatment Prime (sub-mode) + hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_HD_DRY_SELF_TEST_PROGRESS.value, msg = "SelfTestDry", param = [120,60]) + + #Pre-Treatment Prime (sub-mode) #ID:0x3D00 - hd_simulator.cmd_send_pre_treatment_prime_start_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_START_PRIME_RESPONSE.value, ack = YES, msg = "Prime Start Response") - + hd_simulator.cmd_send_pre_treatment_prime_start_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_START_PRIME_RESPONSE.value, msg = "AdjustDisposablesPrime", param = [1,0]) + #ID:0x4300 - hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(120,60) - verify_log(msg_id = MsgIds.MSG_ID_HD_PRIMING_STATUS_DATA.value, ack = YES, msg = "Priming Progress") - + hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_HD_PRIMING_STATUS_DATA.value, msg = "DisposablesPrime", param = [120,60]) + + + #Pre-Treatment Patient Connection Begin #ID:0x6500 hd_simulator.cmd_send_hd_general_response(message_id=101, accepted=1, reason=0) - verify_log(msg_id = MsgIds.MSG_ID_HD_PATIENT_CONNECTION_BEGIN_RESPONSE.value, ack = YES, msg = "Patient Connection Begin Response") + verify_log(msg_id = MsgIds.MSG_ID_HD_PATIENT_CONNECTION_BEGIN_RESPONSE.value, msg = "Patient Connection Begin Response") - #Pre-Treatment Ultrafiltration (Init) Volume Adjustment + #Pre-Treatment Ultrafiltration (Init) Volume Adjustment #ID:0x5000 hd_simulator.cmd_send_hd_general_response(message_id=80, accepted=1, reason=0) - verify_log(msg_id = MsgIds.MSG_ID_HD_SET_UF_VOLUME_PARAMETER_RESPONSE.value, ack = YES, msg = "Pre UF Volume Adjustment Response") + verify_log(msg_id = MsgIds.MSG_ID_HD_SET_UF_VOLUME_PARAMETER_RESPONSE.value, msg = "Pre UF Volume Adjustment Response") #Pre-Treatment Patient Connection Confirm #ID:0x6700 - hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE.value, ack = YES, msg = "Patient Connection Confirm Response") - - #Start Treatment + hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE.value, msg = "AdjustPatientConnectionBegin", param = [1,0]) + + + + #Start Treatment #ID:0x7200 - hd_simulator.cmd_send_pre_treatment_continue_to_treament_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_START_TREATMENT_RESPONSE.value, ack = YES, msg = "Start treatment response") - - #Post-Treatment + hd_simulator.cmd_send_pre_treatment_continue_to_treament_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_START_TREATMENT_RESPONSE.value, msg = "AdjustPatientConnectionConfirm", param = [1,0]) + + + + #Post-Treatment #ID:0x7400 - hd_simulator.cmd_send_post_treatment_disposable_removal_confirm_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_DISPOSABLE_REMOVAL_CONFIRM_RESPONSE.value, ack = YES, msg = "Disposable Removal Confirm Response") - - #Treatment Log + hd_simulator.cmd_send_post_treatment_disposable_removal_confirm_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_DISPOSABLE_REMOVAL_CONFIRM_RESPONSE.value, msg = "AdjustDisposablesRemovalConfirm", param = [1,0]) + + + + #Treatment Log #ID:0x7600 - hd_simulator.cmd_send_post_treatment_log_response(1,1,1,1,1,1,1,1,1,1,1,1.0,1,1,1,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, - 1.0,1.0,1,1.0,1.0,1,1.0,1,1.0,1.0,1,0,1) - verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_DATA_RESPONSE.value, ack = YES, msg = "Treatment Log Data Response") + #parameter mismatch: the last parameter (water_sample_test_result) value is always 1000 regardless of the argument passed + hd_simulator.cmd_send_post_treatment_log_response(accepted = 1, reason = 1, + bood_flow_rate = 1, + dialysate_flow_rate = 1, + treatment_duration = 1, + actual_treatment_duration = 1, + acid_concentrate_type = 1, + bicarbonate_concentrate_type = 1, + potassium_concentration = 1, + calcium_concentration = 1, + bicarbonate_concentration = 1, + sodium_concentration = 1, + dialysate_temperature = 1.0, + dialyzer_type = 1, + treatment_start_date_time = 1, + treatment_end_date_time = 1, + average_blood_flow = 1.0, + average_dialysate_flow = 1.0, + dialysate_volume_used = 1.0, + average_dialysate_temp = 1.0, + origin_uf_volume = 1.0, + target_uf_volume = 1.0, + actual_uf_volume = 1.0, + origin_uf_rate = 1.0, + target_uf_rate = 1.0, + actual_uf_rate = 1.0, + saline_bolus_volume = 1, + heparin_bolus_volume = 1.0, + heparin_dispense_rate = 1.0, + heparin_pre_stop = 1, + heparin_delivered_volume = 1.0, + heparin_type = 1, + average_arterial_pressure = 1.0, + average_venous_pressure = 1.0, + device_id = 1, + water_sample_test_result = 10) + verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_DATA_RESPONSE.value, msg = "AdjustTreatmentLog", param =[1,1,1,1,1,1,1,1,1,1,1,1,1.0,1,1,1,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1,1.0,1.0,1,1.0,1.0,1.0,0,1,1,1]) #ID:0x9400 - hd_simulator.cmd_send_treatment_log_data(1,1,1.0,0.0,1.0) - verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA.value, ack = YES, msg = "Treatment Log Data 30 min Periodic") + hd_simulator.cmd_send_treatment_log_data(blood_flow_rate = 1, dialysate_flow_rate = 1, uf_rate = 1.0, + arterial_pressure = 0.0, venous_pressure = 1.0) + verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA.value, msg = "TreatmentLogAvrge", param = [1,1,1.0,0.0,1.0]) #ID:0x9500 - hd_simulator.cmd_send_treatment_log_alarm(1,0.0,1.0) - verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_ALARM_EVENT.value, ack = YES, msg = "Treatment Log Alarms Data") + hd_simulator.cmd_send_treatment_log_alarm(alarm_id = 1, parameter1 = 0.0, parameter2 = 1.0) + verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_ALARM_EVENT.value, msg = "TreatmentLogAlarm", param = [1,0.0,1.0]) #ID:0x9600 - hd_simulator.cmd_send_treatment_log_event(1,1.0,0.0) - verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_EVENT.value, ack = YES, msg = "Treatment Log Events Data") - - #Post-Treatment - Disinfect + hd_simulator.cmd_send_treatment_log_event(event_id = 1, old_value = 1.0, new_value = 0.0) + verify_log(msg_id = MsgIds.MSG_ID_HD_TREATMENT_LOG_EVENT.value, msg = "TreatmentLogEvent", param = [1,1.0,0.0]) + + #Post-Treatment - Disinfect #ID:0x8000 - hd_simulator.cmd_send_hd_disinfect_response(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_DISINFECT_RESPONSE.value, ack = YES, msg = "Disinfect Request Response") + hd_simulator.cmd_send_hd_disinfect_response(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_DISINFECT_RESPONSE.value, msg = "AdjustDisinfect", param =[1,0]) #ID:0x8200 - hd_simulator.cmd_send_hd_disinfect_chemical_confirm(1,0) - verify_log(msg_id = MsgIds.MSG_ID_HD_CHEM_DISINFECT_CONFIRM_RESPONSE.value, ack = YES, msg = "Chemical Disinfect User Confirm Response") + hd_simulator.cmd_send_hd_disinfect_chemical_confirm(accepted = 1, reason = 0) + verify_log(msg_id = MsgIds.MSG_ID_HD_CHEM_DISINFECT_CONFIRM_RESPONSE.value, msg = "AdjustDisinfectChemicalConfirm" ,param = [1,0]) #ID:0x8300 - dg_simulator.cmd_send_dg_disinfect_progress_time_flush(120,60) - verify_log(msg_id = MsgIds.MSG_ID_DG_FLUSH_TIME_DATA.value, ack = YES, msg = "DG Flush Time [each sub state]") + dg_simulator.cmd_send_dg_disinfect_progress_time_flush(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_DG_FLUSH_TIME_DATA.value, msg = "DisinfectDGFlushTime", param = [120,60]) #ID:0x8400 - dg_simulator.cmd_send_dg_disinfect_progress_time_heat(120,60) - verify_log(msg_id = MsgIds.MSG_ID_DG_HEAT_DISINFECT_TIME_DATA.value, ack = YES, msg = "DG Heat Disinfect Time [each sub state]") + dg_simulator.cmd_send_dg_disinfect_progress_time_heat(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_DG_HEAT_DISINFECT_TIME_DATA.value, msg = "DisinfectDGHeatTime", param = [120,60]) #ID:0x8500 - dg_simulator.cmd_send_dg_disinfect_progress_time_checmical(120,60) - verify_log(msg_id = MsgIds.MSG_ID_DG_CHEM_DISINFECT_TIME_DATA.value, ack = YES, msg = "DG Chem Disinfect Time [each sub state]") - - - # #0x3F00 -# the ID isn't getting logged for 63 -# hd_simulator.cmd_send_hd_general_response(63, 1, 2) -# verify_log(msg_id = MsgIds.MSG_ID_ALARM_CONDITION_CLEARED.value, ack = YES) - -#DG Broadcast Data - - #0x1F00 - dg_simulator.cmd_set_dg_ro_pump_data(1, 2,5) - verify_log(msg_id = MsgIds.MSG_ID_RO_PUMP_DATA.value, ack = YES , msg = "DG RO Pump Data") - - #0x2000 - dg_simulator.cmd_set_dg_pressures_data(1, 1, 2, 2) - verify_log(msg_id = MsgIds.MSG_ID_DG_PRESSURES_DATA.value, ack = YES , msg = "DG Pressures Data") - - #0x2400 - dg_simulator.cmd_set_dg_drain_pump_data(10, 5) - verify_log(msg_id = MsgIds.MSG_ID_DRAIN_PUMP_DATA.value, ack = YES , msg = "DG Drain Pump Data") - - #0x2700 - dg_simulator.cmd_set_dg_operation_mode(1) - verify_log(msg_id = MsgIds.MSG_ID_DG_OP_MODE.value, ack = YES , msg = "DG Operation Mode Data") - - #0x2800 - dg_simulator.cmd_set_dg_reservoir_data( 1, 2, 3) - verify_log(msg_id = MsgIds.MSG_ID_DG_RESERVOIRS_DATA.value, ack = YES , msg = "DG Reservoir Data") - - #0x2A00 - dg_simulator.cmd_set_dg_valves_states(3) - verify_log(msg_id = MsgIds.MSG_ID_DG_VALVES_STATES.value, ack = YES , msg = "DG Valves States Data") - - #0x2C00 - dg_simulator.cmd_set_dg_heaters_data(1, 2, 3) - verify_log(msg_id = MsgIds.MSG_ID_DG_HEATERS_DATA.value, ack = YES , msg = "Heaters Data") - - #0x0C00 - dg_simulator.cmd_set_dg_load_cell_readings_data(1, 2, 4, 3) - verify_log(msg_id = MsgIds.MSG_ID_LOAD_CELL_READINGS.value, ack = YES , msg = "Load Cell Readings Data") - - #0x2D00 - dg_simulator.cmd_set_dg_temperatures_data(1,2, 3, 4, 5, 6,7, 8,9, 10, 11, 12) - verify_log(msg_id = MsgIds.MSG_ID_DG_TEMPERATURE_DATA.value, ack = YES , msg = "DG Temperatures Data") - - #0x3100 - dg_simulator.cmd_send_dg_conductivity_data(1,2,3,4,5) - verify_log(msg_id = MsgIds.MSG_ID_DG_CONDUCTIVITY_DATA.value, ack = YES , msg = "DG Conductivity Data") - - #0x3700 - dg_simulator.cmd_send_dg_general_response(message_id=55, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_HEAT_DISINFECT_DATA.value, ack = YES , msg = "DG Heat Disinfect Data") - - #0x4200 - dg_simulator.cmd_send_dg_general_response(message_id=66, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_CONCENTRATE_PUMP_DATA.value, ack = YES , msg = "DG Concentrate Pumps Data") - - #0x4400 - dg_simulator.cmd_send_dg_general_response(message_id=68, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_UV_REACTORS_DATA.value, ack = YES , msg = "DG UV reactors Data") + dg_simulator.cmd_send_dg_disinfect_progress_time_checmical(total = 120, countdown = 60) + verify_log(msg_id = MsgIds.MSG_ID_DG_CHEM_DISINFECT_TIME_DATA.value, msg = "DisinfectDGChemicalTime", param = [120,60]) - #0x4500 - dg_simulator.cmd_send_dg_general_response(message_id=69, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_THERMISTORS_DATA.value, ack = YES , msg = "DG Thermistors Data") - - #0x4800 - dg_simulator.cmd_send_dg_general_response(message_id=72, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_FANS_DATA.value, ack = YES , msg = "DG Fans Data") - - #0x3400 - dg_simulator.cmd_send_accelerometer_dg_data(x=1, y=2, z=3, x_max=2, y_max=2, z_max=3, x_tilt=2, y_tilt=3, z_tilt=4) - verify_log(msg_id = MsgIds.MSG_ID_DG_ACCELEROMETER_DATA.value, ack = YES , msg = "DG Accelerometer Data") - - #0x6B00 - dg_simulator.cmd_send_dg_general_response(message_id=107, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_FLUID_LEAK_STATE.value, ack = YES , msg = "DG fluid leak data") - - #0x7A00 - dg_simulator.cmd_send_dg_general_response(message_id=122, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_FLUSH_DATA.value, ack = YES , msg = "DG flush data") - - #0x8600 - dg_simulator.cmd_send_dg_general_response(message_id=134, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_VOLTAGES_DATA.value, ack = YES , msg = "Monitored DG voltages") - - #0x8700 - dg_simulator.cmd_send_dg_general_response(message_id=135, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_CHEM_DISINFECT_DATA.value, ack = YES , msg = "DG Chemical Disinfect Data") - - #0xA100 - dg_simulator.cmd_send_dg_general_response(message_id=161, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_SWITCHES_DATA.value, ack = YES , msg = "DG switches data") - - #0xA700 - dg_simulator.cmd_send_dg_general_response(message_id=167, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_ALARM_INFO.value, ack = YES , msg = "DG alarm info") - - #0xAA00 - dg_simulator.cmd_send_dg_general_response(message_id=170, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_CONCENTRATE_MIXING_RATIOS_DATA.value, ack = YES , msg = "DG concentrate mixing ratios") - - #0xA600 - dg_simulator.cmd_send_dg_general_response(message_id=166, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_DIALYSATE_FLOW_METER_DATA.value, ack = YES , msg = "Dialysate Flow Rate") - - #0xAB00 - dg_simulator.cmd_send_dg_general_response(message_id=171, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_SCHEDULED_RUNS_DATA.value, ack = YES , msg = "DG scheduled runs data") - - #0xAC00 - dg_simulator.cmd_send_dg_general_response(message_id=172, accepted=0, reason=1) - verify_log(msg_id = MsgIds.MSG_ID_DG_SCHEDULED_RUNS_INFO.value, ack = YES , msg = "DG scheduled runs info") - -# #0xAE00 -# no msg_id in msg_ids.py -# dg_simulator.cmd_send_dg_general_response(message_id=174, accepted=0, reason=1) -# verify_log(msg_id = '174', ack = YES , msg = "DG Fill Mode Data") -# -# #0xAF00 -# no msg_id in msg_ids.py -# dg_simulator.cmd_send_dg_general_response(message_id=175, accepted=0, reason=1) -# verify_log(msg_id = '175', ack = YES , msg = "DG Idle Mode Bad Fill Sub-states") -# - #Alarm - - #0x0200 - hd_alarm.cmd_send_clear_alarms() - verify_log(msg_id = MsgIds.MSG_ID_ALARM_STATUS.value, ack = YES , msg = "Alarm Status (Composite)") - - #0x0300 - hd_alarm.cmd_set_alarm_triggered(3,4, 2, 3, 5, 1, 1, 3) - verify_log(msg_id = MsgIds.MSG_ID_ALARM_TRIGGERED.value, ack = YES , msg = "Alarm Triggered") - - #0x0400 - hd_alarm.cmd_set_alarm_cleared(4) - verify_log(msg_id = MsgIds.MSG_ID_ALARM_CLEARED.value, ack = YES , msg = "Alarm Cleared") - - #0x7C00 - hd_simulator.cmd_send_hd_general_response(124, 1, 2) - verify_log(msg_id = MsgIds.MSG_ID_HD_ALARM_AUDIO_VOLUME_SET_RESPONSE.value, ack = YES , msg = "Set Alarm Audio Volume Level Response") - - #0x3200 - hd_simulator.cmd_send_hd_general_response(50, 1, 2) - verify_log(msg_id = MsgIds.MSG_ID_USER_REQUEST_ALARM_SILENCE.value, ack = YES , msg = "Alarm Silence Request") - - #0x9800 - hd_alarm.cmd_send_active_list_response(1, 2, 3, 3, 3, 3, 2,3,4, 4,4 ,9) - verify_log(msg_id = MsgIds.MSG_ID_HD_ACTIVE_ALARMS_LIST_REQUEST_RESPONSE.value, ack = YES , msg = "Active Alarms List Response") - - - #UF Vol. - - #0x4100 - hd_simulator.cmd_set_treatment_adjust_ultrafiltration_accepted(1) - verify_log(msg_id = MsgIds.MSG_ID_USER_UF_PAUSE_RESUME_RESPONSE.value, ack = YES , msg = "UF Pause/Resume Response") - - #0x1300 - hd_simulator.cmd_send_hd_general_response(19, 1, 2) - verify_log(msg_id = MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE.value, ack = YES , msg = "UF Vol. Change Response") - - #0x2E00 - hd_simulator.cmd_set_treatment_adjust_ultrafiltration_confirm_rejected(1) - verify_log(msg_id = MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE.value, ack = YES , msg = "UF Vol. Change Confirmation Response") - - #Saline - - #0x1400 - hd_simulator.cmd_set_saline_bolus_response( 0,1, 10) - verify_log(msg_id = MsgIds.MSG_ID_USER_SALINE_BOLUS_RESPONSE.value, ack = YES , msg = "Saline Bolus Response") - - #Heparin - - #0x4C00 - hd_simulator.cmd_set_heparin_pause_resume_response(1,2) - verify_log(msg_id = MsgIds.MSG_ID_HD_HEPARIN_PAUSE_RESUME_RESPONSE.value, ack = YES , msg = "Heparin Pause/Resume Response") - - #Duration - - #0x1B00 - hd_simulator.cmd_send_treatment_adjust_duration_response(0,1,5,1) - verify_log(msg_id = MsgIds.MSG_ID_USER_TREATMENT_TIME_CHANGE_RESPONSE.value, ack = YES , msg = "Treatment Duration change Response") - - #Blood / Dialysate - - #0x1800 - hd_simulator.cmd_send_treatment_adjust_blood_dialysate_response(1, 1, 12, 10) - verify_log(msg_id = MsgIds.MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_RESPONSE.value, ack = YES , msg = "Blood/dialysate rate change Response") - - #PRS-58: In-Line Blood Pressure Limits - - #0x4700 - hd_simulator.cmd_send_treatment_adjust_pressures_limit_response(1,1,1, 2, 3, 4) - verify_log(msg_id = MsgIds.MSG_ID_HD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, ack = YES , msg = "A/V BP Limit Change Response") + \ No newline at end of file