Skip to main content
Open topic with navigation

TestGetWaitADASDetectedObject

CAPL Functions » ADAS » TestGetWaitADASDetectedObject

Function Syntax

long TestGetWaitADASDetectedObject (char[] detectedObjectName)

Description

If a Detected Object was the last event that triggered a wait Instruction, the name of the Detected Object can be called up with the TestGetWaitADASDetectedObject function.

Parameters

  • detectedObjectName: The name of the Detected Object that triggered the wait instruction.

Return Values

  • 0: Data access successful
  • -1: Data access could not be executed

Example

enum VWaitThreshold
{
  kUnderThreshold = 0,
  kOverThreshold = 1
};

distObjRef ::ADAS::IDetectedMovingObject detMovingObj;
char buffer[100];

if(TestWaitForADASDistance(kUnderThreshold,30, 1000))
{
  if(TestGetWaitADASDetectedObject(buffer) == 0) // Get the name of the Detected Object that triggered the Wait Condition
    detMovingObj = (distObjRef ADAS::IDetectedMovingObject) lookupDistObj(buffer); // Get the Detected Object with the CAPL Function lookupDistObj
  if(detMovingObj.IsValid) // Check if the Detected Object is valid
  {
    // Do something with the Detected Object
  }
}