uds.can.addressing.extended_addressing ====================================== .. py:module:: uds.can.addressing.extended_addressing .. autoapi-nested-parse:: Implementation of Extended CAN Addressing format. Classes ------- .. autoapisummary:: uds.can.addressing.extended_addressing.ExtendedCanAddressingInformation Module Contents --------------- .. py:class:: ExtendedCanAddressingInformation(rx_physical_params, tx_physical_params, rx_functional_params, tx_functional_params) Bases: :py:obj:`uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation` .. autoapi-inheritance-diagram:: uds.can.addressing.extended_addressing.ExtendedCanAddressingInformation :parts: 1 :private-bases: Addressing Information of CAN Entity (either server or client) that uses Extended Addressing format. Configure Addresses of UDS Entity (either a server or a client) for UDS over CAN communication. :param rx_physical_params: Addressing parameters for incoming physically addressed communication. :param tx_physical_params: Addressing parameters for outgoing physically addressed communication. :param rx_functional_params: Addressing parameters for incoming functionally addressed communication. :param tx_functional_params: Addressing parameters for outgoing functionally addressed communication. .. py:attribute:: ADDRESSING_FORMAT :value: 'Extended Addressing' CAN Addressing Format used. .. py:attribute:: AI_DATA_BYTES_NUMBER :value: 1 Number of CAN frame data bytes that are used to carry Addressing Information. .. py:method:: _validate_addressing_information() Validate Addressing Information parameters. :raise InconsistencyError: Provided values are not consistent with each other. .. py:method:: validate_addressing_params(addressing_type, addressing_format = ADDRESSING_FORMAT, can_id = None, target_address = None, source_address = None, address_extension = None) :classmethod: Validate Addressing Information parameters of a CAN packet that uses Extended Addressing format. :param addressing_type: Addressing type to validate. :param addressing_format: CAN Addressing Format to validate. :param can_id: CAN Identifier value to validate. :param target_address: Target Address value to validate. :param source_address: Source Address value to validate. :param address_extension: Address Extension value to validate. :raise ValueError: Provided Addressing format cannot be handled by this class. :raise UnusedArgumentError: Provided parameter is not supported by this Addressing format. :raise InconsistencyError: Provided CAN ID value is incompatible with Extended Addressing format. :return: Normalized dictionary with the provided Addressing Information. .. py:method:: is_compatible_can_id(can_id, addressing_type = None) :staticmethod: Check whether provided CAN ID is consistent with Extended Addressing format. :param can_id: Value of CAN ID to check. :param addressing_type: Addressing type for which consistency to be performed. Leave None to skip crosscheck between CAN Identifier and Addressing Type. :return: True if CAN ID value is compatible with this CAN Addressing Format, False otherwise. .. py:method:: decode_can_id_ai_params(can_id) :staticmethod: Decode Addressing Information parameters from CAN Identifier. .. py:method:: decode_data_bytes_ai_params(ai_data_bytes) :staticmethod: Decode Addressing Information parameters from CAN data bytes. :param ai_data_bytes: Data bytes containing Addressing Information. :return: Decoded Addressing Information parameters. .. py:method:: encode_ai_data_bytes(target_address = None, address_extension = None) :classmethod: Generate data bytes that carry Addressing Information. :param target_address: Target Address value used. :param address_extension: Source Address value used. :return: Data bytes that carry Addressing Information in a CAN frame Data field.