Skip to main content
Open topic with navigation CAPL Functions » FlexRay » frSetExtOffsetRateControl

frSetExtOffsetRateControl

Valid for: CANoe DE

Function Syntax

int frSetExtOffsetRateControl(int aChannel, int aRateCtrl, int anOffsetCtrl);

Description

Applies the external rate and offset correction values from the FlexRay parameters for the next cycle. For a description and explanation of the external clock correction procedure please refer to the FlexRay specification and/or to the user manual for the E-Ray communication controller. The function is used in the following sample configuration: 2 Cluster Gateway (FlexRay)FlexRay_2Cluster_Gateway.cfg
Demonstrates the simulation of two FlexRay networks that are interconnected by a FlexRay-FlexRay gateway.

Parameters

  • aChannel: FlexRay channel (cluster number)
  • aRateCtrl: Controls whether the rate correction value is to be added, subtracted or ignored:
    • 1: add value
    • -1: subtract value
    • 0: ignore value
    The value referenced is clusterCfg.pExternRateCorrection, which can be read/set by the functions frGetConfiguration and frSetConfiguration.
  • anOffsetCtrl: Controls whether the offset correction value is to be added, subtracted or ignored:
    • 1: add value
    • -1: subtract value
    • 0: ignore value
    The value referenced is clusterCfg.pExternOffsetCorrection, which can be read/set by functions FRGetConfiguration and FRSetConfiguration.

Return Values

  • 0: Success
  • Other: Error

Example

frGetConfigurationfrSetConfiguration