Main Content

rtw.connectivity.Launcher

Control downloading, starting, and resetting of a target application

Description

The rtw.connectivity.Launcher class, which runs on your development computer, controls execution of an application on the target processor.

Creation

Description

example

rtw.connectivity.Launcher(componentArgs) controls the download, start, and reset of an application, for example, a PIL application.

Make a subclass and implement the startApplication and stopApplication methods.

You can implement a destructor method that cleans up resources (for example, a handle to a third-party download tool) when the object is cleared from memory.

Object Functions

FunctionDescription
getComponentArgs

componentArgs = obj.getComponentArgs returns the rtw.connectivity.ComponentArgs object associated with the launcher object.

setExesetExe(exe) specifies the application that runs on the target processor.
getExeexe=getExe() returns the application that is running on the target processor.
startApplication

obj.startApplication is an abstract method that you implement in a subclass. Called by MATLAB® or Simulink® to start execution of the target application.

MATLAB or Simulink calls the setExe method, which specifies the target application to run. To obtain this application, use the getExe method. For example:

exe = getExe()

The startApplication method resets the application to its initial state by ensuring that external and static (global) variables are zero-initialized.

stopApplication

obj.stopApplication is an abstract method that you must implement in a subclass.

Called by MATLAB to stop execution of the target application.

getApplicationStatus

obj.getApplicationStatus is an optional method that you can implement in a subclass.

Called by MATLAB or Simulink to detect the current status of the target application.

The expected return values are:

  • rtw.connectivity.LauncherApplicationStatus.UNKNOWN

  • rtw.connectivity.LauncherApplicationStatus.NOT_RUNNING

  • rtw.connectivity.LauncherApplicationStatus.RUNNING

If you do not implement the method, the default return value is rtw.connectivity.LauncherApplicationStatus.UNKNOWN.

getBuilderbuilder = obj.getBuilder returns the rtw.connectivity.Builder object associated with the launcher object.

Examples

Using rtw.connectivity.Launcher in PIL Connectivity

For an example that shows how to use this object in setting up PIL connectivity, see:

Introduced in R2008b