Skip to main content

frGetFrameErrorRate

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

Function Syntax

long frGetFrameErrorRate(long channel, ValueSelector selector, long channelMask);

Description

Gets the frame error rate of a FlexRay channel in frames per second [fr/s]. The kind of value to be returned (average, current, maximum or minimum) can be selected.

Parameters

  • channel
    FlexRay channel (1…32).
  • selector
    Value selector:
    • eCurrValue = current
    • eMinValue = minimum
    • eMaxValue = maximum
    • eAvgValue = average
  • channelMask
    Channel mask
    • 1 = subchannel A
    • 2 = subchannel B

Return Values

Frame error rate in frames per second, if FlexRay statistics is enabled; 0 otherwise.

Example

on start
{
  frEnableStatistics(1, 1); // Enable FlexRay statistics on channel 1
}

void myStatisticFunc()
{
  long value;

  value = frGetFrameErrorRate(1, eCurrValue, 1); // Channel 1, current, sub channel A
  // … do something with the value …
}