#[repr(u8)]
pub enum KWP2000Command {
Show 28 variants StartDiagnosticSession, ECUReset, ClearDiagnosticInformation, ReadStatusOfDiagnosticTroubleCodes, ReadDiagnosticTroubleCodesByStatus, ReadECUIdentification, ReadDataByLocalIdentifier, ReadDataByIdentifier, ReadMemoryByAddress, SecurityAccess, DisableNormalMessageTransmission, EnableNormalMessageTransmission, DynamicallyDefineLocalIdentifier, WriteDataByIdentifier, InputOutputControlByLocalIdentifier, StartRoutineByLocalIdentifier, StopRoutineByLocalIdentifier, RequestRoutineResultsByLocalIdentifier, RequestDownload, RequestUpload, TransferData, RequestTransferExit, WriteDataByLocalIdentifier, WriteMemoryByAddress, TesterPresent, ControlDTCSettings, ResponseOnEvent, CustomSid(u8),
}
Expand description

KWP Command Service IDs.

Note. This does not cover both the ‘Reserved’ range (0x87-0xB9) and ‘System supplier specific’ range (0xBA-0xBF)

Variants

StartDiagnosticSession

Start or change ECU diagnostic session mode.

ECUReset

Reset the ECU.

ClearDiagnosticInformation

Clears diagnostic information stored on the ECU.

ReadStatusOfDiagnosticTroubleCodes

Reads snapshot data of DTCs stored on the ECU.

ReadDiagnosticTroubleCodesByStatus

Reads DTCs stored on the ECU.

ReadECUIdentification

Reads ECU identification data.

ReadDataByLocalIdentifier

Reads data from the ECU using a local identifier.

ReadDataByIdentifier

Reads data from the ECU using a unique identifier.

ReadMemoryByAddress

Reads memory from the ECU by address.

SecurityAccess

Security access functions.

DisableNormalMessageTransmission

Disables normal CAN message transmission from an ECU.

EnableNormalMessageTransmission

Enables normal CAN message transmission from an ECU.

DynamicallyDefineLocalIdentifier

WriteDataByIdentifier

InputOutputControlByLocalIdentifier

StartRoutineByLocalIdentifier

Starts a ECU routine given a local identifier.

StopRoutineByLocalIdentifier

Stops a ECU routine given a local identifier.

RequestRoutineResultsByLocalIdentifier

requests results of an executed routine given a local identifier.

RequestDownload

RequestUpload

TransferData

RequestTransferExit

WriteDataByLocalIdentifier

WriteMemoryByAddress

TesterPresent

Tester present message. Kwp2000DiagnosticServer will automatically send this, so no need to manually create a message with this SID

ControlDTCSettings

ResponseOnEvent

CustomSid(u8)

Custom KWP2000 SID not part of the official specification

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

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

Sends an arbitrary byte array to the ECU, and does not query response from the ECU

Sends an arbitrary byte array to the ECU, and polls for the ECU’s response

Sets the command retry counter

Sets the command retry interval

Returns true if the internal KWP2000 Server is running

Converts to this type from the input type.

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.