Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -r88eea899fa8d03596f944505285bf3049e64312b -re7c76d620568e574df68be3bd0efb52a9b5d2845 --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 88eea899fa8d03596f944505285bf3049e64312b) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) @@ -330,7 +330,7 @@ MSG_ID_DD_VALVE_SENSED_STATE_OVERRIDE_REQUEST = 0xA005 MSG_ID_DD_PRESSURE_SENSOR_READINGS_OVERRIDE_REQUEST = 0xA006 MSG_ID_DD_PRESSURE_SENSOR_TEMPERATURE_OVERRIDE_REQUEST = 0xA007 - MSG_ID_DD_PRESSURE_SENSOR_READ_COUNTER_OVERRIDE_REQUEST = 0xA008 + MSG_ID_DD_TREATMENT_PARAMS_OVERRIDE_REQUEST = 0xA008 MSG_ID_DD_PRESSURE_SENSOR_ERROR_COUNTER_OVERRIDE_REQUEST = 0xA009 MSG_ID_DD_PRESSURE_SENSOR_PUBLISH_INTERVAL_OVERRIDE_REQUEST = 0xA00A MSG_ID_DD_PRESSURE_SENSOR_FILTER_READINGS_OVERRIDE_REQUEST = 0xA00B @@ -431,11 +431,12 @@ MSG_ID_DD_BICART_LOWER_PRESSURE_OVERRIDE_REQUEST = 0xA06B MSG_ID_DD_FLOATER_LEVEL_OVERRIDE_REQUEST = 0xA06C MSG_ID_DD_SUBSTITUTION_PUMP_START_STOP_OVERRIDE_REQUEST = 0xA06D - MSG_ID_DD_SUBSTITUTION_PUMP_BROADCAST_OVERRIDE_REQUEST = 0xA06E + MSG_ID_DD_SUBSTITUTION_PUMP_PUBLISH_INTERVAL_OVERRIDE_REQUEST = 0xA06E MSG_ID_DD_SUBSTITUTION_PUMP_TARGET_SPEED_OVERRIDE_REQUEST = 0xA06F MSG_ID_DD_CONDUCTIVITY_SENSOR_CAL_REQUEST = 0xA070 MSG_ID_DD_CONDUCTIVITY_SENSOR_CAL_RESPONSE = 0xA071 - + MSG_ID_DD_MIXING_CONTROL_DATA = 0xA072 + MSG_ID_DD_MIXING_CONTROL_DATA_PUBLISH_INTERVAL_OVERRIDE_REQUEST = 0xA073 # Placeholder messages MSG_ID_DD_ALARM_STATE_OVERRIDE_REQUEST = 0xAF03 MSG_ID_DD_STOP_GEN_DIALYSATE_MODE_OVERRIDE_REQUEST = 0xAF04 Index: leahi_dialin/dd/dialysate_delivery.py =================================================================== diff -u -r7629ed06e9f4297b3f184f7e57348c3ed58b34f9 -re7c76d620568e574df68be3bd0efb52a9b5d2845 --- leahi_dialin/dd/dialysate_delivery.py (.../dialysate_delivery.py) (revision 7629ed06e9f4297b3f184f7e57348c3ed58b34f9) +++ leahi_dialin/dd/dialysate_delivery.py (.../dialysate_delivery.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) @@ -222,42 +222,14 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.dd_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'DD VERSION: {self.dd_version}') - if all([len(each) > 0 for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): + if all([each is not None for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): self.dd_fpga_version = f"v{result['fpga_id']}.{result['fpga_major']}.{result['fpga_minor']}-{result['fpga_lab']}" self.logger.debug(f'DD FPGA VERSION: {self.dd_fpga_version}') - """ - major = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_MAJOR:MsgFieldPositionsFWVersions.END_POS_MAJOR])) - minor = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_MINOR:MsgFieldPositionsFWVersions.END_POS_MINOR])) - micro = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_MICRO:MsgFieldPositionsFWVersions.END_POS_MICRO])) - build = struct.unpack(DataTypes.U16.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_BUILD:MsgFieldPositionsFWVersions.END_POS_BUILD])) - fpga_id = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_FPGA_ID:MsgFieldPositionsFWVersions.END_POS_FPGA_ID])) - fpga_major = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_FPGA_MAJOR:MsgFieldPositionsFWVersions.END_POS_FPGA_MAJOR])) - fpga_minor = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_FPGA_MINOR:MsgFieldPositionsFWVersions.END_POS_FPGA_MINOR])) - fpga_lab = struct.unpack(DataTypes.U08.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_FPGA_MICRO:MsgFieldPositionsFWVersions.END_POS_FPGA_MICRO])) - compatibility = struct.unpack(DataTypes.U32.unpack_attrib(), bytearray( - message['message'][MsgFieldPositionsFWVersions.START_POS_COMPATIBILITY_REV:MsgFieldPositionsFWVersions.END_POS_COMPATIBILITY_REV])) - - if all([len(each) > 0 for each in [major, minor, micro, build, compatibility]]): - self.dd_version = f"v{major[0]}.{minor[0]}.{micro[0]}-{build[0]}.{compatibility[0]}" - self.logger.debug(f"DD VERSION: {self.dd_version}") - - if all([len(each) > 0 for each in [fpga_id, fpga_major, fpga_minor, fpga_lab]]): - self.dd_fpga_version = f"v{fpga_id[0]}.{fpga_major[0]}.{fpga_minor[0]}-{fpga_lab[0]}" - self.logger.debug(f"DD FPGA VERSION: {self.dd_fpga_version}") - """ self.dd_version_response_timestamp = timestamp Index: leahi_dialin/fp/filtration_purification.py =================================================================== diff -u -re45b20cdc5d4c5dcff8cef530b173ca94cb2e422 -re7c76d620568e574df68be3bd0efb52a9b5d2845 --- leahi_dialin/fp/filtration_purification.py (.../filtration_purification.py) (revision e45b20cdc5d4c5dcff8cef530b173ca94cb2e422) +++ leahi_dialin/fp/filtration_purification.py (.../filtration_purification.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) @@ -191,13 +191,14 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.fp_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'FP VERSION: {self.fp_version}') - if all([len(each) > 0 for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): + if all([each is not None for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): self.fp_fpga_version = f"v{result['fpga_id']}.{result['fpga_major']}.{result['fpga_minor']}-{result['fpga_lab']}" self.logger.debug(f'FP FPGA VERSION: {self.fp_fpga_version}') + self.fp_version_response_timestamp = timestamp Index: leahi_dialin/td/treatment_delivery.py =================================================================== diff -u -r9c2fab5b413da62b218e6a9a12a5752e974071a0 -re7c76d620568e574df68be3bd0efb52a9b5d2845 --- leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision 9c2fab5b413da62b218e6a9a12a5752e974071a0) +++ leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) @@ -221,11 +221,11 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.td_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'TD VERSION: {self.td_version}') - if all([len(each) > 0 for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): + if all([each is not None for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): self.td_fpga_version = f"v{result['fpga_id']}.{result['fpga_major']}.{result['fpga_minor']}-{result['fpga_lab']}" self.logger.debug(f'TD FPGA VERSION: {self.td_fpga_version}') @@ -256,7 +256,7 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.ui_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'UI VERSION: {self.ui_version}') else: @@ -294,8 +294,8 @@ @return: 1 if logged in, 0 if log in failed """ message = CanMessage.build_message(channel_id=CanChannels.dialin_to_td_ch_id, - message_id=MsgIds.MSG_ID_TD_TESTER_LOGIN_REQUEST.value, - payload=list(map(int, map(ord, self.TD_LOGIN_PASSWORD)))) + message_id=MsgIds.MSG_ID_TD_TESTER_LOGIN_REQUEST.value, + payload=list(map(int, map(ord, self.TD_LOGIN_PASSWORD)))) self.logger.debug("Logging in...") @@ -403,13 +403,17 @@ @return: none """ - message = CanMessage.build_message(channel_id=CanChannels.dialin_to_td_ch_id, - message_id=MsgIds.MSG_ID_TD_UI_VERSION_INFO_REQUEST.value) + return cmd_generic_override( + payload = None, + reset = None, + channel_id = CanChannels.td_to_ui_ch_id, + msg_id = MsgIds.MSG_ID_TD_UI_VERSION_INFO_REQUEST, + entity_name = 'UI Versions Request', + override_text = '', + logger = self.logger, + can_interface = self.can_interface) - self.logger.debug("Sending an UI version request to the TD.") - self.can_interface.send(message, 0) - def cmd_training_test_override(self, value: int, reset: int = NO_RESET) -> int: """ Constructs and sends a training test override request to the TD.