11. Embedded Coder#

11.1. rcEcRshHarnessImport#

Import a test harness from an .rsi file.

11.1.1. Syntax#

harnessId = rcEcRshHarnessImport(rshId,rsiFileName,harnessName,ecBaseName)

11.1.2. Description#

harnessId = rcEcRshHarnessImport(rshId,rsiFileName,harnessName,ecBaseName)

imports a test harness from the .rsi file whose name is given by rsiFileName into to the harness library with id rshId. The new harness will be named harnessName. ecBaseName is the (optional) prefix of the names generated by Embedded Coder. If omitted, ecBaseName will be derived from rsiFileName.

harnessId is an integer id number used to access the new test harness.

11.1.3. Examples#

rshId  = rcRshOpen('cruise_ec.rsm', 'cruise_ec.rsh');
harnId = rcEcRshHarnessImport(rshId, 'cruise.rsi', 'cruise_main1', 'cruise');

Imports a test harness from cruise_ec.rsi into the harness library cruise_ec.rsh. The imported harness will be named ‘cruise_main1’. The functions and variables will start with ‘cruise’. For example, the entry function will be cruise_step.

11.1.4. See Also#

rcRshOpen, rcRshHarnessImport