Skip to main content

GetDetectedObjectByTrackingId

Valid for: CANoe DE Note: This CAPL function is also available in C#.

Function Syntax

C#
string GetDetectedObjectByTrackingId.Call(int trackingId);
CAPL
char[] GetDetectedObjectByTrackingId.Call(int trackingId);

Description

This function gets the name of a detected object of a sensor based on the tracking Id as a string. If no object with the given tracking Id is present, an empty string is returned.

Parameters

  • trackingId: Id of the object

Return Values

A string containing the name of the detected object. If no object with the given tracking Id is present, an empty string is returned.

Example

In the examples it is assumed in each case that a DO object of the type IScenarioManager was created.

CAPL

char detObjName [100];
memcpy(detObjName, radar.GetDetectedObjectByTrackingId.Call(5), elCount(radar.GetDetectedObjectByTrackingId.Call(5)));

C#

string detObjName = radar.GetDetectedObjectByTrackingId.Call(5);