Index: leahi_dialin/td/modules/treatment.py =================================================================== diff -u -r489ce5ef49041b863501b7fecd6e4716e7dcaa9f -r02dbda406f0e7c06773e3ac24765d3ee93b4ec35 --- leahi_dialin/td/modules/treatment.py (.../treatment.py) (revision 489ce5ef49041b863501b7fecd6e4716e7dcaa9f) +++ leahi_dialin/td/modules/treatment.py (.../treatment.py) (revision 02dbda406f0e7c06773e3ac24765d3ee93b4ec35) @@ -108,13 +108,13 @@ self.tx_state_timestamp = 0 #: The timestamp of the latest Treatment State message self.treatment_states = { 'tx_sub_mode': 0, # The Treatment Operation Sub-Mode - 'blood_prime_state': 0, # The Blood Prime Operation Sub-Mode - 'dialysis_state': 0, # The Dialysis Operation Sub-Mode - 'isolated_uf_state': 0, # The Isolated Ultrafiltration Operation Sub-Mode - 'tx_stop_state': 0, # The Treatment Stop Operation Sub-Mode - 'rinseback_state': 0, # The Rinsback Operation Sub-Mode - 'tx_recirc_state': 0, # The Recirculation Operation Sub-Mode - 'tx_end_state': 0 # The Treatment End Operation Sub-Mode + 'blood_prime_state': 0, # The Blood Prime Operation State + 'dialysis_state': 0, # The Dialysis Operation State + 'isolated_uf_state': 0, # The Isolated Ultrafiltration Operation State + 'tx_stop_state': 0, # The Treatment Stop Operation State + 'rinseback_state': 0, # The Rinsback Operation State + 'tx_recirc_state': 0, # The Recirculation Operation State + 'tx_end_state': 0 # The Treatment End Operation State } # Treatment Parameters Data. Most recent response. @@ -219,8 +219,7 @@ # ============================================================ Handlers ============================================================ - @publish(["msg_id_td_treatment_param_ranges", "min_tx_time","max_tx_time","min_uf_volume","max_uf_volume", - "min_dial_rate","max_dial_rate","tx_params_timestamp"]) + @publish([MsgIds.MSG_ID_TD_TREATMENT_PARAM_RANGES.name.lower(), "treatment_param_ranges", "tx_params_timestamp"]) def _handler_treatment_param_ranges_sync(self, message, timestamp=0.0): """ Handles published treatment parameter range data messages. @@ -240,8 +239,7 @@ self.tx_params_timestamp = timestamp - @publish(["MSG_ID_TD_FLUID_BOLUS_DATA", "tgt_saline_volume","cum_saline_volume","bol_saline_volume", - "saline_bolus_state","saline_bolus_timestamp"]) + @publish([MsgIds.MSG_ID_TD_FLUID_BOLUS_DATA.name.lower(), "saline_bolus", "saline_bolus_timestamp"]) def _handler_saline_bolus_sync(self, message, timestamp=0.0): """ Handles published saline bolus data messages. @@ -259,8 +257,7 @@ self.saline_bolus_timestamp = timestamp - @publish(["msg_id_td_uf_data", "set_uf_volume","tgt_uf_rate","uf_volume_delivered", - "uf_state","uf_timestamp"]) + @publish([MsgIds.MSG_ID_TD_ULTRAFILTRATION_DATA.name.lower(), "ultrafiltration", "uf_timestamp"]) def _handler_uf_sync(self, message, timestamp=0.0): """ Handles published ultrafiltration data messages. @@ -278,8 +275,7 @@ self.uf_timestamp = timestamp - @publish(["msg_id_td_treatment_time_data", "tx_time_prescribed","tx_time_elapsed","tx_time_remaining", - "tx_time_timestamp"]) + @publish([MsgIds.MSG_ID_TD_TREATMENT_TIME_DATA.name.lower(), "treatment_times", "tx_time_timestamp"]) def _handler_treatment_time_sync(self, message, timestamp=0.0): """ Handles published treatment time data messages. @@ -296,8 +292,7 @@ self.tx_time_timestamp = timestamp - @publish(["msg_id_td_treatment_state_data", "tx_sub_mode","blood_prime_state","dialysis_state","isolated_uf_state", - "tx_stop_state","rinseback_state","tx_recirc_state","tx_end_state","tx_state_timestamp"]) + @publish([MsgIds.MSG_ID_TD_TREATMENT_STATE_DATA.name.lower(), "treatment_states", "tx_state_timestamp"]) def _handler_treatment_state_sync(self, message, timestamp=0.0): """ Handles published treatment state data messages. @@ -319,11 +314,7 @@ self.tx_state_timestamp = timestamp - @publish(["msg_id_td_rsp_current_treatment_parameters", "blood_flow_rate", "dialysate_flow_rate", "tx_duration", - "saline_bolus_volume", "hep_stop_time", "hep_time", "acid_con", "bicarb_con", - "dialyzer_type", "bp_interval", "rb_flow_rate", "rb_volume", - "art_pressure_window","venous_pressure_window","venous_asymm_window","tmp_limit_window", - "dialysate_temp", "hep_dispense_rate", "hep_bolus_vol", "uf_vol","tx_param_req_timestamp"]) + @publish([MsgIds.MSG_ID_TD_RSP_CURRENT_TREATMENT_PARAMETERS.name.lower(), "treatment_paramters", "tx_param_req_timestamp"]) def _handler_resp_treatment_parameters_sync(self, message, timestamp=0.0): """ Handles published treatment parameter response data messages.