Index: simulator/plugins/PostTreatment/loader.py =================================================================== diff -u -rf7ddf9ad0024ce755a89661d7bf47a2342d97890 -r7b31e16c71ec5da38ce5759fbfb44a885554cf13 --- simulator/plugins/PostTreatment/loader.py (.../loader.py) (revision f7ddf9ad0024ce755a89661d7bf47a2342d97890) +++ simulator/plugins/PostTreatment/loader.py (.../loader.py) (revision 7b31e16c71ec5da38ce5759fbfb44a885554cf13) @@ -12,8 +12,6 @@ from dialin.ui.hd_simulator import HDSimulator from dialin.ui.hd_simulator import RequestRejectReasons -from dialin.utils.conversions import unsigned_to_bytearray, float_to_bytearray - # plugin specific # -- None -- @@ -244,45 +242,43 @@ the slot for accept button :return: none """ - parameters = [ - # column 1 - unsigned_to_bytearray(int(self.leBloodFlowRate.text())), - unsigned_to_bytearray(int(self.leDialysateFlowRate.text())), - unsigned_to_bytearray(int(self.leTreatmentDuration.text())), - unsigned_to_bytearray(int(self.leActualTreatmentDuration.text())), - unsigned_to_bytearray(int(self.leAcidConcentrateType.text())), - unsigned_to_bytearray(int(self.leBicarbonateConcentrateType.text())), - unsigned_to_bytearray(int(self.lePotassiumConcentration.text())), - unsigned_to_bytearray(int(self.leCalciumConcentration.text())), - unsigned_to_bytearray(int(self.leBicarbonateConcentration.text())), - unsigned_to_bytearray(int(self.leSodiumConcentration.text())), - float_to_bytearray(float(self.leDialysateTemperature.text())), - unsigned_to_bytearray(int(self.leDialyzerType.text())), - unsigned_to_bytearray(int(self.leTreatmentDateTime.text())), - float_to_bytearray(float(self.leAverageBloodFlow.text())), - float_to_bytearray(float(self.leAverageDialysateFlow.text())), - float_to_bytearray(float(self.leDialysateVolumeUsed.text())), - float_to_bytearray(float(self.leAverageDialysateTemp.text())), - # column 2 - float_to_bytearray(float(self.leTargetUFVolume.text())), - float_to_bytearray(float(self.leActualUFVolume.text())), - float_to_bytearray(float(self.leTargetUFRate.text())), - float_to_bytearray(float(self.leActualUFRate.text())), - unsigned_to_bytearray(int(self.leSalineBolusVolume.text())), - unsigned_to_bytearray(int(self.leHeparinType.text())), - unsigned_to_bytearray(int(self.leHeparinConcentration.text())), - float_to_bytearray(float(self.leHeparinBolusVolume.text())), - float_to_bytearray(float(self.leHeparinDispenseRate.text())), - unsigned_to_bytearray(int(self.leHeparinPreStop.text())), - float_to_bytearray(float(self.leHeparinDeliveredVolume.text())), - float_to_bytearray(float(self.leAverageArterialPressure.text())), - float_to_bytearray(float(self.leAverageVenousPressure.text())), - unsigned_to_bytearray(int(self.leEndTreatmentEarlyAlarm.text())), - unsigned_to_bytearray(int(self.leDeviceID.text())), - unsigned_to_bytearray(int(self.leWaterSampleTestResult.text())) - ] - - self.hd_simulator.cmd_send_post_treatment_log_response(True, 0, parameters) + self.hd_simulator.cmd_send_post_treatment_log_response(True, 0, + # column 1 + int(self.leBloodFlowRate.text()), + int(self.leDialysateFlowRate.text()), + int(self.leTreatmentDuration.text()), + int(self.leActualTreatmentDuration.text()), + int(self.leAcidConcentrateType.text()), + int(self.leBicarbonateConcentrateType.text()), + int(self.lePotassiumConcentration.text()), + int(self.leCalciumConcentration.text()), + int(self.leBicarbonateConcentration.text()), + int(self.leSodiumConcentration.text()), + float(self.leDialysateTemperature.text()), + int(self.leDialyzerType.text()), + int(self.leTreatmentDateTime.text()), + float(self.leAverageBloodFlow.text()), + float(self.leAverageDialysateFlow.text()), + float(self.leDialysateVolumeUsed.text()), + float(self.leAverageDialysateTemp.text()), + # column 2 + float(self.leTargetUFVolume.text()), + float(self.leActualUFVolume.text()), + float(self.leTargetUFRate.text()), + float(self.leActualUFRate.text()), + int(self.leSalineBolusVolume.text()), + int(self.leHeparinType.text()), + int(self.leHeparinConcentration.text()), + float(self.leHeparinBolusVolume.text()), + float(self.leHeparinDispenseRate.text()), + int(self.leHeparinPreStop.text()), + float(self.leHeparinDeliveredVolume.text()), + float(self.leAverageArterialPressure.text()), + float(self.leAverageVenousPressure.text()), + int(self.leEndTreatmentEarlyAlarm.text()), + int(self.leDeviceID.text()), + int(self.leWaterSampleTestResult.text()) + ) self.lblActionTxLog.setText('Accepted ') @Slot() @@ -291,43 +287,11 @@ the slot for reject button :return: none """ - parameters = [ - # column 1 - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - float_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - # column 2 - float_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - unsigned_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - float_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0), - unsigned_to_bytearray(0) - ] reason = self.spnReasonTxLog.value() - self.hd_simulator.cmd_send_post_treatment_log_response(False, reason, parameters) + self.hd_simulator.cmd_send_post_treatment_log_response(False, reason, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 + ) self.lblActionTxLog.setText('Rejected ' + "{}".format(reason))