Skip to main content
Open topic with navigation CAPL Functions » LIN » linGetDiagNoRespCount

linGetDiagNoRespCount

Valid for: CANoe DE Note
LIN bus statistics is deactivated by default and must be activated before calling this function. You can do this by calling function linEnableStatistics in an on start handler, see example below.

Function Syntax

long linGetDiagNoRespCount(long channel);

Description

Gets the total count of unanswered Slave responses following a Master request of a LIN channel.

Parameters

  • channel: LIN channel (1…64).

Return Values

Total count of unanswered Slave responses, if LIN statistics is enabled; 0 otherwise.

Example

on start
{
  linEnableStatistics(1, 1); // Enable LIN statistics on channel 1
}

void myStatisticFunc()
{
  long count;

  count = linGetDiagNoRespCount(1); // Unanswered Slave responses on channel 1
  // … do something with the count, e.g.:
  if (count > 10)
  {
    // alert
  }
}