pub struct UdsDiagnosticServer { /* private fields */ }
Expand description

UDS Diagnostic server

Implementations

Clears diagnostic information (DTCs) from the ECU.

Parameters
  • server - The UDS Diagnostic server
  • dtc_mask - Mask of DTCs to clear. Only the lower 3 bytes are used (from 0x00000000 - 0x00FFFFFF)

Modifies ECU communication settings. These settings persist until the ECU is power cycled

Parameters
  • server - The UDS diagnostic server
  • communication_type - Communication layer to modify
  • Subnet - The subnet the ECU communicates with to modify
  • comm_level - Communication level

Requests the ECU to go into a specific diagnostic session mode

Asks the ECU to perform a hard reset. See ResetType::HardReset for more details

Parameters
  • server - The UDS Diagnostic server

Asks the ECU to perform a key off/on reset. See ResetType::KeyOffReset for more details

Parameters
  • server - The UDS Diagnostic server

Asks the ECU to perform a soft reset. See ResetType::SoftReset for more details

Parameters
  • server - The UDS Diagnostic server

Asks the ECU to enable rapid power shutdown mode. See ResetType::EnableRapidPowerShutDown for more details

Parameters
  • server - The UDS Diagnostic server
Returns

If successful, this function will return the minimum time in seconds that the ECU will remain in the power-down sequence

Asks the ECU to disable rapid power shutdown mode

Parameters
  • server - The UDS Diagnostic server

Returns the number of DTCs stored on the ECU matching the provided status_mask

Returns

Returns a tuple of the given information:

  1. (u8) - DTCStatusAvailabilityMask
  2. (DTCFormatType) - Format of the DTCs
  3. (u16) - Number of DTCs which match the status mask

Returns a list of DTCs stored on the ECU matching the provided status_mask

Returns a list of DTCs out of the DTC mirror memory who’s status_mask matches the provided mask

Returns the number of DTCs in DTC mirror memory who’s status_mask matches the provided mask

Returns

Returns a tuple of the given information:

  1. (u8) - DTCStatusAvailabilityMask
  2. (DTCFormatType) - Format of the DTCs
  3. (u16) - Number of DTCs which match the status mask

Returns the number of OBD emissions related DTCs stored on the ECU who’s status mask matches the provided masks

Returns

Returns a tuple of the given information:

  1. (u8) - DTCStatusAvailabilityMask
  2. (DTCFormatType) - Format of the DTCs
  3. (u16) - Number of DTCs which match the status mask

Returns a list of OBD emissions related DTCs stored on the ECU who’s status mask matches the provided mask

Returns all DTC snapshot identifications (DTC number(s) and DTCSnapshot record number(s))

Returns a list of snapshot records based on the mask of snapshot_record_number (0xFF for all records)

Returns the DTCExtendedData record(s) associated with the provided DTC mask and record number. For the record_number, 0xFE implies all OBD records. and 0xFF implies all records.

Returns

This function will return the ECUs full response if successful

Returns a list of extended data records stored in DTC mirror memory for a given DTC. 0xFF for extended_data_record means return all extended data records.

Returns

This function will return the ECUs full response if successful

Returns the number of DTCs stored on the ECU that match the provided severity and status mask

Returns a list of DTCs who’s severity mask matches the provided mask

Returns the severity status of a provided DTC

Returns a list of all DTCs that the ECU can return

Returns the first failed DTC to be detected since the last DTC clear operation

Returns the first confirmed DTC to be detected since the last DTC clear operation

Returns the most recent DTC to be detected since the last DTC clear operation

Returns the most recent DTC to be detected since the last DTC clear operation

Returns the current number of ‘pre-failed’ DTCs on the ECU, which have not yet been confirmed as being either ‘pending’ or ‘confirmed’

Returns

This function will return a vector of information, where each element is a tuple containing the following values:

  1. (u32) - DTC Code
  2. (u8) - Fault detection counter

Returns a list of DTCs that have a permanent status

Requests a seed from the ECU for security access.

Once the key is calculated from the response seed, run UdsDiagnosticServer::send_key to send the computed key to the ECU

Parameters
  • server - The UDS Diagnostic server
Returns

Returns the security key’s seed

Sends the computed key to the ECU.

If this function is successful, then the ECU has now allows access to security protected memory regions and functions

Parameters
  • server - The UDS Diagnostic server
  • key - The computed key to send to the ECU

Creates a new UDS over an ISO-TP connection with the ECU

On startup, this server will configure the channel with the necessary settings provided in both settings and channel_cfg

Parameters
  • settings - UDS Server settings
  • channel - ISO-TP communication channel with the ECU
  • channel_cfg - The settings to use for the ISO-TP channel
  • event_handler - Handler for logging events happening within the server. If you don’t want to create your own handler, use UdsVoidHandler

Returns the current settings used by the UDS Server

Trait Implementations

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

Sets the command retry counter

Sets the command retry interval

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

Returns if the diagnostic server is running or not

Executes the destructor for this type. Read more

Converts to this type from the input type.

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 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.