[][src]Trait obd::Uds

pub trait Uds {
    pub fn query_uds(
        &mut self,
        arbitration_id: u32,
        request_sid: u8,
        data: &[u8]
    ) -> Result<Vec<u8>, Error>; pub fn query_vin(&mut self, arbitration_id: u32) -> Result<String, Error> { ... }
pub fn query_trouble_codes(
        &mut self,
        arbitration_id: u32
    ) -> Result<Vec<DTC>, Error> { ... }
pub fn query_pending_trouble_codes(
        &mut self,
        arbitration_id: u32
    ) -> Result<Vec<DTC>, Error> { ... }
pub fn set_diagnostic_session(
        &mut self,
        arbitration_id: u32,
        id: u8
    ) -> Result<(), Error> { ... }
pub fn request_security_seed(
        &mut self,
        arbitration_id: u32
    ) -> Result<Vec<u8>, Error> { ... }
pub fn request_security_key(
        &mut self,
        arbitration_id: u32,
        key: &[u8]
    ) -> Result<(), Error> { ... }
pub fn read_memory_address(
        &mut self,
        arbitration_id: u32,
        address: u32,
        length: u16
    ) -> Result<Vec<u8>, Error> { ... } }

Unified diagnostic services. This is the standard protocol used for reading PIDs and communicating with ECUs.

Required methods

pub fn query_uds(
    &mut self,
    arbitration_id: u32,
    request_sid: u8,
    data: &[u8]
) -> Result<Vec<u8>, Error>
[src]

Sends a UDS message and waits for a response.

Arguments

  • arbitration_id - the CAN arbitration ID to use when sending. This is incremented by 8 to calculate the expected response ID.
  • request_sid - the requested service ID.
  • data - the message data.
Loading content...

Provided methods

pub fn query_vin(&mut self, arbitration_id: u32) -> Result<String, Error>[src]

Sends a query for a VIN (vehicle identification number).

pub fn query_trouble_codes(
    &mut self,
    arbitration_id: u32
) -> Result<Vec<DTC>, Error>
[src]

Queries the list of diagnostic trouble codes

pub fn query_pending_trouble_codes(
    &mut self,
    arbitration_id: u32
) -> Result<Vec<DTC>, Error>
[src]

Queries the list of diagnostic trouble codes

pub fn set_diagnostic_session(
    &mut self,
    arbitration_id: u32,
    id: u8
) -> Result<(), Error>
[src]

Sets the diagnostic session type

pub fn request_security_seed(
    &mut self,
    arbitration_id: u32
) -> Result<Vec<u8>, Error>
[src]

Requests a security access seed

pub fn request_security_key(
    &mut self,
    arbitration_id: u32,
    key: &[u8]
) -> Result<(), Error>
[src]

Authenticates with a security access key. Usually, this is generated using the seed retrieved from [request_security_seed].

pub fn read_memory_address(
    &mut self,
    arbitration_id: u32,
    address: u32,
    length: u16
) -> Result<Vec<u8>, Error>
[src]

Requests memory at specified address. Usually, this requires an authentication procedure with [request_security_key].

Loading content...

Implementors

impl<I: IsoTp> Uds for I[src]

Loading content...