Index: leahi_dialin/fp/filtration_purification.py =================================================================== diff -u -r1f2bf6d939eb4033dbedb7d7005494cc12fccbc6 -re45b20cdc5d4c5dcff8cef530b173ca94cb2e422 --- leahi_dialin/fp/filtration_purification.py (.../filtration_purification.py) (revision 1f2bf6d939eb4033dbedb7d7005494cc12fccbc6) +++ leahi_dialin/fp/filtration_purification.py (.../filtration_purification.py) (revision e45b20cdc5d4c5dcff8cef530b173ca94cb2e422) @@ -34,7 +34,8 @@ from ..common.constants import NO_RESET from ..common import fp_enum_repository from ..common.generic_defs import DataTypes -from ..common.msg_defs import MsgIds, MsgFieldPositions +from ..common.msg_defs import MsgFieldPositions +from ..common.msg_ids import MsgIds from ..common.override_templates import cmd_generic_broadcast_interval_override, cmd_generic_override from ..protocols.CAN import CanMessage, CanMessenger, CanChannels from leahi_dialin.utils.abstract_classes import AbstractSubSystem @@ -258,22 +259,17 @@ @return: 1 if successful, zero otherwise """ - message = CanMessage.build_message(channel_id=CanChannels.dialin_to_fp_ch_id, - message_id=MsgIds.MSG_ID_FP_DEF_STATUS_REQUEST.value) + return cmd_generic_override( + payload = None, + reset = NO_RESET, + channel_id = CanChannels.dialin_to_fp_ch_id, + msg_id = MsgIds.MSG_ID_FP_DEF_STATUS_REQUEST, + entity_name = 'FP Defeatured Status', + override_text = '', + logger = self.logger, + can_interface = self.can_interface) - self.logger.debug('Getting FP defeatured status') - received_message = self.can_interface.send(message) - # If there is content... - if received_message is not None: - self.logger.debug("Received FW ACK after requesting FP defeatured configuration record.") - # response payload is OK or not OK - return received_message['message'][CanMessage.PAYLOAD_START_INDEX] - else: - self.logger.debug("Timeout!!!!") - return False - - def cmd_request_boost_pump_install_status(self) -> int: """ Constructs and sends the FP Boost Pump Installed status request @@ -282,24 +278,17 @@ @return: 1 if successful, zero otherwise """ - # ToDo: Update the msg id when FW part of LDT-3779 is implemented - message = CanMessage.build_message(channel_id=CanChannels.dialin_to_fp_ch_id, - message_id=MsgIds.MSG_ID_FP_BOOST_PUMP_INSTALL_STATUS_REQUEST.value) + return cmd_generic_override( + payload = None, + reset = NO_RESET, + channel_id = CanChannels.dialin_to_fp_ch_id, + msg_id = MsgIds.MSG_ID_FP_BOOST_PUMP_INSTALL_STATUS_REQUEST, + entity_name = 'FP P40 Boost Pump installed status', + override_text = '', + logger = self.logger, + can_interface = self.can_interface) - self.logger.debug('Getting FP P40 Boost Pump installed status') - received_message = self.can_interface.send(message) - # If there is content... - if received_message is not None: - self.logger.debug("Received FW ACK after requesting FP P40 Boost Pump installed configuration record.") - # response payload is OK or not OK - return received_message['message'][CanMessage.PAYLOAD_START_INDEX] - else: - self.logger.debug("Timeout!!!!") - return False - - - def cmd_op_mode_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: """ Constructs and sends the measured op mode broadcast interval override command