11use crate :: utils:: { enum_wrapper, python_test} ;
22
3- enum_wrapper ! ( uds, UdsCommand , UdsCommandByte , display = @"10111100423397497463" ) ;
3+ // The display constant ensures we do not accidentally change doc strings below.
4+ // We treat them as display strings too, so a change to the first line of the doc str is a code change.
5+ // Use `just bless` to update the expected value.
6+ enum_wrapper ! ( uds, UdsCommand , UdsCommandByte , display = @"2468007968532925220" ) ;
47python_test ! ( uds, UdsCommand , DiagnosticSessionControl , ECUReset ) ;
58
69/// UDS Command Service IDs
@@ -16,24 +19,31 @@ python_test!(uds, UdsCommand, DiagnosticSessionControl, ECUReset);
1619#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1720pub enum UdsCommand {
1821 /// The client requests to control a diagnostic session with a server(s).
22+ /// See also [`crate::uds::UdsSessionType`].
1923 DiagnosticSessionControl = 0x10 ,
2024 /// The client forces the server(s) to perform a reset.
25+ /// See also [`crate::uds::ResetType`].
2126 ECUReset = 0x11 ,
2227 /// The client requests to unlock a secured server(s).
28+ /// See also [`crate::uds::SecurityOperation`].
2329 SecurityAccess = 0x27 ,
2430 /// The client controls the setting of communication parameters in the server (e.g. communication baud-rate).
31+ /// See also [`crate::uds::CommunicationLevel`].
2532 CommunicationControl = 0x28 ,
2633 /// The client indicates to the server(s) that it is still present.
2734 TesterPresent = 0x3E ,
2835 /// The client requests to access the server(s) with a specific access mode.
36+ /// See also [`crate::uds::AuthenticationSubFunction`].
2937 Authentication = 0x29 ,
3038 /// The client uses this service to perform data transmission with an extended data link security.
3139 SecuredDataTransmission = 0x84 ,
3240 /// The client controls the setting of DTCs in the server.
41+ /// See also [`crate::uds::DtcSettingType`].
3342 ControlDTCSetting = 0x85 ,
3443 /// The client requests to set up and/or control an event mechanism in the server.
3544 ResponseOnEvent = 0x86 ,
3645 /// The client requests control of the communication baud-rate.
46+ /// See also [`crate::uds::LinkControlType`].
3747 LinkControl = 0x87 ,
3848 /// The client requests to read the current value of a record identified by a provided dataIdentifier.
3949 ReadDataByIdentifier = 0x22 ,
@@ -42,8 +52,10 @@ pub enum UdsCommand {
4252 /// The client requests to read the scaling information of a record identified by a provided dataIdentifier.
4353 ReadScalingDataByIdentifier = 0x24 ,
4454 /// The client requests to schedule data in the server for periodic transmission.
55+ /// See also [`crate::uds::PeriodicTransmissionMode`].
4556 ReadDataByPeriodicIdentifier = 0x2A ,
46- /// The client requests to dynamically define data Identifiers that may subsequently be read by the [`UdsCommand::ReadDataByIdentifier`] service.
57+ /// The client requests to dynamically define data identifiers that may subsequently be read by the `ReadDataByIdentifier` service.
58+ /// See also [`UdsCommand::ReadDataByIdentifier`] and [`crate::uds::DataDefinitionType`].
4759 DynamicallyDefineDataIdentifier = 0x2C ,
4860 /// The client requests to write a record specified by a provided dataIdentifier.
4961 WriteDataByIdentifier = 0x2E ,
@@ -52,10 +64,13 @@ pub enum UdsCommand {
5264 /// Allows the client to clear diagnostic information from the server (including DTCs, captured data, etc.).
5365 ClearDiagnosticInformation = 0x14 ,
5466 /// Allows the client to request diagnostic information from the server (including DTCs, captured data, etc.).
67+ /// See also [`crate::uds::DtcSubFunction`].
5568 ReadDTCInformation = 0x19 ,
5669 /// The client requests the control of an input/output specific to the server.
70+ /// See also [`crate::uds::InputOutputControlParameter`].
5771 InputOutputControlByIdentifier = 0x2F ,
58- /// The client requests to start, stop a routine in the server(s) or requests the routine results. See also [`crate::uds::RoutineControlType`].
72+ /// The client requests to start, stop a routine in the server(s) or requests the routine results.
73+ /// See also [`crate::uds::RoutineControlType`].
5974 RoutineControl = 0x31 ,
6075 /// The client requests the negotiation of a data transfer from the client to the server.
6176 RequestDownload = 0x34 ,
@@ -66,6 +81,7 @@ pub enum UdsCommand {
6681 /// The client requests the termination of a data transfer.
6782 RequestTransferExit = 0x37 ,
6883 /// The client requests the negotiation of a file transfer between server and client.
84+ /// See also [`crate::uds::FileTransferMode`].
6985 RequestFileTransfer = 0x38 ,
7086}
7187
0 commit comments