UDSMessage¶
The UDSMessage dataclass parses and validates a single UDS PDU.
from pyudskit.message import UDSMessage
msg = UDSMessage.from_hex("62 F1 90")
print(msg.service_name)
pyudskit.message.UDSMessage
dataclass
¶
Parsed and validated representation of a single UDS Protocol Data Unit (PDU).
Source code in pyudskit/message.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
is_negative_response
property
¶
True if SID == 0x7F.
is_positive_response
property
¶
True if SID is in range 0x40–0xFF (SID + 0x40 convention).
is_request
property
¶
True if this is a client request frame.
nrc
property
¶
Negative Response Code byte (byte[2]) for 0x7F frames.
nrc_name
property
¶
Human-readable NRC name from registry.
request_service_id
property
¶
For positive responses, returns SID - 0x40. For NRC, returns byte[1].
service_id
property
¶
First byte — the Service Identifier (SID).
service_info
property
¶
Full service entry from UDS_SERVICES registry.
service_name
property
¶
Human-readable service name with response type tag.
decode_dtc_status(status_byte)
¶
Return list of active DTC status flag names for a status byte.
from_bytes(data)
classmethod
¶
from_hex(hex_str)
classmethod
¶
to_hex(sep=' ')
¶
validate()
¶
Validate message structure. Returns (is_valid, error_message).