########################################################################### # # Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file records_get_requests.py # # @author (last) Zoltan Miskolci # @date (last) 11-Aug-2026 # @author (original) Zoltan Miskolci # @date (original) 11-Aug-2026 # ############################################################################ # Project imports from leahi_dialin.common.msg_ids import MsgIds from leahi_dialin.common.override_templates import cmd_generic_override from leahi_dialin.protocols.CAN import CanChannels from leahi_dialin.utils.abstract_classes import AbstractSubSystem class FPRecordsGetRequests(AbstractSubSystem): """ Part of the FP Records """ def __init__(self, *args, **kwargs): """ The sub record class to handle all the get handlers. """ # Passing the arguments over to the next class too super().__init__(*args, **kwargs) # ================================================= Request Records Methods ================================================= def cmd_request_service_records(self) -> int: """ Constructs and sends a request for FP Service Records. Constraints: Must be logged into FP. Must be in Service mode. @return: 1 if successful, zero otherwise """ return cmd_generic_override( payload = None, reset = None, channel_id = CanChannels.dialin_to_dd_ch_id, msg_id = MsgIds.MSG_ID_UI_FP_NVM_GET_SERVICE_RECORD_REQUEST, entity_name = f'FP Service Record request', override_text = '', logger = self.logger, can_interface = self.can_interface) def cmd_request_usage_information_records(self) -> int: """ Constructs and sends a request for FP Usage Information Records. Constraints: Must be logged into FP. Must be in Service mode. @return: 1 if successful, zero otherwise """ return cmd_generic_override( payload = None, reset = None, channel_id = CanChannels.dialin_to_dd_ch_id, msg_id = MsgIds.MSG_ID_UI_FP_NVM_GET_USAGE_INFO_RECORD_REQUEST, entity_name = f'FP Usage Information Record request', override_text = '', logger = self.logger, can_interface = self.can_interface)