Index: dialin/dg/hd_proxy.py =================================================================== diff -u -r79b47911f0ea424cd8dc10c1e1f150b84d4dfa54 -r4c697fe5369d52d81d550a06c820c412d0377a17 --- dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision 79b47911f0ea424cd8dc10c1e1f150b84d4dfa54) +++ dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision 4c697fe5369d52d81d550a06c820c412d0377a17) @@ -207,38 +207,6 @@ self.logger.debug("Timeout!!!!") return False - def cmd_start_heat_disinfection(self): - """ - Constructs and sends start heat disinfect command - Constraints: - N/A - - @returns none - """ - # 1 is to start - payload = integer_to_bytearray(1) - message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, - message_id=MsgIds.MSG_ID_DG_START_STOP_HEAT_DISINFECT.value, - payload=payload) - self.logger.debug("Starting heat disinfection process") - received_message = self.can_interface.send(message) - - def cmd_stop_heat_disinfection(self): - """ - Constructs and sends stop heat disinfect command - Constraints: - N/A - - @returns none - """ - # 1 is to start - payload = integer_to_bytearray(0) - message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, - message_id=MsgIds.MSG_ID_DG_START_STOP_HEAT_DISINFECT.value, - payload=payload) - self.logger.debug("Stopping heat disinfection process") - received_message = self.can_interface.send(message) - def cmd_stop_primary_heater(self): """ Constructs and sends stop heat disinfect command @@ -269,9 +237,9 @@ def cmd_start_stop_heat_disinfect(self, start=True): """ - Constructs and sends the start/stop DG heat disinfection command + Constructs and sends the start/stop DG heat disinfect command - @param start: (bool) True = start heat disinfection, False = stop heat disinfection. + @param start: (bool) True = start heat disinfect, False = stop heat disinfect. @return: non-zero integer if successful, False otherwise """ # 1 is to start @@ -297,3 +265,34 @@ else: self.logger.debug("Timeout!!!!") return False + + def cmd_start_stop_dg_flush(self, start=True): + """ + Constructs and sends the start/stop DG flush command + + @param start: (bool) True = start flush, False = stop flush. + @return: non-zero integer if successful, False otherwise + """ + # 1 is to start + if start: + cmd = 1 + str = "Starting" + else: + cmd = 0 + str = "Stopping" + payload = integer_to_bytearray(cmd) + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, + message_id=MsgIds.MSG_ID_DG_START_STOP_FLUSH.value, + payload=payload) + + self.logger.debug(str + " DG flush") + + received_message = self.can_interface.send(message) + + # If there is content... + if received_message is not None: + # response payload is OK or not OK + return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] + else: + self.logger.debug("Timeout!!!!") + return False