uds.messages.uds_packet
Module with common implementation of UDS packets for all bus types.
UDS Packets are defined on middle layers of UDS OSI Model.
Module Contents
Classes
Abstract definition of UDS packet type. |
|
Abstract definition of UDS Packet (Network Protocol Data Unit - N_PDU). |
|
Abstract definition of a storage for historic information about transmitted or received UDS Packet. |
Attributes
Typing alias of a tuple filled with |
|
Typing alias of a tuple filled with |
|
Typing alias of a sequence filled with |
|
Typing alias of a tuple filled with |
|
Typing alias of a sequence filled with |
|
Typing alias of UDS packet. |
|
Typing alias of a tuple filled with UDS packets. |
|
Typing alias of a sequence filled with UDS packets. |
- class uds.messages.uds_packet.AbstractUdsPacketType[source]
Bases:
uds.utilities.NibbleEnum
,uds.utilities.ValidatedEnum
,uds.utilities.ExtendableEnum
Abstract definition of UDS packet type.
Packet type information is carried by Network Protocol Control Information (N_PCI). Enums with packet types (N_PCI) values for certain buses (e.g. CAN, LIN, FlexRay) must inherit after this class.
Note: There are some differences in values for each bus (e.g. LIN does not use Flow Control).
Initialize self. See help(type(self)) for accurate signature.
- class uds.messages.uds_packet.AbstractUdsPacket(raw_data, addressing)[source]
Bases:
abc.ABC
Abstract definition of UDS Packet (Network Protocol Data Unit - N_PDU).
Create a storage for a single UDS packet.
- Parameters
raw_data (uds.utilities.RawBytes) – Raw bytes of UDS packet data.
addressing (uds.messages.transmission_attributes.AddressingMemberTyping) – Addressing type for which this packet is relevant.
- property addressing(self)
Addressing type for which this packet is relevant.
- property raw_data(self)
Raw bytes of data that this packet carries.
- Return type
uds.utilities.RawBytesTuple
- property packet_type(self)
UDS packet type value - N_PCI value of this N_PDU.
- Return type
- class uds.messages.uds_packet.AbstractUdsPacketRecord(frame, direction)[source]
Bases:
abc.ABC
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 (object) – Frame that carried this UDS packet.
direction (uds.messages.transmission_attributes.DirectionMemberTyping) – Information whether this packet was transmitted or received.
- abstract __validate_frame(self, value)
Validate whether the argument contains value with a frame object.
- Parameters
value (Any) – Value to validate.
- Raises
TypeError – The frame argument has other type than expected.
ValueError – Some attribute of the frame argument is missing or its value is unexpected.
- Return type
None
- property frame(self)
Frame that carried this packet.
- Return type
object
- property direction(self)
Information whether this packet was transmitted or received.
- property raw_data(self)
Raw bytes of data that this packet carried.
- Return type
uds.utilities.RawBytesTuple
- property addressing(self)
Addressing type over which this packet was transmitted.
- property transmission_time(self)
Time stamp when this packet was fully transmitted on a bus.
- Return type
uds.utilities.TimeStamp
- property packet_type(self)
UDS packet type value - N_PCI value of this N_PDU.
- Return type
- uds.messages.uds_packet.PacketTypesTuple
Typing alias of a tuple filled with
AbstractUdsPacketType
members.
- uds.messages.uds_packet.PacketsDefinitionTuple
Typing alias of a tuple filled with
AbstractUdsPacket
instances.
- uds.messages.uds_packet.PacketsDefinitionSequence
Typing alias of a sequence filled with
AbstractUdsPacket
instances.
- uds.messages.uds_packet.PacketsRecordsTuple
Typing alias of a tuple filled with
AbstractUdsPacketRecord
instances.
- uds.messages.uds_packet.PacketsRecordsSequence
Typing alias of a sequence filled with
AbstractUdsPacketRecord
instances.
- uds.messages.uds_packet.PacketTyping
Typing alias of UDS packet.
- uds.messages.uds_packet.PacketsTuple
Typing alias of a tuple filled with UDS packets.
- uds.messages.uds_packet.PacketsSequence
Typing alias of a sequence filled with UDS packets.