6. Reactis Info File - Overview#

Reactis for Simulink stores information it uses for testing and validation in an .rsi file, rather than making any modification to the model (the .slx file). Such information, for example constraints on inputs, can be manipulated in the Reactis GUI using the Reactis Info File Editor.

The settings stored in an .rsi file are termed model-specific settings since they can be configured differently for each model you work with in Reactis. The Reactis Info File Editor includes a collection of panes (Harness, Inports, Configuration Variables, …) from which different types of model-specific settings can be manipulated.

This chapter describes several general API functions used to manipulate model-specific settings in an .rsi file. The following chapters each focus on the parameters contained within a particular pane in the Reactis Info File Editor. There are two types of API function for use with model-specific settings:

Generic functions

that work by specifying a parameter name and value. These include the rsRsiSetParameterValue and rsRsiGetParameterValue described below.

Specialized functions

that offer a more convenient way to read/set a specific parameter. For example rsRsiSetInputType lets you set an input constraint for a top-level input.

6.1. rsRsiOpen#

Open an existing or create a new .rsi file.

6.1.1. Syntax#

rsiId = rsRsiOpen(rsiFilename,modelFilename)

6.1.2. Description#

rsiId = rsRsiOpen(rsiFilename,modelFilename)

If file rsiFilename exists, rsRsiOpen opens the existing file. modelFilename must refer to the model associated with the .rsi file.

If file rsiFilename does not exist, this function creates the file on disk, populates the list of input and output ports to match modelFilename, and initializes all other settings to their default values.

The return value rsiId is a number (integer-valued double) that identifies the .rsi file when calling other API functions.

6.1.3. Examples#

rsiId = rsRsiOpen('cruise.rsi','cruise.slx');

6.1.4. See Also#

rsRsiClose, rsRsiSave

6.2. rsRsiClose#

Close an .rsi file.

6.2.1. Syntax#

rsRsiClose(rsiId)

6.2.2. Description#

rsRsiClose(rsiId)

closes the .rsi file. Any changes since the last call to rsRsiSave will be discarded. rsiId is the identifier of an .rsi file previously opened by rsRsiOpen.

6.2.3. See Also#

rsRsiOpen, rsRsiSave

6.3. rsRsiSave#

Save changes to an .rsi file.

6.3.1. Syntax#

rsRsiSave(rsiId)
rsRsiSave(rsiId, rsiFilename)

6.3.2. Description#

rsRsiSave(rsiId)

writes any changes made to the .rsi file to disk, using the same filename used in the rsRsiOpen call that opened the file.

rsRsiSave(rsiId, rsiFilename)

writes any changes made to the .rsi file to disk, into the file named rsiFilename.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen.

6.3.3. See Also#

rsRsiOpen, rsRsiClose

6.4. rsRsiGetModelName#

Get the name of the model to which the .rsi file is assigned

6.4.1. Syntax#

name = rsRsiGetModelName(rsiId)

6.4.2. Description#

name = rsRsiGetModelName(rsiId)

returns the name of the model to which the .rsi file is assigned.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen.

6.4.3. Examples#

>> rsiId = rsRsiOpen('cruise.rsi','cruise.slx');
>> name = rsRsiGetModelName(rsiId)
name =
  cruise

6.4.4. See Also#

rsRsiOpen

6.5. rsRsiGetParameterValue#

Get the value of a model-specific setting.

6.5.1. Syntax#

value = rsRsiGetParameterValue(rsiId,paramName)

6.5.2. Description#

value = rsRsiGetParameterValue(rsiId,paramName)

returns the value of model-specific setting paramName. Parameters of any data type may be queried by rsRsiGetParameterValue. The return value is always a string. Valid parameters names and their allowed values are listed in the Model-Specific and Harness-Library-Specific Parameters section of the Reactis API documentation.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen.

6.5.3. Examples#

>> rsiId = rsRsiOpen('cruise.rsi','cruise.slx');
>> v = rsRsiGetParameterValue(rsiId,'OnIntegerOverflow')
v = 
  'error'

6.5.4. See Also#

rsRsiOpen, rsRsiSetParameterValue

6.6. rsRsiSetParameterValue#

Set the value of a model-specific setting.

6.6.1. Syntax#

rsRsiSetParameterValue(rsiId, paramName, paramValue)

6.6.2. Description#

rsRsiSetParameterValue(rsiId, paramName, paramValue)

sets the model-specific setting paramName to paramValue. Parameters of any data type may be set by rsRsiSetParameterValue but the paramValue argument must be given as a string.

Valid parameters names and their possible values are listed in the Model-Specific and Harness-Library-Specific Parameters section of the Reactis API documentation.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen. rsRsiSave must be called to save modifications to an .rsi file in order for them to be used by subsequent use of the .rsi file in Reactis (either the API or the GUI). Updates to the .rsi file are not propagated to any running Simulator or Tester sessions.

6.6.3. Examples#

rsRsiSetParameterValue(rsiId,'OnIntegerOverflow','warning');

6.6.4. See Also#

rsRsiOpen, rsRsiSave, rsRsiGetParameterValue