Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r9fd0e3390bdb0e8d7fcce0722d1e94cb029e629c -rc5219139988ee930b25a652578de9c6597613846 --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 9fd0e3390bdb0e8d7fcce0722d1e94cb029e629c) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision c5219139988ee930b25a652578de9c6597613846) @@ -95,8 +95,6 @@ UF_START_STATE = 0 # Start state of the ultrafiltration state machine UF_PAUSED_STATE = 1 # Paused state of the ultrafiltration state machine UF_RUNNING_STATE = 2 # Running state of the ultrafiltration state machine - UF_OFF_STATE = 3 # Completed/off state of the ultrafiltration state machine - UF_COMPLETED_STATE = 4 # Completed state of ultrafiltration state machine # Heparin states @@ -1472,6 +1470,22 @@ self.can_interface.send(message, 0) + def cmd_send_general_response(self, message_id, accepted, reason): + """ + :param message_id: (int) the message id + :param accepted: (int) boolean accept/reject response + :param reason: (int) rejection reason + :return: none + """ + payload = integer_to_bytearray(accepted) + payload += integer_to_bytearray(reason) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=message_id, + payload=payload) + + self.can_interface.send(message, 0) + def cmd_set_treatment_heparin_data(self, vCumulative): """ the Treatment Heparin Data message setter/sender method @@ -1512,7 +1526,6 @@ self.can_interface.send(message, 0) - def cmd_send_treatment_adjust_pressures_limit_response(self, vAccepted, vReason, vArterialLow, vArterialHigh, vVenousLow, vVenousHigh): """ @@ -1866,6 +1879,22 @@ self.can_interface.send(message, 0) + def cmd_send_general_progress_data(self, message_id, total, countdown): + """ + send the pretreatment filter flush progress data + :param accepted: (U32) Total time in second + :param reason: (U32) count down time in second + :return: None + """ + payload = integer_to_bytearray(total) + payload += integer_to_bytearray(countdown) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=message_id, + payload=payload) + + self.can_interface.send(message, 0) + def cmd_send_pre_treatment_filter_flush_progress_data(self, total, countdown): """ send the pretreatment filter flush progress data