uds.transport_interface.abstract_transport_interface
Abstract definition of UDS Transport Interface.
Classes
Abstract definition of Transport Interface. |
Module Contents
- class uds.transport_interface.abstract_transport_interface.AbstractTransportInterface(bus_manager)[source]
Bases:
abc.ABC
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).
- Parameters:
bus_manager (Any) – An object that handles the bus (Physical and Data layers of OSI Model).
- Raises:
ValueError – Provided value of bus manager is not supported by this Transport Interface.
- __bus_manager
- property bus_manager: Any
Value of the bus manager used by this Transport Interface.
Bus manager handles Physical and Data layers (OSI Model) of the bus.
- Return type:
Any
- property segmenter: uds.segmentation.AbstractSegmenter
- Abstractmethod:
- Return type:
uds.segmentation.AbstractSegmenter
Value of the segmenter used by this Transport Interface.
Warning
Do not change any segmenter attributes as it might cause malfunction of the entire Transport Interface.
- static is_supported_bus_manager(bus_manager)[source]
- Abstractmethod:
- Parameters:
bus_manager (Any)
- Return type:
bool
Check whether provided value is a bus manager that is supported by this Transport Interface.
- Parameters:
bus_manager (Any) – Value to check.
- Returns:
True if provided bus object is compatible with this Transport Interface, False otherwise.
- Return type:
bool
- abstract send_packet(packet)[source]
Transmit UDS packet.
- Parameters:
packet (uds.packet.AbstractUdsPacket) – A packet to send.
- Returns:
Record with historic information about transmitted UDS packet.
- Return type:
uds.packet.AbstractUdsPacketRecord
- abstract async_send_packet(packet, loop=None)[source]
- Async:
- Parameters:
packet (uds.packet.AbstractUdsPacket)
loop (Optional[asyncio.AbstractEventLoop])
- Return type:
uds.packet.AbstractUdsPacketRecord
Transmit asynchronously UDS packet.
- Parameters:
packet (uds.packet.AbstractUdsPacket) – A packet to send.
loop (Optional[asyncio.AbstractEventLoop]) – An asyncio event loop to use for scheduling this task.
- Returns:
Record with historic information about transmitted UDS packet.
- Return type:
uds.packet.AbstractUdsPacketRecord
- abstract receive_packet(timeout=None)[source]
Receive UDS packet.
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias]) – Maximal time (in milliseconds) to wait.
- Raises:
TimeoutError – Timeout was reached.
- Returns:
Record with historic information about received UDS packet.
- Return type:
uds.packet.AbstractUdsPacketRecord
- abstract async_receive_packet(timeout=None, loop=None)[source]
- Async:
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias])
loop (Optional[asyncio.AbstractEventLoop])
- Return type:
uds.packet.AbstractUdsPacketRecord
Receive asynchronously UDS packet.
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias]) – Maximal time (in milliseconds) to wait.
loop (Optional[asyncio.AbstractEventLoop]) – An asyncio event loop to use for scheduling this task.
- Raises:
TimeoutError – Timeout was reached.
asyncio.TimeoutError – Timeout was reached.
- Returns:
Record with historic information about received UDS packet.
- Return type:
uds.packet.AbstractUdsPacketRecord
- abstract send_message(message)[source]
Transmit UDS message.
- Parameters:
message (uds.message.UdsMessage) – A message to send.
- Returns:
Record with historic information about transmitted UDS message.
- Return type:
uds.message.UdsMessageRecord
- abstract async_send_message(message, loop=None)[source]
- Async:
- Parameters:
message (uds.message.UdsMessage)
loop (Optional[asyncio.AbstractEventLoop])
- Return type:
uds.message.UdsMessageRecord
Transmit asynchronously UDS message.
- Parameters:
message (uds.message.UdsMessage) – A message to send.
loop (Optional[asyncio.AbstractEventLoop]) – An asyncio event loop to use for scheduling this task.
- Returns:
Record with historic information about transmitted UDS message.
- Return type:
uds.message.UdsMessageRecord
- abstract receive_message(timeout=None)[source]
Receive UDS message.
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias]) – Maximal time (in milliseconds) to wait.
- Raises:
TimeoutError – Timeout was reached.
- Returns:
Record with historic information about received UDS message.
- Return type:
uds.message.UdsMessageRecord
- abstract async_receive_message(timeout=None, loop=None)[source]
- Async:
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias])
loop (Optional[asyncio.AbstractEventLoop])
- Return type:
uds.message.UdsMessageRecord
Receive asynchronously UDS message.
- Parameters:
timeout (Optional[uds.utilities.TimeMillisecondsAlias]) – Maximal time (in milliseconds) to wait.
loop (Optional[asyncio.AbstractEventLoop]) – An asyncio event loop to use for scheduling this task.
- Returns:
Record with historic information about received UDS message.
- Return type:
uds.message.UdsMessageRecord