Skip to main content

TestWaitForFrStartCycle

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

  • long TestWaitForFrStartCycle (dword aCycle, dword aTimeout);
  • long TestWaitForFrStartCycle (dword aBaseCycle, dword aCycleRepetition, dword aTimeout);
  • long TestWaitForFrStartCycle (dword aTimeout);

Description

Waits for the occurrence of the specified FlexRay start cycle event. Should the event not occur before the expiration of the time aTimeout, the wait condition is resolved nevertheless. When no numeric cycle is specified the wait condition is resolved on any FlexRay Start Cycle event. Note: Consider to set always the appropriate bus context in a multibus environment before the function is called. Further information on site MultiBus Environment.

Parameters

  • aCycle: Numeric cycle identifier. 0…63
  • aBaseCycle: Numeric base cycle. This value must be less than the repetition factor. Together with the repetition factor this value determines the “Cycle Multiplexing”. Value range: 0…63
  • aCycleRepetition: Cycle repetition factor. Together with the base cycle this value determines the “Cycle Multiplexing”. Value has to be a power of 2 (1, 2, 4, 8, 16, 32 or 64).
  • aTimeout: Maximum time that should be waited [ms] (Transmission of 0: no timeout controlling)

Return Values

  • -2: Resume due to constraint violation
  • -1: General error, for example, functionality is not available
  • 0: Resume due to timeout
  • 1: Resume due to event occurred

Example

The following test program waits for the occurrence of one of two different start of cycles. It is assumed that the test is executed at the cluster FlexRay A.
TestGetWaitFrStartCycleDataTestJoinFrStartCycleEvent