Contenuto principale

getTracerStatus

Get tracer status on target computer

Since R2026a

Description

tracer_status = getTracerStatus(target_object) returns the tracer status on the Speedgoat® target computer.

The tracer status can have one of these values:

  • READY — target_object exists, no tracer data is available, and the startTracer function has not been called.

  • START_REQUESTED — target_object exists, no tracer data is available, the startTracer function has started the tracer, and the real-time application is not loaded.

  • RUNNING — target_object exists, tracer data is being collected, the startTracer function has started the tracer, and the real-time application is loaded and running.

  • DATA_AVAILABLE — target_object exists and tracer data is available.

example

Examples

collapse all

Load the slrt_ex_osc application on the target computer and get the tracer status.

Open, build, and download the real-time application.

tg = slrealtime;
modelSTF = getSTFName(tg);
modelName = "slrt_ex_osc";
openExample(modelName);
set_param(modelName,"SystemTargetFile",modelSTF);
slbuild(modelName);
load(tg,modelName);

Get the tracer status.

tracer_status = getTracerStatus(tg)
tracer_status = 
  TracerState enumeration

    READY

Start the tracer before starting the application and check the tracer status.

startTracer(tg);
start(tg);
tracer_status = getTracerStatus(tg)
tracer_status = 
  TracerState enumeration

    RUNNING

Stop the tracer and stop the application. Get the tracer status.

stopTracer(tg);
stop(tg);
tracer_status = getTracerStatus(tg)
tracer_status = 

  TracerState enumeration

    DATA_AVAILABLE

Input Arguments

collapse all

Object that represents target computer, specified as a Target object. The object provides access to methods that manipulate the target computer properties.

Example: tg

Output Arguments

collapse all

Tracer status, returned as a member of the slrealtime.TracerState enumeration.

Version History

Introduced in R2026a