Index: dialin/common/hd_defs.py =================================================================== diff -u -r5b56b39677e922b19fa1046810486d2b1848056e -rd4087de260713b981854e29ae831a0ee13d3d598 --- dialin/common/hd_defs.py (.../hd_defs.py) (revision 5b56b39677e922b19fa1046810486d2b1848056e) +++ dialin/common/hd_defs.py (.../hd_defs.py) (revision d4087de260713b981854e29ae831a0ee13d3d598) @@ -385,8 +385,18 @@ TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME_ML = 16 TREATMENT_PARAM_DIALYSATE_TEMPERATURE_C = 17 TREATMENT_PARAM_UF_VOLUME_L = 18 - NUM_OF_TREATMENT_PARAMS = 19 + NUM_OF_TREATMENT_PARAMS = 19 +class Acid_Concentrates(DialinEnum): + ACID_CONC_TYPE_FRESENIUS_08_1251_1 = 0 + ACID_CONC_TYPE_FRESENIUS_08_2251_0 = 1 + ACID_CONC_TYPE_FRESENIUS_08_3251_9 = 2 + NUM_OF_ACID_CONC_TYPES = 3 + +class Bicarb_Concentrates(DialinEnum): + BICARB_CONC_TYPE_FRESENIUS_CENTRISOL = 0 + NUM_OF_BICARB_CONC_TYPES = 1 + @unique class PowerOffCommands(DialinEnum): """ Index: dialin/dg/hd_proxy.py =================================================================== diff -u -racd09d02879e8add4cf7f694f5db8e423a76c341 -rd4087de260713b981854e29ae831a0ee13d3d598 --- dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision acd09d02879e8add4cf7f694f5db8e423a76c341) +++ dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision d4087de260713b981854e29ae831a0ee13d3d598) @@ -145,14 +145,16 @@ self.logger.debug("Timeout!!!!") return False - def cmd_start_stop_dg(self, start: bool = True) -> int: + def cmd_start_stop_dg(self, start: bool = True, acid: int = 0, bicarb: int = 0) -> int: """ Constructs and sends the start/stop DG command Constraints: DG must be in idle state of standby mode if start command given. DG must be in re-circulate mode if stop command given. @param start: boolean - True = start DG, False = stop DG. + @param acid: integer - identifier for selected acid concentrate type + @param bicarb: integer - identifier for selected bicarbonate concentrate type @return: 1 if successful, zero otherwise """ @@ -162,7 +164,10 @@ else: cmd = 0 cmd_str = "stop " - payload = integer_to_bytearray(cmd) + start = integer_to_bytearray(cmd) + act = integer_to_bytearray(acid) + bct = integer_to_bytearray(bicarb) + payload = start + act + bct message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, message_id=MsgIds.MSG_ID_STARTING_STOPPING_TREATMENT_CMD.value,