uds.can.addressing.abstract_addressing_information ================================================== .. py:module:: uds.can.addressing.abstract_addressing_information .. autoapi-nested-parse:: Abstract definition of Addressing Information handler. Classes ------- .. autoapisummary:: uds.can.addressing.abstract_addressing_information.CANAddressingParams uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation Module Contents --------------- .. py:class:: CANAddressingParams Bases: :py:obj:`TypedDict` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.CANAddressingParams :parts: 1 :private-bases: :ref:`Addressing Information ` parameters collection for a single CAN Packet. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: addressing_format :type: uds.can.addressing.addressing_format.CanAddressingFormat .. py:attribute:: addressing_type :type: uds.addressing.AddressingType .. py:attribute:: can_id :type: int .. py:attribute:: target_address :type: Optional[int] .. py:attribute:: source_address :type: Optional[int] .. py:attribute:: address_extension :type: Optional[int] .. py:class:: AbstractCanAddressingInformation(rx_physical_params, tx_physical_params, rx_functional_params, tx_functional_params) Bases: :py:obj:`uds.addressing.abstract_addressing_information.AbstractAddressingInformation`, :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation :parts: 1 :private-bases: Abstract definition of storage for addressing related parameters for UDS entity operating on CAN bus. 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:class:: InputAIParams Bases: :py:obj:`TypedDict` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation.InputAIParams :parts: 1 :private-bases: :ref:`Addressing Information ` configuration parameters. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: can_id :type: int .. py:attribute:: target_address :type: Optional[int] .. py:attribute:: source_address :type: Optional[int] .. py:attribute:: address_extension :type: Optional[int] .. py:class:: CanIdAIParams Bases: :py:obj:`TypedDict` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation.CanIdAIParams :parts: 1 :private-bases: ref:`Addressing Information ` parameters that are carried by CAN Identifier. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: addressing_type :type: Optional[uds.addressing.AddressingType] .. py:attribute:: target_address :type: Optional[int] .. py:attribute:: source_address :type: Optional[int] .. py:attribute:: priority :type: Optional[int] .. py:class:: DataBytesAIParamsAlias Bases: :py:obj:`TypedDict` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation.DataBytesAIParamsAlias :parts: 1 :private-bases: Alias of :ref:`Addressing Information ` parameters encoded in data field. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: target_address :type: int .. py:attribute:: address_extension :type: int .. py:class:: DecodedAIParamsAlias Bases: :py:obj:`TypedDict` .. autoapi-inheritance-diagram:: uds.can.addressing.abstract_addressing_information.AbstractCanAddressingInformation.DecodedAIParamsAlias :parts: 1 :private-bases: Alias of :ref:`Addressing Information ` parameters encoded in CAN ID and data field. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: addressing_type :type: Optional[uds.addressing.AddressingType] .. py:attribute:: target_address :type: Optional[int] .. py:attribute:: source_address :type: Optional[int] .. py:attribute:: address_extension :type: Optional[int] .. py:attribute:: ADDRESSING_FORMAT :type: uds.can.addressing.addressing_format.CanAddressingFormat CAN Addressing Format used. .. py:attribute:: AI_DATA_BYTES_NUMBER :type: int Number of CAN Frame data bytes that are used to carry UDS Addressing Information. .. py:method:: validate_addressing_params(addressing_type, addressing_format, can_id = None, target_address = None, source_address = None, address_extension = None) :classmethod: :abstractmethod: Validate Addressing Information parameters of a CAN packet. :param addressing_type: Addressing type to validate. :param addressing_format: CAN Addressing Format used. :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 UnusedArgumentError: At least one provided parameter is not supported by Addressing format used. :raise InconsistencyError: Provided values are not consistent with each other (cannot be used together) or with the Addressing format used. :return: Normalized dictionary with the provided information. .. py:method:: is_compatible_can_id(can_id, addressing_type) :staticmethod: :abstractmethod: Check whether provided CAN ID is consistent with this CAN 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: :abstractmethod: Decode Addressing Information parameters from CAN Identifier. :param can_id: Value of a CAN Identifier. :return: Decoded Addressing Information parameters. .. py:method:: decode_data_bytes_ai_params(ai_data_bytes) :staticmethod: :abstractmethod: Decode Addressing Information parameters from CAN data bytes. :param ai_data_bytes: Data bytes containing Addressing Information. :return: Decoded Addressing Information parameters. .. py:method:: decode_frame_ai_params(can_id, raw_frame_data) :classmethod: Decode Addressing Information parameters from a CAN Frame. :param can_id: CAN Identifier value of a CAN frame. :param raw_frame_data: Raw data bytes of a CAN frame. :return: Decoded Addressing Information parameters. .. py:method:: encode_ai_data_bytes(target_address = None, address_extension = None) :classmethod: :abstractmethod: 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. .. py:method:: is_input_packet(can_id, raw_frame_data, **_) Check if a frame with provided attributes is an input packet for this UDS Entity. :param raw_frame_data: Raw data bytes carried by a CAN frame to check. :param can_id: CAN Identifier of a CAN frame to check. :return: Addressing Type used for transmission of this packet, None otherwise.