uds.messages.uds_message
Module with common implementation of all diagnostic messages (requests and responses).
Diagnostic messages are defined on higher layers of UDS OSI Model.
Module Contents
Classes
Definition of a diagnostic message. |
|
Storage for historic information of a diagnostic message that was either received or transmitted. |
- class uds.messages.uds_message.UdsMessage(payload, addressing)[source]
Definition of a diagnostic message.
Objects of this class act as a storage for all relevant attributes of a diagnostic message. Later on, such object might be used in segmentation process or to transmit the message. Once a message is transmitted, its historic data would be stored in
UdsMessageRecord
.Create a storage for a single diagnostic message.
- Parameters
payload (uds.utilities.RawBytes) – Raw bytes of payload that this diagnostic message carries.
addressing (uds.messages.transmission_attributes.AddressingMemberTyping) – Addressing type for which this message is relevant.
- property payload(self)
Raw bytes of payload that this diagnostic message carries.
- Return type
uds.utilities.RawBytesTuple
- property addressing(self)
Addressing type for which this message is relevant.
- class uds.messages.uds_message.UdsMessageRecord(payload, packets_records)[source]
Storage for historic information of a diagnostic message that was either received or transmitted.
Create a record of a historic information about a diagnostic message that was either received or transmitted.
- Parameters
packets_records (uds.messages.uds_packet.PacketsRecordsSequence) – Sequence (in transmission order) of UDS packets records that carried this diagnostic message.
payload (uds.utilities.RawBytes) –
- static __validate_packets_records(value)
Validate whether the argument contains UDS Packets records.
- Parameters
value (Any) – Value to validate.
- Raises
TypeError – UDS Packet Records sequence is not list or tuple type.
ValueError – At least one of UDS Packet Records sequence elements is not an object of
AbstractUdsPacketRecord
class.
- Return type
None
- property payload(self)
Raw bytes of payload that this diagnostic message carried.
- Return type
uds.utilities.RawBytesTuple
- property packets_records(self)
Sequence (in transmission order) of UDS packets records that carried this diagnostic message.
- Return type
uds.messages.uds_packet.PacketsRecordsTuple
- property addressing(self)
Addressing type which was used to transmit this message.
- property direction(self)
Information whether this message was received or sent by the code.
- property transmission_start(self)
Time stamp when transmission of this messages was initiated.
It is determined by a moment of time when the first packet (that carried this message) was published to a bus (either received or transmitted).
- Returns
Time stamp when transmission of this message was initiated.
- Return type
uds.utilities.TimeStamp
- property transmission_end(self)
Time stamp when transmission of this messages was completed.
It is determined by a moment of time when the last packet (that carried this message) was published to a bus (either received or transmitted).
- Returns
Time stamp when transmission of this message was completed.
- Return type
uds.utilities.TimeStamp