uds.can.packet.abstract_container

Abstract definition of a container for a CAN packet.

Attributes

CanPacketsContainersSequence

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

Classes

AbstractCanPacketContainer

Abstract definition of CAN Packets containers.

Module Contents

class uds.can.packet.abstract_container.AbstractCanPacketContainer[source]

Bases: uds.packet.abstract_packet.AbstractPacketContainer, abc.ABC

Inheritance diagram of uds.can.packet.abstract_container.AbstractCanPacketContainer

Abstract definition of CAN Packets containers.

property can_id: int
Abstractmethod:

Return type:

int

CAN Identifier (CAN ID) of a CAN Frame that carries this CAN packet.

property raw_frame_data: bytes
Abstractmethod:

Return type:

bytes

Raw data bytes of a CAN frame that carries this CAN packet.

property dlc: int

Value of Data Length Code (DLC) of a CAN Frame that carries this CAN packet.

Return type:

int

property addressing_format: uds.can.addressing.CanAddressingFormat
Abstractmethod:

Return type:

uds.can.addressing.CanAddressingFormat

CAN addressing format used by this CAN packet.

property target_address: int | None

Target Address (TA) value of this CAN Packet.

Target Address value is used with following addressing formats:

None in other cases.

Return type:

Optional[int]

property source_address: int | None

Source Address (SA) value of this CAN Packet.

Source Address value is used with following addressing formats:

None in other cases.

Return type:

Optional[int]

property address_extension: int | None

Address Extension (AE) value of this CAN Packet.

Address Extension is used with following addressing formats:

None in other cases.

Return type:

Optional[int]

property packet_type: uds.can.packet.can_packet_type.CanPacketType

Type (N_PCI value) of this CAN packet.

Return type:

uds.can.packet.can_packet_type.CanPacketType

property data_length: int | None

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

Data length is only provided by packets of following types:

None in other cases.

Raises:

NotImplementedError – There is missing implementation for the set CAN Packet Type.

Return type:

Optional[int]

property sequence_number: int | None

Sequence Number carried by this CAN packet.

Sequence Number is only provided by packets of following types:

None in other cases.

Raises:

NotImplementedError – There is missing implementation for current CAN Packet Type.

Return type:

Optional[int]

property flow_status: uds.can.packet.flow_control.CanFlowStatus | None

Flow Status carried by this CAN packet.

Flow Status is only provided by packets of following types:

None in other cases.

Raises:

NotImplementedError – There is missing implementation for current CAN Packet Type.

Return type:

Optional[uds.can.packet.flow_control.CanFlowStatus]

property block_size: int | None

Block Size value carried by this CAN packet.

Block Size is only provided by packets of following types:

None in other cases.

Raises:

NotImplementedError – There is missing implementation for current CAN Packet Type.

Return type:

Optional[int]

property st_min: int | None

Separation Time minimum (STmin) value carried by this CAN packet.

STmin is only provided by packets of following types:

None in other cases.

Raises:

NotImplementedError – There is missing implementation for current CAN Packet Type.

Return type:

Optional[int]

property addressing_type: uds.addressing.AddressingType
Abstractmethod:

Return type:

uds.addressing.AddressingType

Addressing type for which this CAN packet is relevant.

property payload: bytes | None

Diagnostic message payload carried by this CAN packet.

Payload is only provided by packets of following types:

None in other cases.

Warning

For Consecutive Frames this value might contain additional filler bytes (they are not part of diagnostic message payload) that were added during CAN Frame Data Padding. The presence of filler bytes in Consecutive Frame cannot be determined basing solely on the information contained in this packet object.

Raises:

NotImplementedError – There is missing implementation for current CAN Packet Type.

Return type:

Optional[bytes]

uds.can.packet.abstract_container.CanPacketsContainersSequence

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