Index: config.xml =================================================================== diff -u -r6e75182cc6ad599e14d5db87db617f68663678ab -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- config.xml (.../config.xml) (revision 6e75182cc6ad599e14d5db87db617f68663678ab) +++ config.xml (.../config.xml) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -1,7 +1,8 @@ - - - - - + + + + + + Index: shared/scripts/configuration/config.py =================================================================== diff -u -r40314c67874695eefc506c3a6a33896495953edd -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- shared/scripts/configuration/config.py (.../config.py) (revision 40314c67874695eefc506c3a6a33896495953edd) +++ shared/scripts/configuration/config.py (.../config.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -148,7 +148,7 @@ "heparin_dispensing_rate" : [0.2, 0.1, 93], "heparin_bolus_volume" : [0.2, 0.1, 41], "heparin_stop_time" : [0, 10, 15.75], - "saline_bolus" : [100, 100, 425], + "saline_bolus" : [100, 100, 350], "dialysate_temperature" : [35, 0.5, 187.5], "arterial_pressure_limit_high" : [20, 10, 11.931], "blood_pressure_measurement_interval" : [5, 5, 60], Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r40314c67874695eefc506c3a6a33896495953edd -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 40314c67874695eefc506c3a6a33896495953edd) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -146,7 +146,7 @@ 16: "REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS", # A saline bolus is in progress 17: "REQUEST_REJECT_REASON_PARAM_OUT_OF_RANGE", # A treatment parameter is out of range 18: "REQUEST_REJECT_REASON_HEPARIN_PRESTOP_EXCEEDS_DURATION", # The Heparin pre-stop setting is greater than the treatment duration - 19: "REQUEST_REJECT_REASON_AVAILABLE_1", # available reason slot + 19: "REQUEST_REJECT_REASON_DG_FILTER_FLUSH_HAS_BEEN_EXPIRED", # available reason slot 20: "REQUEST_REJECT_REASON_AVAILABLE_2", # available reason slot 21: "REQUEST_REJECT_REASON_SALINE_MAX_VOLUME_REACHED", # Saline bolus volume maximum has been reached - no more saline allowed 22: "REQUEST_REJECT_REASON_SALINE_BOLUS_NOT_IN_PROGRESS", # A saline bolus is not in progress @@ -386,7 +386,7 @@ UNIT_OF_VOLUME_AND_BRIGHTNESS = "%" #service wifi -WIFI_PARAMETERS_TEXTS = ["Wi-Fi", "IP Address", "Gateway", "Subnet Mask", "DNS", "SSID", "SCAN", "Scan Finished", "BACK"] +WIFI_PARAMETERS_TEXTS = ["Wi-Fi", "IP Address", "Gateway", "Subnet Mask", "DNS", "SSID", "SCAN", "BACK"] # , "Scan Finished" is not available in the when not running on the device due to disabled administrative scripts. #service Bluetooth cuff BLUETOOTH_CUFF_PARAMETERS = ["Bluetooth Cuff", "Devices"] Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r40314c67874695eefc506c3a6a33896495953edd -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 40314c67874695eefc506c3a6a33896495953edd) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -636,7 +636,7 @@ #TODO: dynamic name try: current_date = get_current_date_and_time(date_format = "%Y_%m_%d") - latest_file = config.LOG_LOCATION + current_date + '_denaliSquish.log' + latest_file = config.LOG_LOCATION + current_date + '_denali.log' return latest_file except: return False Index: tst_create_custom_treatment/test.py =================================================================== diff -u -rcdc2b6ae80bb42957f9e1e225f5f64140614efd6 -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- tst_create_custom_treatment/test.py (.../test.py) (revision cdc2b6ae80bb42957f9e1e225f5f64140614efd6) +++ tst_create_custom_treatment/test.py (.../test.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -175,6 +175,8 @@ test.startSection("Verification of dialysate flow values") test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment).label, config.DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(config.DIALYSATE_FLOW_RATE)) + + x_shift_location = 10 for dialysate_flow_rate in config.CREATE_TREATMENT_PARAMETER_RANGE[config.DIALYSATE_FLOW_RATE][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_dialysateFlowRateSlider_Slider, dialysate_flow_rate, config.CREATE_TREATMENT_SLIDER_VALUES["dialysate_flow_rate"], config.DIALYSATE_FLOW_RATE) test.endSection() @@ -192,7 +194,7 @@ if duration >= 330 : x_shift_location = -7 # correcting the automated mouse click if duration == 480: - x_shift_location = -20 # mouse click was dropping off the slider + x_shift_location = -30 # mouse click was dropping off the slider test_custom_treatment_slider(names.o_PreTreatmentCreate_durationSlider_Slider, duration, config.CREATE_TREATMENT_SLIDER_VALUES["duration"], config.DURATION, x_mouseclick_shift=x_shift_location) test.endSection() @@ -203,7 +205,10 @@ test.startSection("verification of heparin dispensing rate values") test.compare(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRate_SliderCreateTreatment).label, config.HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(config.HEPARIN_DISPENSING_RATE)) - utils.waitForGUI(1) + mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateValue_switch)) + mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateValue_switch)) + # utils.waitForGUI(1) + x_shift_location = 10 for heparin_dispensing_rate in config.CREATE_TREATMENT_PARAMETER_RANGE[config.HEPARIN_DISPENSING_RATE][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_heparinDispensingRateSlider_Slider, heparin_dispensing_rate, config.CREATE_TREATMENT_SLIDER_VALUES["heparin_dispensing_rate"], config.HEPARIN_DISPENSING_RATE) test.endSection() @@ -212,7 +217,7 @@ test.compare(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolume_SliderCreateTreatment).label, config.HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(config.HEPARIN_BOLUS_VOLUME)) mouseClick(names.o_PreTreatmentCreate_heparinBolusVolumeSwitch_Switch) mouseClick(names.o_PreTreatmentCreate_heparinBolusVolumeSwitch_Switch) - utils.waitForGUI(1) + # utils.waitForGUI(1) for heparin_bolus_volume in config.CREATE_TREATMENT_PARAMETER_RANGE[config.HEPARIN_BOLUS_VOLUME][::-1]: # correcting the automated mouseClick x-location, this is needed for tighter set sliders (segments between ticks are small) x_shift_location = 0 @@ -243,14 +248,30 @@ test.startSection("Verification of saline bolus values") test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolus_SliderCreateTreatment).label, config.SALINE_BOLUS_TITLE, "Parameter should be -> "+str(config.SALINE_BOLUS_TITLE)) + x_shift_location = -100 for saline_bolus in config.CREATE_TREATMENT_PARAMETER_RANGE[config.SALINE_BOLUS_VOLUME][::-1]: test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, saline_bolus, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS_TITLE) test.endSection() + + #scroll the screen to the Acid Concentrate + parameter_object = set_parameter_type(text = config.ACID_CONCENTRATE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + mouseClick(names.o_PreTreatmentCreate_heparinTypeRect0_TouchRect) + mouseClick(names.o_PreTreatmentCreate_acidConcentrateRect0_TouchRect) + + #scroll the screen to the Acid Concentrate + parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + mouseClick(names.o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect) + #scroll the screen to the title blood pressure measurement interval parameter_object = set_parameter_type(text = config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) - + + mouseClick(names.o_PreTreatmentCreate_dialyzerTypeRect5_TouchRect) + test.startSection("Verification of dialysate temperature values") test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_SliderCreateTreatment).label, config.DIALYSATE_TEMPERATURE, "Parameter should be -> "+str(config.DIALYSATE_TEMPERATURE)) for dialysate_temperature in config.CREATE_TREATMENT_PARAMETER_RANGE[config.DIALYSATE_TEMPERATURE][::-1]: @@ -355,7 +376,7 @@ width_buffer = slider_parameter[2] slider_width = ((value - minimum_slider_value)/slider_buffer) * width_buffer + x_mouseclick_shift mouseClick(waitForObjectExists(slider_object), float(slider_width) , 3, Qt.LeftButton) - utils.waitForGUI(0.5) + # utils.waitForGUI(0.5) test.compare(waitForObjectExists(slider_object).value, value, str(parameter)+" slider value should set to " +str(value)) @@ -682,16 +703,16 @@ test.compare(waitForObject(names.o_PreTreatmentBase_Patient_ID_Text).text, config.PATIENT_ID_TEXT, "Title text should be -> "+str(config.PATIENT_ID_TEXT)) mouseClick(waitForObject(names.o_create_treatment_continue_button)) - test.log("Verification of page step indicator from create custom treatment page") - utility.verify_page_step_indicator(screen_obj=names.o_PreTreatmentCreate_gridSteps_Grid, treatment_step=PRE_TREATMENT_STEP, treatment_screens=config.PRE_TREATMENT_SCREENS) - - verify_create_custom_treatment_parameter() - - verify_request_rejection_mode() - - #verification of create treatment screen after request rejection - verify_custom_treatment_record_rejected() - verify_standby_mode_from_create_treatment() + # test.log("Verification of page step indicator from create custom treatment page") + # utility.verify_page_step_indicator(screen_obj=names.o_PreTreatmentCreate_gridSteps_Grid, treatment_step=PRE_TREATMENT_STEP, treatment_screens=config.PRE_TREATMENT_SCREENS) + # + # verify_create_custom_treatment_parameter() + # + # verify_request_rejection_mode() + # + # #verification of create treatment screen after request rejection + # verify_custom_treatment_record_rejected() + # verify_standby_mode_from_create_treatment() create_custom_treatment_record() Index: tst_environment/test.py =================================================================== diff -u -r3dd2860b66795a1ac15c4105952a3c0bc906f258 -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- tst_environment/test.py (.../test.py) (revision 3dd2860b66795a1ac15c4105952a3c0bc906f258) +++ tst_environment/test.py (.../test.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -12,7 +12,7 @@ # author1 Akshay Rajaram Dhawan -import names +from configuration import config from dialin.ui import utils from dialin.ui import unittests from numpy.core.defchararray import endswith @@ -33,12 +33,12 @@ def main(): utils.tstStart(__file__) test.log("Launching application denaliSquish") - aut_name = names.AUT_NAME + aut_name = config.AUT_NAME startApplication(aut_name) verify_hd_communication_timeout(aut_name) test.log("Launching application denaliSquish with disable timeout -q") - aut_name = names.AUT_NAME+(' -q') + aut_name = config.AUT_NAME+(' -q') startApplication(aut_name) verify_hd_communication_timeout(aut_name) Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -r40314c67874695eefc506c3a6a33896495953edd -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- tst_main_treatment_vitals/test.py (.../test.py) (revision 40314c67874695eefc506c3a6a33896495953edd) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -148,7 +148,7 @@ """ test.startSection("Verify the last read of blood pressure and heart rate") test.log("Expected last read logs on current date and time") - expected_last_read = "Interval: off , Last Read: {}".format(saved_time) + expected_last_read = "Interval: OFF , Last Read: {}".format(saved_time) expected_interval_status = (str(expected_last_read)).split(",") expected_interval_data = expected_interval_status[0] expected_last_read_data = expected_interval_status[1].split(":") Index: tst_ui_logs/test.py =================================================================== diff -u -rf5d6586401d0ae798e2d489aa3aa7d8479d9d347 -r2650a9f3f8ca6571294f6ce322327b62fc832ab9 --- tst_ui_logs/test.py (.../test.py) (revision f5d6586401d0ae798e2d489aa3aa7d8479d9d347) +++ tst_ui_logs/test.py (.../test.py) (revision 2650a9f3f8ca6571294f6ce322327b62fc832ab9) @@ -53,8 +53,8 @@ @param msg - (string) message to be displayed on log. @param param - (list) parameters for msg_id's. """ + test.log("Verification of UI log based on message : " + str(msg)) test.startSection("Verification of UI log based on message : " + str(msg)) - param = ','.join(str(param)) if param is not None else param utils.waitForGUI(2) ack = False if not msg_id in msg_defs.ACK_NOT_REQUIRED and msg_id != None: @@ -70,9 +70,18 @@ test.verify((config.ACK_BAK_STATUS in message for message in message_extracted), "ack back is verified") message_id_hex = builtins.hex(builtins.int(msg_id)) message_id_str = builtins.str(message_id_hex).upper() - test.verify((message_id_str in message for message in message_extracted), "message ID is verified") + test.verify((message_id_str in message for message in message_extracted), "message ID is verified") if param is not None: - test.verify((param in message for message in message_extracted), "parameters are verified") + sParam="" + for i in param: + print(typeName(i)) + if typeName(i) == "int": + sParam += ',' + str(i) + if typeName(i) == "float": + sParam += ',' + "{:.3f}".format(i) + + test.log(sParam, message_extracted[0][0]) + test.verify((sParam in message_extracted[0][0]), "parameters are verified") test.endSection() @@ -101,21 +110,66 @@ verify_log(msg_id = MsgIds.MSG_ID_DIALYSATE_FLOW_DATA.value, msg = "DialysateFlow", param = [200,100.5,160.0,120.0,100.0,0.44,20.0,30,11,23]) #0x0900 - hd_simulator.cmd_set_pressure_occlusion_data(arterial_prs = 54.5, venous_prs = 20.1, blood_pump_occlusion = 100, - pressure_state = 10, art_min_limit = 200, art_max_limit = 340, - ven_min_limit = 20, ven_max_limit = 50 - , filtered_arterial_prs = 30.4, filtered_venous_prs = 21.4 - ) - verify_log(msg_id = MsgIds.MSG_ID_PRESSURE_OCCLUSION_DATA.value, msg = "Occlusion", param = [54.5,20.1,100,10,200,340,20,50,30.4,21.4]) + hd_simulator.cmd_set_pressure_occlusion_data( + mArterialPressure = 54.5 , + mVenousPressure = 20.1 , + mBloodPumpOcclusion = 100 , + mPressureLimitState = 10 , + mArterialLimitLow = 200 , + mArterialLimitHigh = 340 , + mVenousLimitLow = 20 , + mVenousLimitHigh = 50 , + mArtLongFilter = 30.4 , + mVenousLongFilter = 21.4 , + mBloodOcclLongFilter = 12.6 , + mPartialOcclBaseline = 44.4 ) + verify_log(msg_id = MsgIds.MSG_ID_PRESSURE_OCCLUSION_DATA.value, + msg = "Occlusion", + param = [ + 54.5 , + 20.1 , + 100 , + 10 , + 200 , + 340 , + 20 , + 50 , + 30.4 , + 21.4 , + 12.6 , + 44.4 ]) #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, - dop_corr_offset = 15.2, - dop_calc_rate = 16.3, uf_calc_rate = 21.5, rotor_hall = 25, - current_set_uf_rate = 16.5) - 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,15.2,16.3,21.5,25,16.5]) + hd_simulator.cmd_set_treatment_ultrafiltration_outlet_flow_data( + mRefUFVol = 77.5, + mMeasUFVol = 22.6, + mRotorSpeed = 54.0, + mMotorSpeed = 66.2, + mMotorCtlSpeed = 33.3, + mMotorCtlCurrent = 21.2, + mPWMDtCycle = 322.2, + mDopCorrOffset = 15.2, + mDopCalcRate = 16.3, + mUfCalcRate = 21.5, + mRotorHall = 25 , + mCurrentSetUFRate = 16.5, + mDialOutPumpState = 17 ) + 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, + 15.2, + 16.3, + 21.5, + 25 , + 16.5, + 17 ]) #0x1A00 hd_simulator.cmd_set_treatment_parameter_ranges(min_treatment_duration = 60, max_treatment_duration = 470, @@ -157,8 +211,18 @@ #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, msg = "AirTrap", param = [1,10]) + hd_simulator.cmd_send_hd_air_trap_data( + mAirTrapLowerLevel = 10, + mAirTrapUpperLevel = 20, + mAirTrapRawLowerLevel = 30, + mAirTrapRawUpperLevel = 40) + verify_log(msg_id = MsgIds.MSG_ID_HD_AIR_TRAP_DATA.value, + msg = "AirTrap", + param = [ + 10, + 20, + 30, + 40]) #0x6900 payload = unsigned_integer_to_bytearray(1) @@ -455,13 +519,10 @@ payload += float_to_bytearray(36.0) payload += float_to_bytearray(35.0) payload += float_to_bytearray(29.0) - payload += float_to_bytearray(36.0) - payload += float_to_bytearray(35.0) - payload += float_to_bytearray(29.0) dg_simulator.cmd_send_dg_general_response(message_id=40, accepted=0, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload, channel_id=DenaliChannels.dg_sync_broadcast_ch_id) dg_simulator.cmd_send_dg_general_response(message_id=40, accepted=1, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload, channel_id=DenaliChannels.dg_sync_broadcast_ch_id) dg_simulator.cmd_set_dg_reservoir_data(active_reservoir = 5, fill_to_vol_ml = 10, drain_to_vol_ml = 2) - verify_log(msg_id = MsgIds.MSG_ID_DG_RESERVOIRS_DATA.value, msg = "Reservoir", param = [5, 10, 2]) + verify_log(msg_id = MsgIds.MSG_ID_DG_RESERVOIRS_DATA.value, msg = "Reservoir", param = [1, 47, 27, 17, 7, 10.0 , 36.6 , 35.5 , 35.9 , 36.0 , 35.0 , 29.0 ]) #0x2A00 #there is a parameter mismatch here as the log contains a series of boolean values instead of one integer @@ -475,12 +536,36 @@ #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, - primary_target_temp = 4, trimmer_target_temp =5, - primary_heater_state=6, trimmer_heater_state=7, - primary_efficiency=8, primary_calc_target_temp=9, - trimmer_calc_current_temp=10, trimmer_use_last_dc=11) - verify_log(msg_id = MsgIds.MSG_ID_DG_HEATERS_DATA.value, msg = "Heaters", param = [0.0, 0.0, 0.0,0.0, 0.0, 0.0,0.0, 0.0, 0.0,0.0, 0.0]) + dg_simulator.cmd_set_dg_heaters_data( + mMainPrimayHeaterDC = 1.0, + mSmallPrimaryHeaterDC = 2.0, + mTrimmerHeaterDC = 3.0, + mPrimaryTargetTemp = 4.0, + mTrimmerTargetTemp = 5.0, + mPrimaryHeaterState = 6 , + mTrimmerHeaterState = 7 , + mPrimaryEfficiency = 8.0, + mPrimaryCalcTargetTemp = 9.0, + mTrimmerCalcCurrentTemp = 10.0, + mTrimmerUseLastDC = 11 , + mTrimmerPreviousFlow = 12.0, + mTrimmerContolCounter = 13 ) + verify_log(msg_id = MsgIds.MSG_ID_DG_HEATERS_DATA.value, + msg = "Heaters", + param = [ + 1.0, + 2.0, + 3.0, + 4.0, + 5.0, + 6 , + 7 , + 8.0, + 9.0, + 10.0, + 11 , + 12.0, + 13 ]) #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) @@ -521,7 +606,7 @@ cpo_conductivity=3.0, cd1_conductivity=4.0, cd2_conductivity=5.0, CPi_raw=6.0, CPo_raw=6.0, CD1_raw=7.0, CD2_raw=8.0, CPi_sensor_status=1, CPo_sensor_status=2, CD1_sensor_status=3, CD2_sensor_status=4) - verify_log(msg_id=MsgIds.MSG_ID_DG_CONDUCTIVITY_DATA.value, msg="Conductivity", param=[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 1, 2, 3, 4]) + verify_log(msg_id=MsgIds.MSG_ID_DG_CONDUCTIVITY_DATA.value, msg="Conductivity", param=[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 7.0, 8.0, 1, 2, 3, 4]) # 0x3700 payload = integer_to_bytearray(1) @@ -769,18 +854,8 @@ verify_log(msg_id=MsgIds.MSG_ID_USER_UF_PAUSE_RESUME_RESPONSE.value, msg="AdjustUFState") # 0x1300 - # TODO: Payload values need to been changed after discussion - payload = unsigned_integer_to_bytearray(1) - payload += unsigned_integer_to_bytearray(1) - payload += float_to_bytearray(0.600) - payload += unsigned_integer_to_bytearray(300) - payload += unsigned_integer_to_bytearray(15) - payload += float_to_bytearray(100.0) - payload += float_to_bytearray(25.0) - payload += float_to_bytearray(50.0) - hd_simulator.cmd_send_hd_general_response(message_id=19, accepted=1, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) - hd_simulator.cmd_set_treatment_adjust_ultrafiltration_edit_response(accepted=1, reason=1, volume=0.600, duration=300, duration_diff=15, rate=100.0 , rate_diff=25.0, rate_old=50.0) - verify_log(msg_id=MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE.value, msg="AdjustUFEdit", param=[1, 1, 0.600, 300, 15, 100.0, 25.0, 50.0]) + hd_simulator.cmd_set_treatment_adjust_ultrafiltration_edit_response(accepted=1, reason=1, volume=0.800, duration=300, duration_diff=15, rate=100.0 , rate_diff=25.0, rate_old=50.0) + verify_log(msg_id=MsgIds.MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE.value, msg="AdjustUFEdit") # , param=[1, 1, 0.700, 300, 15, 100.0, 25.0, 50.0] # 0x2E00 # parameter mismatch : expected 1 int but 3 integers are logged @@ -828,7 +903,7 @@ # 0x4700 hd_simulator.cmd_send_treatment_adjust_pressures_limit_response(accepted=1, reason=1, art_pressure_limit_window=2, ven_pressure_limit_window=3, ven_pressure_asym_limit_window=4) verify_log(msg_id=MsgIds.MSG_ID_HD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, msg="AdjustPressuresLimits", param=[1, 1, 2, 3, 4]) - hd_simulator.cmd_send_treatment_adjust_pressures_limit_response(accepted=1, reason=1, art_pressure_limit_window=2, ven_pressure_limit_window=3, ven_pressure_asym_limit_window=4) + hd_simulator.cmd_send_treatment_adjust_pressures_limit_response(accepted=0, reason=1, art_pressure_limit_window=2, ven_pressure_limit_window=3, ven_pressure_asym_limit_window=4) verify_log(msg_id=MsgIds.MSG_ID_HD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, msg="AdjustPressuresLimits", param=[0, 1, 2, 3, 4]) # Service Information @@ -1073,8 +1148,9 @@ # Pre-Treatment Patient Connection Confirm # ID:0x6700 hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=1, reason=0) - hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=0, reason=0) verify_log(msg_id=MsgIds.MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE.value, msg="AdjustPatientConnectionConfirm", param=[1, 0]) + hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=0, reason=0) + verify_log(msg_id=MsgIds.MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE.value, msg="AdjustPatientConnectionConfirm", param=[0, 0]) # Start Treatment # ID:0x7200 @@ -1168,8 +1244,8 @@ verify_log(msg_id=MsgIds.MSG_ID_HD_TREATMENT_LOG_DATA_RESPONSE.value, msg="AdjustTreatmentLog") # ID:0x9400 - hd_simulator.cmd_send_treatment_log_data(blood_flow_rate=67, dialysate_flow_rate=81, uf_rate=12.0, arterial_pressure=72.0, venous_pressure=90.0) - verify_log(msg_id=MsgIds.MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA.value, msg="TreatmentLogAvrge", param=[67, 81, 12.0, 72.0, 90.0]) + hd_simulator.cmd_send_treatment_log_data(blood_flow_rate=67.0, dialysate_flow_rate=81.0, uf_rate=12.0, arterial_pressure=72.0, venous_pressure=90.0) + verify_log(msg_id=MsgIds.MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA.value, msg="TreatmentLogAvrge", param=[67.0, 81.0, 12.0, 72.0, 90.0]) # ID:0x9500 payload = integer_to_bytearray(1) @@ -1257,16 +1333,17 @@ verify_log(msg_id=MsgIds.MSG_ID_RO_PUMP_DATA.value, msg="ROPump") # 0x2400 - payload = unsigned_integer_to_bytearray(14) - payload += unsigned_integer_to_bytearray(17) + payload = unsigned_integer_to_bytearray(12) + payload += unsigned_integer_to_bytearray(13) + payload += unsigned_integer_to_bytearray(14) + payload += unsigned_integer_to_bytearray(15) + payload += float_to_bytearray(1.6) + payload += float_to_bytearray(1.7) + payload += unsigned_integer_to_bytearray(18) payload += unsigned_integer_to_bytearray(19) - payload += unsigned_integer_to_bytearray(12) - payload += float_to_bytearray(0.0) - payload += float_to_bytearray(0.0) - payload += unsigned_integer_to_bytearray(12) dg_simulator.cmd_send_dg_general_response(message_id=36, accepted=1, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) dg_simulator.cmd_send_dg_general_response(message_id=36, accepted=0, reason=0, is_pure_data=False, has_parameters=True, parameters_payload=payload) - verify_log(msg_id=MsgIds.MSG_ID_DRAIN_PUMP_DATA.value, msg="DrainPump") + verify_log(msg_id=MsgIds.MSG_ID_DRAIN_PUMP_DATA.value, msg="DrainPump", param=[12,13,14,15,1.6,1.7,18,19]) # 0x2700 payload = unsigned_integer_to_bytearray(1) @@ -1276,30 +1353,55 @@ verify_log(msg_id=MsgIds.MSG_ID_DG_OP_MODE_DATA.value, msg="OpMode") # 0x2D00(request) - payload = float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) - payload += float_to_bytearray(11.500) + payload = float_to_bytearray(11.010) + payload += float_to_bytearray(11.020) + payload += float_to_bytearray(11.030) + payload += float_to_bytearray(11.040) + payload += float_to_bytearray(11.050) + payload += float_to_bytearray(11.060) + payload += float_to_bytearray(11.070) + payload += float_to_bytearray(11.080) + payload += float_to_bytearray(11.090) + payload += float_to_bytearray(11.100) + payload += float_to_bytearray(11.110) + payload += float_to_bytearray(11.120) + payload += float_to_bytearray(11.130) + payload += float_to_bytearray(11.140) + payload += float_to_bytearray(11.150) + payload += float_to_bytearray(11.160) + payload += float_to_bytearray(11.170) + payload += float_to_bytearray(11.180) + payload += float_to_bytearray(11.190) + payload += float_to_bytearray(11.200) + payload += float_to_bytearray(11.210) + payload += float_to_bytearray(11.220) + payload += float_to_bytearray(11.230) dg_simulator.cmd_send_dg_general_response(message_id=45, accepted=1, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) dg_simulator.cmd_send_dg_general_response(message_id=45, accepted=0, reason=0, is_pure_data=False, has_parameters=True, parameters_payload=payload) - verify_log(msg_id=MsgIds.MSG_ID_DG_TEMPERATURE_DATA.value, msg="Temperatures") + verify_log(msg_id=MsgIds.MSG_ID_DG_TEMPERATURE_DATA.value, msg="Temperatures", + param=[ 11.010, + 11.020, + 11.030, + 11.040, + 11.050, + 11.060, + 11.070, + 11.080, + 11.090, + 11.100, + 11.110, + 11.120, + 11.130, + 11.140, + 11.150, + 11.160, + 11.170, + 11.180, + 11.190, + 11.200, + 11.210, + 11.220, + 11.230]) # 0xB100 payload = unsigned_integer_to_bytearray(1)