uds.message.service_identifiers
Service Identifier (SID) data parameter implementation.
Note
Service Identifiers values and their meanings are defined by ISO 14229-1 and SAE J1979 standards.
Attributes
Difference between request and response SID values (SID = RSID + 0x40). |
|
Set with all possible values of Request SID data parameter according to SAE J1979 and ISO 14229 standards. |
|
Set with all possible values of Response SID data parameter according to SAE J1979 and ISO 14229 standards. |
|
SID and RSID values for services that contain sub-function in their message format. |
Exceptions
Warning about SID value that is legit but not recognized by the package. |
Classes
Request Service Identifier values. |
|
Response Service Identifier values. |
Functions
|
Define SID and RSID values for a non-standard service. |
Module Contents
- uds.message.service_identifiers.RESPONSE_REQUEST_SID_DIFF: int = 64
Difference between request and response SID values (SID = RSID + 0x40).
- uds.message.service_identifiers.ALL_REQUEST_SIDS: uds.utilities.RawBytesSetAlias
Set with all possible values of Request SID data parameter according to SAE J1979 and ISO 14229 standards.
- uds.message.service_identifiers.ALL_RESPONSE_SIDS: uds.utilities.RawBytesSetAlias
Set with all possible values of Response SID data parameter according to SAE J1979 and ISO 14229 standards.
- exception uds.message.service_identifiers.UnrecognizedSIDWarning[source]
Bases:
Warning
Warning about SID value that is legit but not recognized by the package.
Note
If you want to register a SID value, you need to define members (for this SID) manually using
add_member()method (onRequestSIDandResponseSIDclasses).You can also create feature request in the UDS project issues management system to register a SID value (for which this warning was raised).
Initialize self. See help(type(self)) for accurate signature.
- class uds.message.service_identifiers.RequestSID[source]
Bases:
uds.utilities.ValidatedEnum,uds.utilities.ExtendableEnum,uds.utilities.ByteEnum
Request Service Identifier values.
Note
Request SID is always the first payload byte of all request message.
Initialize self. See help(type(self)) for accurate signature.
- AccessTimingParameter: RequestSID = 131
- DiagnosticSessionControl: RequestSID = 16
- ECUReset: RequestSID = 17
- SecurityAccess: RequestSID = 39
- CommunicationControl: RequestSID = 40
- Authentication: RequestSID = 41
- TesterPresent: RequestSID = 62
- ControlDTCSetting: RequestSID = 133
- ResponseOnEvent: RequestSID = 134
- LinkControl: RequestSID = 135
- ReadDataByIdentifier: RequestSID = 34
- ReadMemoryByAddress: RequestSID = 35
- ReadScalingDataByIdentifier: RequestSID = 36
- ReadDataByPeriodicIdentifier: RequestSID = 42
- DynamicallyDefineDataIdentifier: RequestSID = 44
- WriteDataByIdentifier: RequestSID = 46
- WriteMemoryByAddress: RequestSID = 61
- ClearDiagnosticInformation: RequestSID = 20
- ReadDTCInformation: RequestSID = 25
- InputOutputControlByIdentifier: RequestSID = 47
- RoutineControl: RequestSID = 49
- RequestDownload: RequestSID = 52
- RequestUpload: RequestSID = 53
- TransferData: RequestSID = 54
- RequestTransferExit: RequestSID = 55
- RequestFileTransfer: RequestSID = 56
- SecuredDataTransmission: RequestSID = 132
- class uds.message.service_identifiers.ResponseSID[source]
Bases:
uds.utilities.ValidatedEnum,uds.utilities.ExtendableEnum,uds.utilities.ByteEnum
Response Service Identifier values.
Note
Response SID is always the first payload byte of all request message.
Warning
This enum contains multiple members (for all the services as
RequestSID), but most of them are dynamically (implicitly) added and invisible in the documentation.Initialize self. See help(type(self)) for accurate signature.
- NegativeResponse: ResponseSID = 127
- AccessTimingParameter: ResponseSID
- DiagnosticSessionControl: ResponseSID
- ECUReset: ResponseSID
- SecurityAccess: ResponseSID
- CommunicationControl: ResponseSID
- Authentication: ResponseSID
- TesterPresent: ResponseSID
- ControlDTCSetting: ResponseSID
- ResponseOnEvent: ResponseSID
- LinkControl: ResponseSID
- ReadDataByIdentifier: ResponseSID
- ReadMemoryByAddress: ResponseSID
- ReadScalingDataByIdentifier: ResponseSID
- ReadDataByPeriodicIdentifier: ResponseSID
- DynamicallyDefineDataIdentifier: ResponseSID
- WriteDataByIdentifier: ResponseSID
- WriteMemoryByAddress: ResponseSID
- ClearDiagnosticInformation: ResponseSID
- ReadDTCInformation: ResponseSID
- InputOutputControlByIdentifier: ResponseSID
- RoutineControl: ResponseSID
- RequestDownload: ResponseSID
- RequestUpload: ResponseSID
- TransferData: ResponseSID
- RequestTransferExit: ResponseSID
- RequestFileTransfer: ResponseSID
- SecuredDataTransmission: ResponseSID
- uds.message.service_identifiers.SERVICES_WITH_SUBFUNCTION
SID and RSID values for services that contain sub-function in their message format.
- uds.message.service_identifiers.define_service(sid, name)[source]
Define SID and RSID values for a non-standard service.
- Parameters:
- Raises:
TypeError – Incorrect value type provided.
ValueError – Incorrect value provided.
InconsistencyError – At least one member for provided SID value is already defined.
- Returns:
Defined RequestSID and ResponseSID members.
- Return type:
Tuple[RequestSID, ResponseSID]