Skip to content

ReadDTCInformation Response - handle fallthrough and errors gracefully #23

@zheylmun

Description

@zheylmun

Slight correction - it doesn't "Mask" it, it is meant to fall through if the first byte of the DTCRecord is 'missing' for DTCFaultDetectionCounterRecord because of how the UDS spec saves space, if there is nothing in the buffer, there are no faults, and it is not an error. However, if DTCRecord errors on the 2nd or 3rd bytes after a successful first byte read, it IS an error and needs to be handled.

In the future, we might should have 2 functions for DTCRecord:

  1. First function allows the first byte to be "missing" and return Ok (which it does now)
  2. 2nd function disallows the first byte to be missing in cases where it does expect a record.
image

Originally posted by @kymikoloco in #21 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions