Skip to main contentTestGetWaitJ1939PGData
Valid for: CANoe DE • CANoe4SW DE
Function Syntax
long TestGetWaitJ1939PGData (pg * aPG); // form 1
long TestGetWaitJ1939PGData (dword index, pg * aPG); // form 2
Description
You can use this function to get the message content of J1939 Parameter Group that triggers a wait instruction.
Form 1 should be used if a wait operation for only one event is used (functions TestWaitForJ1939PG or TestWaitForJ1939DTC)
Form 2 can only be used for joined events. The number of the joined event (return value of TestJoinJ1939PGEvent or TestJoinJ1939DTCEvent) is here being used as an index.
Parameters
- aPG: J1939 parameter group variable that should be filled with this function.
- index: Number of the joined event corresponds with the return value of testJoin….
Return Values
- 0: Data access successful.
- -1: Data access could not be executed, the last event was not a parameter group event.
- -3: The DLC is larger than the number of copied bytes in the parameter aPG. When initializing aPG, increase its DLC.
Example
See examples of:
TestWaitForJ1939PG • TestJoinJ1939PGEvent • TestWaitForJ1939DTC • TestJoinJ1939DTCEvent