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:
- First function allows the first byte to be "missing" and return
Ok (which it does now)
- 2nd function disallows the first byte to be missing in cases where it does expect a record.
Originally posted by @kymikoloco in #21 (comment)
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:
Ok(which it does now)Originally posted by @kymikoloco in #21 (comment)