UDS over Custom Network
This part of the documentation guides how to use this package’s features for networks that are either not implemented or implemented for other network managers that you plan to use.
To use features of this package, you have to have following implementation prepared in line with the guidelines of this document:
For example, if you want to create UDS over CAN implementation for your own (e.g. in-house implemented) CAN network
manager, all you have to do, is to implement concrete class of CAN Transport Interface
(AbstractCanTransportInterface).
For network types that are not fully implemented (networks implementation status) yet, you must provide your own implementation.
See also
User guide for Diagnostic over CAN and CAN implementation (uds.can).
Addressing
Network specific addressing related implementation is restricted to defining concrete Addressing Information class. Addressing Information classes define containers for Addressing related parameters. Properly defined object stores all parameters required for both distinguishing incoming and outgoing packets (for both addressing types).
AbstractAddressingInformation
AbstractAddressingInformation defines common API and
contains common code for all addressing information storages. It is located in
uds.addressing.abstract_addressing_information.
Attributes:
Methods:
Requires implementation in concrete classes (abstract attributes and methods):
Warning
A user shall not use
AbstractAddressingInformation
directly as this is an abstract class.
See also
Addressing implementation for CAN - uds.can.addressing
Packet
Abstract implementation for Packet feature is located in uds.packet.
It contains following abstract classes:
AbstractPacketType
AbstractPacketType is an enum with all possible
Network Protocol Control Information (N_PCI) values.
It is located uds.packet.abstract_packet_type.
Methods:
Requires implementation in concrete classes (abstract attributes and methods):
attributes for each possible Network Protocol Control Information (N_PCI) value
See also
Packet types defined for CAN - CanPacketType
AbstractPacket
AbstractPacket class defines a common structure for packets. It is located
uds.packet.abstract_packet.
Attributes:
Methods:
Requires implementation in concrete classes (abstract attributes and methods):
Note
Each network type would require additional attributes defined.
AbstractPacketRecord
AbstractPacketRecord class defines a common structure for packet records
(storage for information about packets that were either transmitted or received).
It is located uds.packet.abstract_packet.
Attributes:
Methods:
__init__()
Requires implementation in concrete classes (abstract attributes and methods):
Note
Each network type would require additional attributes defined.
See also
Packet records implementation for CAN - AbstractPacketRecord
Segmentation
Abstract segmentation implementation is located in uds.segmentation.
Each concrete segmenter shall be able to handle exactly one network type.
AbstractSegmenter
AbstractSegmenter defines common API and contains common code for all
segmenter classes.
Attributes:
Methods:
is_input_packet()__init__()
Requires implementation in concrete classes (abstract attributes and methods):
Warning
A user shall not use
AbstractSegmenter
directly as this is an abstract class.
See also
Segmentation implementation for CAN - uds.can.segmenter
Transport Interface
Transport interfaces are meant to handle Physical (layer 1), Data (layer 2), Network (layer 3) and Transport (layer 4)
layers of UDS OSI model which are unique for every communication bus/network.
First two layers (Physical and Data Link) are handled by some external packages.
The implementation that is common for all Transport Interfaces is located in uds.transport_interface
sub-package.
AbstractTransportInterface
Abstract API that is common for all Transport Interfaces (and therefore buses/networks) is defined in
AbstractTransportInterface class.
There shall be exactly one concrete class created for each supported network manager.
Attributes:
Methods:
Requires implementation in concrete classes (abstract attributes and methods):
Warning
A user shall not use
AbstractTransportInterface
directly as this is an abstract class.
See also
Abstract CAN Transport Interface (common implementation for Transport Interfaces dedicated for CAN network)
- uds.can.transport_interface.common.AbstractCanTransportInterface.
CAN Transport Interface integrated with python-can package -
uds.can.transport_interface.python_can.PythonCanTransportInterface