1
2
3
4
5
6
7
8
9
10
11
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
use crate::enum_wrapper;
use enum2repr::EnumRepr;
/// Reset ECU subcommand
#[repr(u8)]
#[derive(EnumRepr, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[deprecated(
note = "The `auto_uds` crate has been renamed to `automotive_diag`. Update your Cargo.toml, and use this enum from the `uds` namespace."
)]
pub enum ResetType {
/// Signals the ECU to perform a hard-reset,
/// simulating a forceful power off/on cycle
///
/// This might result in both non-volatile memory and volatile memory locations being re-initialized
HardReset = 0x01,
/// Signals the ECU to perform a simulated key off/on cycle,
/// simulating the usual key-off/on cycle
///
/// This typically results in the preservation of non-volatile memory,
/// but volatile memory will be re-initialized
KeyOffReset = 0x02,
/// Signals the ECU to perform a soft reset, simply rebooting the current
/// application running on it.
///
/// This will result in the preservation of both non-volatile and volatile memory
SoftReset = 0x03,
/// Enables a rapid power shutdown on the ECU during a key-off cycle.
///
/// IMPORTANT: Once this has been used, the diagnostic server **cannot** send
/// any other messages other than ECUReset in order to not disturb the rapid power
/// shutdown function.
EnableRapidPowerShutDown = 0x04,
/// Disables a rapid power shutdown on the ECU during a key-off cycle.
DisableRapidPowerShutDown = 0x05,
}
enum_wrapper!(ResetType, ResetTypeByte);