uds.packet.abstract_packet

Implementation of UDS packets that is common for all bus types.

UDS packets are defined on middle layers of UDS OSI Model.

Module Contents

Classes

AbstractUdsPacket

Abstract definition of UDS Packet (Network Protocol Data Unit - N_PDU).

AbstractUdsPacketRecord

Abstract definition of a storage for historic information about transmitted or received UDS Packet.

Attributes

PacketsDefinitionTuple

Typing alias of a tuple filled with AbstractUdsPacket instances.

PacketsDefinitionSequence

Typing alias of a sequence filled with AbstractUdsPacket instances.

PacketsRecordsTuple

Typing alias of a tuple filled with AbstractUdsPacketRecord instances.

PacketsRecordsSequence

Typing alias of a sequence filled with AbstractUdsPacketRecord instances.

PacketAlias

Typing alias of UDS packet.

PacketsTuple

Typing alias of a tuple filled with UDS packets.

PacketsSequence

Typing alias of a sequence filled with UDS packets.

class uds.packet.abstract_packet.AbstractUdsPacket[source]

Bases: abc.ABC

Inheritance diagram of uds.packet.abstract_packet.AbstractUdsPacket

Abstract definition of UDS Packet (Network Protocol Data Unit - N_PDU).

property addressing_type(self)

Addressing type for which this packet is relevant.

Return type

uds.transmission_attributes.addressing.AddressingTypeAlias

property raw_frame_data(self)

Raw data bytes of a frame that carries this packet.

Return type

uds.utilities.RawBytesTuple

property packet_type(self)

UDS packet type value - N_PCI value of this N_PDU.

Return type

uds.packet.abstract_packet_type.AbstractUdsPacketTypeAlias

property payload(self)

Payload bytes of a diagnostic message carried by this packet.

Return type

Optional[uds.utilities.RawBytesTuple]

property data_length(self)

Payload bytes number of a diagnostic message which is carried by this packet.

Return type

Optional[int]

class uds.packet.abstract_packet.AbstractUdsPacketRecord(frame, direction, transmission_time)[source]

Bases: abc.ABC

Inheritance diagram of uds.packet.abstract_packet.AbstractUdsPacketRecord

Abstract definition of a storage for historic information about transmitted or received UDS Packet.

Create a record of a historic information about a packet that was either received or transmitted.

Parameters
  • frame (Any) – Frame that carried this UDS packet.

  • direction (uds.transmission_attributes.transmission_direction.TransmissionDirectionAlias) – Information whether this packet was transmitted or received.

  • transmission_time (uds.utilities.TimeStamp) – Time stamp when this packet was fully transmitted on a bus.

property frame(self)

Frame that carried this packet.

Return type

Any

property direction(self)

Information whether this packet was transmitted or received.

Return type

uds.transmission_attributes.transmission_direction.TransmissionDirectionAlias

property transmission_time(self)

Time stamp when this packet was fully transmitted on a bus.

Return type

uds.utilities.TimeStamp

property raw_frame_data(self)

Raw data bytes of a frame that carries this packet.

Return type

uds.utilities.RawBytesTuple

property addressing_type(self)

Addressing type over which this packet was transmitted.

Return type

uds.transmission_attributes.addressing.AddressingTypeAlias

property packet_type(self)

UDS packet type value - N_PCI value of this N_PDU.

Return type

uds.packet.abstract_packet_type.AbstractUdsPacketTypeAlias

property payload(self)

Payload bytes of a diagnostic message carried by this packet.

Return type

Optional[uds.utilities.RawBytesTuple]

property data_length(self)

Payload bytes number of a diagnostic message which was carried by this packet.

Return type

Optional[int]

abstract static _validate_frame(value)[source]

Validate a frame argument.

Parameters

value (Any) – Value to validate.

Raises
  • TypeError – The frame argument has unsupported.

  • ValueError – Some attribute of the frame argument is missing or its value is unexpected.

Return type

None

uds.packet.abstract_packet.PacketsDefinitionTuple

Typing alias of a tuple filled with AbstractUdsPacket instances.

uds.packet.abstract_packet.PacketsDefinitionSequence

Typing alias of a sequence filled with AbstractUdsPacket instances.

uds.packet.abstract_packet.PacketsRecordsTuple

Typing alias of a tuple filled with AbstractUdsPacketRecord instances.

uds.packet.abstract_packet.PacketsRecordsSequence

Typing alias of a sequence filled with AbstractUdsPacketRecord instances.

uds.packet.abstract_packet.PacketAlias

Typing alias of UDS packet.

uds.packet.abstract_packet.PacketsTuple

Typing alias of a tuple filled with UDS packets.

uds.packet.abstract_packet.PacketsSequence

Typing alias of a sequence filled with UDS packets.