Index: leahi_dialin/dd/proxies/td_proxy.py =================================================================== diff -u -r9a9f63852d6f00feabda7a5ef672f8c81ae9b7e4 -r78814f5e551360517b569f81dc2a7455f15ac2bc --- leahi_dialin/dd/proxies/td_proxy.py (.../td_proxy.py) (revision 9a9f63852d6f00feabda7a5ef672f8c81ae9b7e4) +++ leahi_dialin/dd/proxies/td_proxy.py (.../td_proxy.py) (revision 78814f5e551360517b569f81dc2a7455f15ac2bc) @@ -77,3 +77,25 @@ self.dd_td_to_dd_request_response_timestamp = timestamp + + def cmd_td_send_dd_gen_dialysate_request(self, start: bool = 0, dial_rate: float = 0, uf_rate: float = 0, + dial_temp: float = 0, bypass: int = 0, acid: int = 0, bicarb: int = 0): + """ + Constructs and sends a TD gen dialysate request to the DD. + + @return: none + """ + stt = integer_to_bytearray(start) + dial = float_to_bytearray(dial_rate) + uf = float_to_bytearray(uf_rate) + temp = float_to_bytearray(dial_temp) + byp = integer_to_bytearray(bypass) + acd = integer_to_bytearray(acid) + bic = integer_to_bytearray(bicarb) + payload = bic +acd + byp + temp + uf + dial + stt + message = DenaliMessage.build_message(channel_id=DenaliChannels.td_to_dd_ch_id, + message_id=MsgIds.MSG_ID_DD_GEN_DIALYSATE_REQUEST_DATA.value, + payload=payload) + + self.logger.debug("Sending TD gen dialysate data request to DD.") + self.can_interface.send(message, 0) \ No newline at end of file