Index: leahi_dialin/td/proxies/ui_proxy.py =================================================================== diff -u -r862daa5b6357ddaba02aa7d1fb9d0952e4a16e6f -r37b10a13237bfde8838547a83f8dcc3f8818bf0d --- leahi_dialin/td/proxies/ui_proxy.py (.../ui_proxy.py) (revision 862daa5b6357ddaba02aa7d1fb9d0952e4a16e6f) +++ leahi_dialin/td/proxies/ui_proxy.py (.../ui_proxy.py) (revision 37b10a13237bfde8838547a83f8dcc3f8818bf0d) @@ -441,15 +441,15 @@ can_interface = self.can_interface) - def cmd_send_ui_initiate_treatment(self, accepted:int = ACCEPTED ) -> None: + def cmd_send_ui_initiate_treatment(self, modularity: int, accepted:int = ACCEPTED ) -> None: """ Constructs and sends a UI initiate treatment message. :param accepted: (int) the acceptance value :return: none """ - acc = integer_to_bytearray(accepted) - payload = acc + payload = integer_to_bytearray(accepted) + payload += integer_to_bytearray(modularity) cmd_generic_override(payload = payload, reset = None, @@ -575,33 +575,50 @@ can_interface = self.can_interface) - def cmd_send_ui_cartridge_install_confirm_response (self) -> None: + def cmd_send_ui_cartridge_install_confirm_request (self) -> None: """ - Constructs and sends a UI response for confirming cartridge installation. + Constructs and sends a UI command for confirming cartridge installation. :return: none """ cmd_generic_override(payload = None, reset = None, channel_id = CanChannels.ui_to_td_ch_id, msg_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_CONFIRM_REQUEST, - entity_name = 'UI Confirm Cartridge Installation response', + entity_name = 'UI Confirm Cartridge Installation request', override_text = 'N/A', logger = self.logger, can_interface = self.can_interface) - def cmd_send_ui_cartridge_removal_confirm_response (self) -> None: + def cmd_send_ui_cartridge_removal_confirm_request (self) -> None: """ - Constructs and sends a UI response for confirming cartridge removal. + Constructs and sends a UI command for confirming cartridge removal. :return: none """ cmd_generic_override(payload = None, reset = None, channel_id = CanChannels.ui_to_td_ch_id, msg_id = MsgIds.MSG_ID_UI_ADJUST_DISPOSABLES_REMOVAL_CONFIRM_REQUEST, - entity_name = 'UI Confirm Cartridge Removal response', + entity_name = 'UI Confirm Cartridge Removal request', override_text = 'N/A', logger = self.logger, can_interface = self.can_interface) + + + def cmd_send_ui_patient_connect_confirm_request (self) -> None: + """ + Constructs and sends a UI command for confirming patient is connected. + + :return: none + """ + cmd_generic_override(payload = None, + reset = None, + channel_id = CanChannels.ui_to_td_ch_id, + # msg_id = MsgIds.MSG_ID_UI_SETUP_TUBING_SET_CONNECTIONS_CONFIRM_REQUEST, + msg_id = MsgIds.MSG_ID_UI_SETUP_CONNECTION_CONFIRM_REQUEST, + entity_name = 'UI Confirm Patient Connected request', + override_text = 'N/A', + logger = self.logger, + can_interface = self.can_interface)