Main Content

rtw.connectivity.ComponentArgs

Provide parameters for each target connectivity component

Description

An rtw.connectivity.ComponentArgs object provides functions for getting information about the source component and the target application.

Creation

Description

example

compArgs = rtw.connectivity.ComponentArgs (componentPath, componentCodePath, componentCodeName, applicationCodePath) returns a handle to an rtw.connectivity.ComponentArgs object.

Object Functions

FunctionDescription
getComponentPath

cmpPath = compArgs.getComponentPath returns the system path of the source component. For example:

  • For MATLAB®, the path of the function that is under test.

  • For Simulink®, the path of the referenced model that is under test.

getComponentCodePath

cmpCodePath = compArgs.getComponentCodePath returns the code generation folder path associated with the source component. For example:

  • For MATLAB, the code generation folder of the MATLAB function that is under test.

  • For Simulink, the code generation folder of the referenced model that is under test.

getComponentCodeName

cmpCodeName = compArgs.getComponentCodeName returns the component name used for code generation.

getApplicationCodePath

appCodePath = compArgs.getApplicationCodePath returns the folder path associated with the target application, for example, the path associated with the PIL application.

getParam

settingOrParameterValue = compArgs.getParam(settingOrParameterName) returns:

  • For MATLAB, the value of the specific MATLAB Coder™ setting for the generated code.

  • For Simulink, the value of the specific model configuration parameter for the generated code. The function does not load the model.

Examples

Using rtw.connectivity.ComponentArgs in PIL Connectivity

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

Introduced in R2008b