主要内容

getAvailableTrace

Get list of application with tracing information available on target computer

Since R2026a

Description

apps = getAvailableTrace(target_object,'-all') returns the list of application names for which the tracing data is available on the Speedgoat® target computer.

example

apps = getAvailableTrace(target_object,app_name) returns the app_name application name if the tracing data for the application is available on the target computer and the function returns an empty array if the tracing data for the specified application is not available on the target computer.

example

Examples

collapse all

This example loads slrt_ex_osc application on the target computer and shows how to get the tracing data information for all applications.

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

tg = slrealtime;
mdlSTF = getSTFName(tg);
mdlName = 'slrt_ex_osc';
openExample(mdlName);
set_param(mdlName,"SystemTargetFile",mdlSTF);
slbuild(mdlName);
load(tg,mdlName);

Start the tracer before starting the application.

tg.startTracer;
tg.start;

Stop the tracer and stop the application.

tg.stopTracer;
tg.stop;

Get the list of applications for which the tracing data is available on target computer.

tg.getAvailableTrace("-all");

This example loads slrt_ex_osc application on the target computer and shows how to get the tracing data information for a specific application.

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

tg = slrealtime;
mdlSTF = getSTFName(tg);
mdlName = 'slrt_ex_osc';
openExample(mdlName);
set_param(mdlName,"SystemTargetFile",mdlSTF);
slbuild(mdlName);
load(tg,mdlName);

Start the tracer before starting the application.

tg.startTracer;
tg.start;

Stop the tracer and stop the application.

tg.stopTracer;
tg.stop;

Get the tracer data information of the slrt_ex_osc application.

tg.getAvailableTrace("slrt_ex_osc");

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

Real-time application MLDATX file name that you build from the model, specified as a character vector or string scalar.

Example: "slrt_ex_osc"

Output Arguments

collapse all

If no tracing data is available, the apps is an empty string. If tracing data is available for the selected real-time application, the returned string contains the application name. If tracing data is available for multiple applications and you use the '-all' option, the return value is an area of strings with each string containing an application name.

Version History

Introduced in R2026a