uds.transport_interface.abstract_transport_interface ==================================================== .. py:module:: uds.transport_interface.abstract_transport_interface .. autoapi-nested-parse:: Abstract definition of UDS Transport Interface. Classes ------- .. autoapisummary:: uds.transport_interface.abstract_transport_interface.AbstractTransportInterface Module Contents --------------- .. py:class:: AbstractTransportInterface(network_manager) Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.transport_interface.abstract_transport_interface.AbstractTransportInterface :parts: 1 :private-bases: Abstract definition of Transport Interface. Transport Interfaces are meant to handle middle layers (Transport and Network) of UDS OSI Model. Create Transport Interface (an object for handling UDS Transport and Network layers). :param network_manager: An object that handles the network (Physical and Data layers of OSI Model). .. py:property:: network_manager :type: Any Get network manager used by this Transport Interface. Network manager handles Physical and Data layers (OSI Model) of the bus/network. .. py:attribute:: __time_sync :type: uds.utilities.TimeSync .. py:property:: time_sync :type: uds.utilities.TimeSync Get time and timestamp synchronizer. .. py:property:: segmenter :type: uds.segmentation.AbstractSegmenter :abstractmethod: Value of the segmenter used by this Transport Interface. .. warning:: Do not change any segmenter attributes during the communication as it might introduce faults to Transport Interface. .. py:property:: addressing_information :type: uds.addressing.AbstractAddressingInformation Get Addressing Information of UDS Entity simulated by this Transport Interface. .. py:method:: is_supported_network_manager(bus_manager) :staticmethod: :abstractmethod: Check whether provided value is a bus/network manager that is supported by this Transport Interface. :param bus_manager: Value to check. :return: True if provided object is compatible with this Transport Interface, False otherwise. .. py:method:: send_packet(packet) :abstractmethod: Transmit packet. :param packet: A packet to send. :return: Record with historic information about transmitted packet. .. py:method:: async_send_packet(packet, loop = None) :abstractmethod: :async: Transmit packet asynchronously. :param packet: A packet to send. :param loop: An asyncio event loop to use for scheduling this task. :return: Record with historic information about transmitted packet. .. py:method:: receive_packet(timeout = None) :abstractmethod: Receive packet. :param timeout: Maximal time (in milliseconds) to wait. Leave None to wait forever. :raise TimeoutError: Timeout was reached. :return: Record with historic information about received packet. .. py:method:: async_receive_packet(timeout = None, loop = None) :abstractmethod: :async: Receive packet asynchronously. :param timeout: Maximal time (in milliseconds) to wait. Leave None to wait forever. :param loop: An asyncio event loop to use for scheduling this task. :raise TimeoutError: Timeout was reached. :raise asyncio.TimeoutError: Timeout was reached. :return: Record with historic information about received packet. .. py:method:: send_message(message) :abstractmethod: Transmit UDS message. :param message: A message to send. :return: Record with historic information about transmitted UDS message. .. py:method:: async_send_message(message, loop = None) :abstractmethod: :async: Transmit asynchronously UDS message. :param message: A message to send. :param loop: An asyncio event loop to use for scheduling this task. :return: Record with historic information about transmitted UDS message. .. py:method:: receive_message(start_timeout = None, end_timeout = None) :abstractmethod: Receive UDS message. .. warning:: Value of end_timeout must not be less than the value of start_timeout. :param start_timeout: Maximal time (in milliseconds) to wait for the start of a message transmission. Leave None to wait forever. :param end_timeout: Maximal time (in milliseconds) to wait for a message transmission to finish. Leave None to wait forever. :raise MessageTransmissionNotStartedError: Timeout was exceeded before message reception started. :raise TimeoutError: Timeout was exceeded during message receiving (before all packets received). :return: Record with historic information about received UDS message. .. py:method:: async_receive_message(start_timeout = None, end_timeout = None, loop = None) :abstractmethod: :async: Receive asynchronously UDS message. .. warning:: Value of end_timeout must not be less than the value of start_timeout. :param start_timeout: Maximal time (in milliseconds) to wait for the start of a message transmission. Leave None to wait forever. :param end_timeout: Maximal time (in milliseconds) to wait for a message transmission to finish. Leave None to wait forever. :param loop: An asyncio event loop to use for scheduling this task. :raise MessageTransmissionNotStartedError: Timeout was exceeded before message reception started. :raise TimeoutError: Timeout was exceeded during message receiving (before all packets received). :return: Record with historic information about received UDS message.