uds.packet.abstract_packet ========================== .. py:module:: uds.packet.abstract_packet .. autoapi-nested-parse:: Abstract definition of packets that is common for all bus/network types. Attributes ---------- .. autoapisummary:: uds.packet.abstract_packet.PacketsContainersSequence uds.packet.abstract_packet.PacketsTuple uds.packet.abstract_packet.PacketsRecordsTuple uds.packet.abstract_packet.PacketsRecordsSequence Classes ------- .. autoapisummary:: uds.packet.abstract_packet.AbstractPacketContainer uds.packet.abstract_packet.AbstractPacket uds.packet.abstract_packet.AbstractPacketRecord Module Contents --------------- .. py:class:: AbstractPacketContainer Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.packet.abstract_packet.AbstractPacketContainer :parts: 1 :private-bases: Abstract definition of a container with packet information. .. py:method:: __str__() Present object in string format. .. py:property:: raw_frame_data :type: bytes :abstractmethod: Raw data bytes of a frame that carries this packet. .. py:property:: packet_type :type: uds.packet.abstract_packet_type.AbstractPacketType :abstractmethod: Type (N_PCI value) of this packet. .. py:property:: data_length :type: Optional[int] :abstractmethod: Payload bytes number of a diagnostic message. .. py:property:: addressing_type :type: uds.addressing.AddressingType :abstractmethod: Addressing for which this packet is relevant. .. py:property:: payload :type: Optional[bytes] :abstractmethod: Diagnostic message payload carried by this packet. .. py:class:: AbstractPacket Bases: :py:obj:`AbstractPacketContainer`, :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.packet.abstract_packet.AbstractPacket :parts: 1 :private-bases: Abstract definition of a packet (Network Protocol Data Unit - N_PDU). .. py:class:: AbstractPacketRecord(frame, direction, transmission_time, transmission_timestamp) Bases: :py:obj:`AbstractPacketContainer`, :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: uds.packet.abstract_packet.AbstractPacketRecord :parts: 1 :private-bases: Abstract definition of a storage for historic information about transmitted or received packet. Create a record of historic information about a packet. :param frame: Frame that carried this packet. :param direction: Information whether this packet was transmitted or received. :param transmission_time: Time when this packet was transmitted on a bus/network. :param transmission_timestamp: Timestamp when this packet was transmitted on a bus/network. .. py:property:: frame :type: Any Frame that carried this packet. .. py:property:: direction :type: uds.addressing.TransmissionDirection Information whether this packet was transmitted or received. .. py:property:: transmission_time :type: datetime.datetime Time when this packet was transmitted on a bus/network. .. py:property:: transmission_timestamp :type: float Timestamp when this packet was transmitted on a bus/network. .. py:method:: __str__() Present object in string format. .. py:method:: _validate_frame(value) :staticmethod: :abstractmethod: Validate a frame argument. :param value: Value to validate. .. py:method:: _validate_attributes() :abstractmethod: Validate whether attributes that were set are a valid for a Packet record. .. py:data:: PacketsContainersSequence Alias for a sequence filled with packet or packet record objects. .. py:data:: PacketsTuple Alias for a packet objects tuple. .. py:data:: PacketsRecordsTuple Alias for a packet record objects tuple. .. py:data:: PacketsRecordsSequence Alias for a packet record objects sequence.