Skip to main content

TestWaitForFrPDU

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

  • long TestWaitForFrPDU (dbFrPDU aPDU, dword aTimeout);
  • long TestWaitForFrPDU (char aPDUName[], dword aTimeout);
  • long TestWaitForFrPDU (dword aTimeout);

Description

Waits for the occurrence of the specified FlexRay PDU. Should the PDU not occur before the expiration of the time aTimeout, the wait condition is resolved nevertheless. When no PDU is specified the wait condition is resolved on any FlexRay PDU. Note: Dependent on the used parameter type the appropriate bus context in a multibus environment has only to be set before the function is called if the corresponding database object will be ambiguous. Further information on site MultiBus Environment.

Parameters

  • aPDU: PDU to be awaited as it is defined in the database.
  • aPDUName: Name of a PDU to be awaited as it is defined in the database.
  • aTimeout: Maximum time that should be waited [ms] (Transmission of 0: no timeout controlling)

Return Values

  • -6: Parse error, PDU is specified as string, but the name cannot be resolved
  • -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 PDUs. It is assumed that the database defines the PDUs PDU_NMF_NODE_C and PDU_IN_CYCLE_REPETITION on the cluster FlexRay PDU.
TestGetWaitFrPDUDataTestJoinFrPDUEvent