Index: dialin/common/msg_defs.py =================================================================== diff -u -r0e3af06905af539b1a86ba8407189dfd5153ad33 -r06ce0fa843ba6950c12a364f07582a51904404b6 --- dialin/common/msg_defs.py (.../msg_defs.py) (revision 0e3af06905af539b1a86ba8407189dfd5153ad33) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision 06ce0fa843ba6950c12a364f07582a51904404b6) @@ -129,7 +129,15 @@ MSG_ID_HD_TREATMENT_LOG_ALARM = 0x95 # HD to UI treatment log alarm MSG_ID_HD_TREATMENT_LOG_EVENT = 0x96 # HD to UI treatment log event + MSG_ID_HD_ALARM_ACTIVE_LIST_REQUEST = 0x97 # UI alarm active list request + MSG_ID_HD_ALARM_ACTIVE_LIST_RESPONSE = 0x98 # HD alarm active list response + MSG_ID_DG_DISINFECT_STATE = 0x7E # DG disinfect states + MSG_ID_HD_DISINFECT_RESPONSE = 0x80 # HD DISINFECT RESPONSE + MSG_ID_HD_DISINFECT_CONFIRM_RESPONSE = 0x82 # HD DISINFECT CONFIRM RESPONSE + MSG_ID_DG_DISINFECT_TIME_FLUSH = 0x83 # DG DISINFECT TIME FLUSH + MSG_ID_DG_DISINFECT_TIME_HEAT = 0x84 # DG DISINFECT TIME HEAT + MSG_ID_DG_DISINFECT_TIME_CHEMICAL = 0x85 # DG DISINFECT TIME CHEMICAL MSG_ID_CAN_ERROR_COUNT = 0x999 # test code in support of EMC testing Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r4fca777195e169106c4e032b11a7771727f4c6e5 -r06ce0fa843ba6950c12a364f07582a51904404b6 --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 4fca777195e169106c4e032b11a7771727f4c6e5) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 06ce0fa843ba6950c12a364f07582a51904404b6) @@ -2180,8 +2180,8 @@ :return: None """ payload = integer_to_bytearray(alarmID) - payload += integer_to_bytearray(parameter1) - payload += integer_to_bytearray(parameter2) + payload += float_to_bytearray(parameter1) + payload += float_to_bytearray(parameter2) message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, message_id=MsgIds.MSG_ID_HD_TREATMENT_LOG_ALARM.value, @@ -2226,6 +2226,85 @@ payload=payload) self.can_interface.send(message, 0) + def cmd_send_hd_disinfect_response(self, accepted: bool, reason: int) -> None: + """ + the HD response to the request from UI to initiate a disinfection/flush + :param accepted: boolean accepted or rejected + :param reason: the 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=MsgIds.MSG_ID_HD_DISINFECT_RESPONSE, + payload=payload) + + self.can_interface.send(message, 0) + + def cmd_send_hd_disinfect_chemical_confirm(self, accepted: bool, reason: int) -> None: + """ + the HD response to the UI sending the user chimical disinfection steps confirm. + :param accepted: boolean accepted or rejected + :param reason: the 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=MsgIds.MSG_ID_HD_DISINFECT_CONFIRM_RESPONSE, + payload=payload) + + self.can_interface.send(message, 0) + + def cmd_send_dg_disinfect_progress_time_flush(self, total: int, countdown: int) -> None: + """ + the broadcast progress water flush time + :param total: the total time + :param countdown: the gradual countdown time + :return: None + """ + payload = integer_to_bytearray(total) + payload += integer_to_bytearray(countdown) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, + message_id=MsgIds.MSG_ID_DG_DISINFECT_TIME_FLUSH, + payload=payload) + + self.can_interface.send(message, 0) + + def cmd_send_dg_disinfect_progress_time_heat(self, total: int, countdown: int) -> None: + """ + the broadcast progress heat disinfect time + :param total: the total time + :param countdown: the gradual countdown time + :return: None + """ + payload = integer_to_bytearray(total) + payload += integer_to_bytearray(countdown) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, + message_id=MsgIds.MSG_ID_DG_DISINFECT_TIME_HEAT, + payload=payload) + + self.can_interface.send(message, 0) + + def cmd_send_dg_disinfect_progress_time_checmical(self, total: int, countdown: int) -> None: + """ + the broadcast progress chemical disinfect time + :param total: the total time + :param countdown: the gradual countdown time + :return: None + """ + payload = integer_to_bytearray(total) + payload += integer_to_bytearray(countdown) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, + message_id=MsgIds.MSG_ID_DG_DISINFECT_TIME_CHEMICAL, + payload=payload) + + self.can_interface.send(message, 0) # ------------------------------------------------ GENERAL MESSAGES ------------------------------------------------ def cmd_send_general_hd_response(self, message_id: int, accepted: int, reason: int, Index: dialin/ui/hd_simulator_alarms.py =================================================================== diff -u -rb17d2a1969b535d66bf534556ac42fd2bb28fd1d -r06ce0fa843ba6950c12a364f07582a51904404b6 --- dialin/ui/hd_simulator_alarms.py (.../hd_simulator_alarms.py) (revision b17d2a1969b535d66bf534556ac42fd2bb28fd1d) +++ dialin/ui/hd_simulator_alarms.py (.../hd_simulator_alarms.py) (revision 06ce0fa843ba6950c12a364f07582a51904404b6) @@ -443,3 +443,40 @@ if self.clear_after_user_action: self.cmd_send_clear_alarms() + def cmd_send_active_list_response(self, accept: bool, reason: int=0, + a0: int=0, a1: int=0, a2: int=0, a3: int=0, a4: int=0, + a5: int=0, a6: int=0, a7: int=0, a8: int=0, a9: int=0) -> None: + """ + send the list of active alarms + :param accept: boolean value true if the request accepted + :param reason: the rejection reason + :param a0: alarm id 0 in the list - First + :param a1: alarm id 1 in the list + :param a2: alarm id 2 in the list + :param a3: alarm id 3 in the list + :param a4: alarm id 4 in the list + :param a5: alarm id 5 in the list + :param a6: alarm id 6 in the list + :param a7: alarm id 7 in the list + :param a8: alarm id 8 in the list + :param a9: alarm id 9 in the list - Last + :return: + """ + payload = integer_to_bytearray(accept) + payload += integer_to_bytearray(reason) + payload += integer_to_bytearray(a0) + payload += integer_to_bytearray(a1) + payload += integer_to_bytearray(a2) + payload += integer_to_bytearray(a3) + payload += integer_to_bytearray(a4) + payload += integer_to_bytearray(a5) + payload += integer_to_bytearray(a6) + payload += integer_to_bytearray(a7) + payload += integer_to_bytearray(a8) + payload += integer_to_bytearray(a9) + print('HERE') + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=MsgIds.MSG_ID_HD_ALARM_ACTIVE_LIST_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0)