Configure target-side communications
Specify target-specific libraries and source files that are required to build
the executable file. The libraries and source files must include the device drivers that
implement the target-side of the rtiostream
communications
channel.
appFrameObj = rtw.pil.RtIOStreamApplicationFramework(componentArgs)
returns an object that provides access to an RTW.BuildInfo
object containing PIL-specific files (including a PIL main
function). rtw.connectivity.MakefileBuilder
combines these
files with the PIL component libraries to create the PIL application.
Make a subclass of rtw.pil.RtIOStreamApplicationFramework
.
In addition:
Use the addPILMain
method to specify a
main
function, which is required to build the
PIL application.
To the RTW.BuildInfo
object, add data that is
required for the implementation of the rtiostream
target communications interface by using provided functions:
Source file names - addSourceFiles
Source file paths - addSourcePaths
Include file names - addIncludeFiles
Include file paths - addIncludePaths
Libraries - addLinkObjects
Preprocessor macro definitions - addDefines
Compiler options - addCompileFlags
Linker options - addLinkFlags
Function | Description |
---|---|
getComponentArgs | componentArgs = appFrameObj.getComponentArgs
returns the rtw.connectivity.ComponentArgs object
associated with appFrameObj . |
getBuildInfo | buildInfo = appFrameObj.getBuildInfo returns the
RTW.BuildInfo object associated with
appFrameObj . |
addPILMain |
To build the PIL application, a To specify a appFrameObj.addPILMain('target'); To specify a appFrameObj.addPILMain('host'); Alternatively, you can specify your own componentArgs = appFrameObj.getComponentArgs; buildInfo = appFrameObj.getBuildInfo; buildInfo.addSourcePaths(pathToMyMainC); buildInfo.addSourceFiles(myMainC); |
rtw.pil.RtIOStreamApplicationFramework
in PIL ConnectivityFor an example that shows how to use this object in setting up PIL connectivity, see:
For MATLAB®, Processor-in-the-Loop Execution From Command Line
For Simulink®, Configure Processor-In-The-Loop (PIL) for a Custom Target