Skip to main content

diagGetTargetQualifier

Valid for: CANoe DE

Function Syntax

long diagGetTargetQualifier( DWORD index, char bufferOut[], DWORD bufferSize);

Description

Writes the target qualifier for the diagnostic target at given index into the buffer. If successful, the qualifier can be used in DiagSetTarget.

Parameters

  • index: Value in 0 ≤ index ≤ n, where n is the number of possible targets returned by DiagGetTargetCount.
  • bufferOut: Character array for the result.
  • bufferSize: Maximum number of characters available in the buffer.

Return Values

Error code or number of characters copied into the buffer. Note that an error is returned if the buffer is too small for the qualifier.

Example

long i;
char ecuQual[100];
i = diagGetTargetCount();
while( i-- > 0)
{
   diagGetTargetQualifier( i, ecuQual, elcount(ecuQual));
   write( "Target %d: %s", i, ecuQual);
}