Enum ecu_diagnostics::uds::UDSCommand
source · [−]#[repr(u8)]
pub enum UDSCommand {
Show 26 variants
DiagnosticSessionControl,
ECUReset,
SecurityAccess,
CommunicationControl,
TesterPresent,
AccessTimingParameters,
SecuredDataTransmission,
ControlDTCSettings,
ResponseOnEvent,
LinkControl,
ReadDataByIdentifier,
ReadMemoryByAddress,
ReadScalingDataByIdentifier,
ReadDataByPeriodicIdentifier,
DynamicallyDefineDataIdentifier,
WriteDataByIdentifier,
WriteMemoryByAddress,
ClearDiagnosticInformation,
ReadDTCInformation,
InputOutputControlByIdentifier,
RoutineControl,
RequestDownload,
RequestUpload,
TransferData,
RequestTransferExit,
Other(u8),
}
Expand description
UDS Command Service IDs
Variants
DiagnosticSessionControl
Diagnostic session control.
ECUReset
ECU Reset.
SecurityAccess
Security access.
CommunicationControl
Controls communication functionality of the ECU.
TesterPresent
Tester present command. Used internally by UDS Server
AccessTimingParameters
Accesses ECU timing parameters.
SecuredDataTransmission
ControlDTCSettings
ResponseOnEvent
LinkControl
ReadDataByIdentifier
ReadMemoryByAddress
ReadScalingDataByIdentifier
ReadDataByPeriodicIdentifier
DynamicallyDefineDataIdentifier
WriteDataByIdentifier
WriteMemoryByAddress
ClearDiagnosticInformation
ReadDTCInformation
Reading and querying diagnostic trouble codes stored on the ECU.
InputOutputControlByIdentifier
RoutineControl
RequestDownload
RequestUpload
TransferData
RequestTransferExit
Other(u8)
Trait Implementations
sourceimpl Clone for UDSCommand
impl Clone for UDSCommand
sourcefn clone(&self) -> UDSCommand
fn clone(&self) -> UDSCommand
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UDSCommand
impl Debug for UDSCommand
sourceimpl DiagnosticServer<UDSCommand> for UdsDiagnosticServer
impl DiagnosticServer<UDSCommand> for UdsDiagnosticServer
sourcefn execute_command_with_response(
&mut self,
sid: UDSCommand,
args: &[u8]
) -> DiagServerResult<Vec<u8>>
fn execute_command_with_response(
&mut self,
sid: UDSCommand,
args: &[u8]
) -> DiagServerResult<Vec<u8>>
Send a command to the ECU, and receive its response
Parameters
- sid - The Service ID of the command
- args - The arguments for the service
Returns
If the function is successful, and the ECU responds with an OK response (Containing data), then the full ECU response is returned. The response will begin with the sid + 0x40
sourcefn execute_command(
&mut self,
sid: UDSCommand,
args: &[u8]
) -> DiagServerResult<()>
fn execute_command(
&mut self,
sid: UDSCommand,
args: &[u8]
) -> DiagServerResult<()>
Send a command to the ECU, but don’t receive a response
Parameters
- sid - The Service ID of the command
- args - The arguments for the service
sourcefn set_repeat_count(&mut self, count: u32)
fn set_repeat_count(&mut self, count: u32)
Sets the command retry counter
sourcefn set_repeat_interval_count(&mut self, interval_ms: u32)
fn set_repeat_interval_count(&mut self, interval_ms: u32)
Sets the command retry interval
sourcefn send_byte_array(&mut self, arr: &[u8]) -> DiagServerResult<()>
fn send_byte_array(&mut self, arr: &[u8]) -> DiagServerResult<()>
Sends an arbitrary byte array to the ECU, and does not query response from the ECU
sourcefn send_byte_array_with_response(
&mut self,
arr: &[u8]
) -> DiagServerResult<Vec<u8>>
fn send_byte_array_with_response(
&mut self,
arr: &[u8]
) -> DiagServerResult<Vec<u8>>
Sends an arbitrary byte array to the ECU, and polls for the ECU’s response
sourcefn is_server_running(&self) -> bool
fn is_server_running(&self) -> bool
Returns if the diagnostic server is running or not
sourceimpl From<UDSCommand> for u8
impl From<UDSCommand> for u8
sourcefn from(cmd: UDSCommand) -> Self
fn from(cmd: UDSCommand) -> Self
Converts to this type from the input type.
sourceimpl From<u8> for UDSCommand
impl From<u8> for UDSCommand
sourceimpl Ord for UDSCommand
impl Ord for UDSCommand
sourceimpl PartialEq<UDSCommand> for UDSCommand
impl PartialEq<UDSCommand> for UDSCommand
sourcefn eq(&self, other: &UDSCommand) -> bool
fn eq(&self, other: &UDSCommand) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UDSCommand) -> bool
fn ne(&self, other: &UDSCommand) -> bool
This method tests for !=
.
sourceimpl PartialOrd<UDSCommand> for UDSCommand
impl PartialOrd<UDSCommand> for UDSCommand
sourcefn partial_cmp(&self, other: &UDSCommand) -> Option<Ordering>
fn partial_cmp(&self, other: &UDSCommand) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for UDSCommand
impl Eq for UDSCommand
impl StructuralEq for UDSCommand
impl StructuralPartialEq for UDSCommand
Auto Trait Implementations
impl RefUnwindSafe for UDSCommand
impl Send for UDSCommand
impl Sync for UDSCommand
impl Unpin for UDSCommand
impl UnwindSafe for UDSCommand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more