J1939GetNumOfDTCs
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Description
Function looks through a J1939 diagnostic message and returns the number of DTC blocks that match the search criteria, i.e. that contains defined SPN/FMI/OC values.Parameters
- pgWithDTC: Message to be checked for a specific DTC block. Must be a J1939 Parameter Group.
- spn: Suspect Parameter Number of the specified DTC.
0xFFFFFFFFifspnis to be ignored. - fmi: Failure Mode Identifier of the specified DTC.
0xFFFFiffmiis to be ignored. - oc: Occurrence Counter of the specified DTC.
0xFFFFifocis to be ignored.
Return Values
- ≥ 0: Byte number of the start position of the found DTC block (zero-based).
- -1: Message does not contain a DTC block matching the search criteria.