Contenuto principale

getProfilerStatus

Get profiler status on target computer

Since R2026a

Description

profiler_status = getProfilerStatus(target_object) returns the profiler status on the Speedgoat® target computer.

The profiler status can have one of these values.

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

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

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

  • DATA_AVAILABLE — target_object exists and profiling data is available.

example

Examples

collapse all

Load the slrt_ex_osc application on the target computer and get the profiler 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 profiler status.

profiler_status = getProfilerStatus(tg)
profiler_status = 
  ProfilerState enumeration

    READY

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

startProfiler(tg);
start(tg);
profiler_status = getProfilerStatus(tg)
profiler_status = 
  ProfilerState enumeration

    RUNNING

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

stopProfiler(tg);
stop(tg);
profiler_status = getProfilerStatus(tg)
profiler_status = 
  ProfilerState 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

Profiler status, returned as a member of the slrealtime.ProfilerState enumeration.

Version History

Introduced in R2026a