Index: leahi_dialin/td/modules/treatment.py =================================================================== diff -u -rc5bfcf84ed942ca5841bf9de155aa0f495b4d28d -r20c821bd230fc7689a0275a2918981669ff5cc19 --- leahi_dialin/td/modules/treatment.py (.../treatment.py) (revision c5bfcf84ed942ca5841bf9de155aa0f495b4d28d) +++ leahi_dialin/td/modules/treatment.py (.../treatment.py) (revision 20c821bd230fc7689a0275a2918981669ff5cc19) @@ -20,7 +20,7 @@ from leahi_dialin.common.constants import NO_RESET from leahi_dialin.common.msg_defs import MsgIds, MsgFieldPositions from leahi_dialin.common.override_templates import cmd_generic_override -from leahi_dialin.common.td_defs import td_enum_repository +from leahi_dialin.common import td_enum_repository from leahi_dialin.protocols.CAN import DenaliChannels from leahi_dialin.utils.base import AbstractSubSystem, publish from leahi_dialin.utils.conversions import integer_to_bytearray, float_to_bytearray @@ -61,67 +61,67 @@ self._handler_resp_treatment_parameters_sync) # Treatment param ranges data - self.min_tx_time = 0 - self.max_tx_time = 0 - self.min_uf_volume = 0.0 - self.max_uf_volume = 0.0 - self.min_dial_rate = 0 - self.max_dial_rate = 0 - self.tx_params_timestamp = 0 + self.min_tx_time = 0 #: Minimum Treatment time + self.max_tx_time = 0 #: Maximum Treatment time + self.min_uf_volume = 0.0 #: Minimum Ultrafiltration volume + self.max_uf_volume = 0.0 #: Maximum Ultrafiltration volume + self.min_dial_rate = 0 #: Minimum Dialysate rate + self.max_dial_rate = 0 #: Maximum Dialysate rate + self.tx_params_timestamp = 0 #: The timestamp of the latest Treatment Parameters message # Saline Bolus data - self.tgt_saline_volume = 0 # in mL - self.cum_saline_volume = 0.0 # in mL - self.bol_saline_volume = 0.0 # in mL - self.saline_bolus_state = 0 - self.saline_bolus_timestamp = 0 + self.tgt_saline_volume = 0 #: Target Saline Bolus volume in mL + self.cum_saline_volume = 0.0 #: Cum Saline Bolus volume in mL + self.bol_saline_volume = 0.0 #: Bol Saline Bolus volume in mL + self.saline_bolus_state = 0 #: The State of the Saline Bolus + self.saline_bolus_timestamp = 0 #: The timestamp of the latest Saline Bolus message # UF data - self.set_uf_volume = 0.0 # in L - self.tgt_uf_rate = 0.0 # in L/hr - self.uf_volume_delivered = 0.0 # in L - self.uf_state = 0 - self.uf_timestamp = 0 + self.set_uf_volume = 0.0 #: The Ultrafiltration volume in L + self.tgt_uf_rate = 0.0 #: The Ultrafiltration rate in L/hr + self.uf_volume_delivered = 0.0 #: How much was delivered during Ultrafiltration in L + self.uf_state = 0 #: The State of the Ultrafiltration + self.uf_timestamp = 0 #: The timestamp of the latest Ultrafiltration message # Treatment Time Data - self.tx_time_prescribed = 0 - self.tx_time_elapsed = 0 - self.tx_time_remaining = 0 - self.tx_time_timestamp = 0 + self.tx_time_prescribed = 0 #: Total Treatment duration + self.tx_time_elapsed = 0 #: How much time is elapsed in the Treatment + self.tx_time_remaining = 0 #: How much time is remaining from the Treatment + self.tx_time_timestamp = 0 #: The timestamp of the latest Treatment message # Treatment State Data - self.tx_sub_mode = 0 - self.blood_prime_state = 0 - self.dialysis_state = 0 - self.isolated_uf_state = 0 - self.tx_stop_state = 0 - self.rinseback_state = 0 - self.tx_recirc_state = 0 - self.tx_end_state = 0 - self.tx_state_timestamp = 0 + self.tx_sub_mode = 0 #: The Treatment Operation Sub-Mode + self.blood_prime_state = 0 #: The Blood Prime Operation Sub-Mode + self.dialysis_state = 0 #: The Dialysis Operation Sub-Mode + self.isolated_uf_state = 0 #: The Isolated Ultrafiltration Operation Sub-Mode + self.tx_stop_state = 0 #: The Treatment Stop Operation Sub-Mode + self.rinseback_state = 0 #: The Rinsback Operation Sub-Mode + self.tx_recirc_state = 0 #: The Recirculation Operation Sub-Mode + self.tx_end_state = 0 #: The Treatment End Operation Sub-Mode + self.tx_state_timestamp = 0 #: The timestamp of the latest Treatment State message # Treatment Parameters Data. Most recent response. - self.blood_flow_rate = 0 - self.dialysate_flow_rate = 0 - self.tx_duration = 0 - self.saline_bolus_volume = 0 - self.hep_stop_time = 0 - self.hep_time = 0 - self.acid_con = 0 - self.bicarb_con = 0 - self.dialyzer_type = 0 - self.bp_interval = 0 - self.rb_flow_rate = 0 - self.rb_volume = 0 - self.art_pressure_window = 0 - self.venous_pressure_window = 0 - self.venous_asymm_window = 0 - self.tmp_limit_window = 0 - self.dialysate_temp = 0.0 - self.hep_dispense_rate = 0.0 - self.hep_bolus_vol = 0.0 - self.uf_vol = 0.0 - self.tx_param_req_timestamp = 0 + self.blood_flow_rate = 0 #: The Blood flow rate + self.dialysate_flow_rate = 0 #: The Dialysate flow rate + self.tx_duration = 0 #: The Treatment duration + self.saline_bolus_volume = 0 #: The Saline Bolus volume + self.hep_stop_time = 0 #: The Heparin stop time + self.hep_time = 0 #: The Heparin start time + self.acid_con = 0 #: The selected Acid concentrate's option index + self.bicarb_con = 0 #: The selected Bicarb concentrate's option index + self.dialyzer_type = 0 #: The selected Dialyser option index + self.bp_interval = 0 #: The Body Pulse interval + self.rb_flow_rate = 0 #: The RB flow rate + self.rb_volume = 0 #: The RB volume + self.art_pressure_window = 0 #: The Artery pressure window duration + self.venous_pressure_window = 0 #: The Venous pressure window duration + self.venous_asymm_window = 0 #: The Venous asymmetric window duration + self.tmp_limit_window = 0 #: The Transmembrane limit window duration + self.dialysate_temp = 0.0 #: The Dialysate temperature + self.hep_dispense_rate = 0.0 #: The Heparin dispense rate + self.hep_bolus_vol = 0.0 #: The Heparin bolus volume + self.uf_vol = 0.0 #: The Ultrafiltration volume + self.tx_param_req_timestamp = 0 #: The timestamp of the latest Treatment Parameters Request message @publish(["msg_id_td_treatment_param_ranges", "min_tx_time","max_tx_time","min_uf_volume","max_uf_volume",