uds.packet.abstract_packet

Abstract definition of packets that is common for all bus/network types.

Attributes

PacketsContainersSequenceAlias

Alias for a sequence filled with packet or packet record objects.

PacketsTupleAlias

Alias for a packet objects tuple.

PacketsRecordsTupleAlias

Alias for a packet record objects tuple.

PacketsRecordsSequenceAlias

Alias for a packet record objects sequence.

Classes

AbstractPacketContainer

Abstract definition of a container with packet information.

AbstractPacket

Abstract definition of a packet (Network Protocol Data Unit - N_PDU).

AbstractPacketRecord

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

Module Contents

class uds.packet.abstract_packet.AbstractPacketContainer[source]

Bases: abc.ABC

Inheritance diagram of uds.packet.abstract_packet.AbstractPacketContainer

Abstract definition of a container with packet information.

__str__()[source]

Present object in string format.

Return type:

str

property raw_frame_data: bytes
Abstractmethod:

Return type:

bytes

Raw data bytes of a frame that carries this packet.

property packet_type: uds.packet.abstract_packet_type.AbstractPacketType
Abstractmethod:

Return type:

uds.packet.abstract_packet_type.AbstractPacketType

Type (N_PCI value) of this packet.

property data_length: None | int
Abstractmethod:

Return type:

None | int

Payload bytes number of a diagnostic message.

property addressing_type: uds.addressing.AddressingType
Abstractmethod:

Return type:

uds.addressing.AddressingType

Addressing for which this packet is relevant.

property payload: None | bytes
Abstractmethod:

Return type:

None | bytes

Diagnostic message payload carried by this packet.

class uds.packet.abstract_packet.AbstractPacket[source]

Bases: AbstractPacketContainer, abc.ABC

Inheritance diagram of uds.packet.abstract_packet.AbstractPacket

Abstract definition of a packet (Network Protocol Data Unit - N_PDU).

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

Bases: AbstractPacketContainer, abc.ABC

Inheritance diagram of uds.packet.abstract_packet.AbstractPacketRecord

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

Create a record of historic information about a packet.

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

  • direction (uds.addressing.TransmissionDirection) – Information whether this packet was transmitted or received.

  • transmission_time (datetime.datetime) – Time when this packet was transmitted on a bus/network.

  • transmission_timestamp (float) – Timestamp when this packet was transmitted on a bus/network.

property frame: Any

Frame that carried this packet.

Return type:

Any

property direction: uds.addressing.TransmissionDirection

Information whether this packet was transmitted or received.

Return type:

uds.addressing.TransmissionDirection

property transmission_time: datetime.datetime

Time when this packet was transmitted on a bus/network.

Return type:

datetime.datetime

property transmission_timestamp: float

Timestamp when this packet was transmitted on a bus/network.

Return type:

float

__str__()[source]

Present object in string format.

Return type:

str

static _validate_frame(value)[source]
Abstractmethod:

Parameters:

value (Any)

Return type:

None

Validate a frame argument.

Parameters:

value (Any) – Value to validate.

Return type:

None

abstractmethod _validate_attributes()[source]

Validate whether attributes that were set are a valid for a Packet record.

Return type:

None

uds.packet.abstract_packet.PacketsContainersSequenceAlias

Alias for a sequence filled with packet or packet record objects.

uds.packet.abstract_packet.PacketsTupleAlias

Alias for a packet objects tuple.

uds.packet.abstract_packet.PacketsRecordsTupleAlias

Alias for a packet record objects tuple.

uds.packet.abstract_packet.PacketsRecordsSequenceAlias

Alias for a packet record objects sequence.