Contenu principal

getAvailableProfile

Get list of applications with profiler data available on target computer

Description

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

example

apps = getAvailableProfile(target_object,app_name) returns the app_name application name if the execution profile data for the application is available on the target computer and the function returns an empty array if the execution profile 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 profiler 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 profiler before starting the application.

tg.startProfiler;
tg.start;

Stop the profiler and stop the application.

tg.stopProfiler;
tg.stop;

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

tg.getAvailableProfile("-all");

This example loads slrt_ex_osc application on the target computer and shows how to get the profiler 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 profiler before starting the application.

tg.startProfiler;
tg.start;

Stop the profiler and stop the application.

tg.stopProfiler;
tg.stop;

Get the execution profiler data information of the slrt_ex_osc application.

tg.getAvailableProfile("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 profiler data is available, the apps is an empty string. If profiler data is available for the selected real-time application, the returned string contains the application name. If profiler 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 R2020b