Main Content

sltest.xil.framework.FrameworkConfiguration Class

Namespace: sltest.xil.framework

Configure test bench ports and variable mapping

Since R2022a

Description

Use the sltest.xil.framework.FrameworkConfiguration methods to add ports and map host variables to variables on the test bench. These methods do not become active until you call the init method of sltest.xil.framework.Framework.

The sltest.xil.framework.FrameworkConfiguration class is a handle class.

Creation

You cannot create an sltest.xil.framework.FrameworkConfiguration object. A Configuration object exists only as a member of an sltest.xil.framework.Framework object. Create a Framework object, then use the FrameworkConfiguration methods from within that Framework object.

Methods

expand all

Examples

collapse all

This example shows how to:

  • Create a framework object

  • Add a model access port for the ABC Co. test bench

  • Map the RPM test variable to the simpleXIL/Gain:1 variable on the test bench and specify the logging rate (Task) for RPM as SubRate1

  • Initialize the test bench

  • Create a variable object to use in the test, using the RPM mapping

import sltest.xil.framework.*
frm = Framework;

frm.Configuration.addModelAccessPort(...
    'MAPort1','asamxil.v2_1',...
    VendorName='ABC Co.',...
    ProductName='ABC Test Bench',...
    ProductVersion='1.7',...
    PortConfigFile=fullfile(pwd,'myConfigFile.xml'));

frm.Configuration.addTestVariableMapping(...
    'RPM','MAPort1','simpleXIL/Gain:1'...
    'TaskName','SubRate1');

frm.init;

rpm = frm.createVariable('RPM');

Version History

Introduced in R2022a