Skip to Main Content Skip to Search
Product Documentation

rtw.connectivity.Launcher - Control downloading, starting and resetting executable on target hardware

Syntax

rtw.connectivity.Launcher(componentArgs, builder)

Description

ConstructorDescription
LauncherLaunches an application built by a Builder object

Constructor syntax:

rtw.connectivity.Launcher(componentArgs, builder)

Launcher controls the download, start and reset of the application (e.g. PIL application) associated with a rtw.connectivity.Builder object. You must make a subclass and implement the startApplication and stopApplication methods.

You can implement a destructor method that cleans up any resources (e.g., a handle to a 3rd party download tool) when this object is cleared from memory. There is significant flexibility in how the startApplication and stopApplication methods can be implemented.

See MyPIL.Launcher for an example.

For methods, see the following table.

MethodSyntax and Description
getBuilderbuilder = obj.getBuilder
Returns the rtw.connectivity.Builder object associated with this Launcher object.
startApplicationobj.startApplication
Abstract method that you must implemented in a subclass. Called by Simulink to start execution of the target application, created by the rtw.connectivity.Builder object associated with this Launcher object.
The startApplication method must always reset the application to its initial state by ensuring that external and static (global) variables are zero initialized.
Use the getApplicationExecutable method of the associated rtw.connectivity.Builder object to determine the application to start, e.g.,
exe = this.getBuilder.get...
ApplicationExecutable
stopApplicationobj.stopApplication
Abstract method that you must implemented in a subclass. Called by Simulink to stop execution of the target application, created by the rtw.connectivity.Builder object associated with this Launcher object.
Use the getApplicationExecutable method of the associated rtw.connectivity.Builder object to determine the application to stop, e.g.,
exe = this.getBuilder.get...
ApplicationExecutable
getComponentArgscomponentArgs = obj.getComponentArgs
Returns the rtw.connectivity.ComponentArgs object associated with this Launcher object.

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS