9. Reactis Info File - Configuration Variables#

9.1. rsRsiGetConfigVars#

Return configuration variables in the .rsi file.

9.1.1. Syntax#

names = rsRsiGetConfigVars(rsiId)

9.1.2. Description#

names = rsRsiGetConfigVars(rsiId)

returns a cell array containing a list of configuration variable names specified in the .rsi file.

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

9.1.3. Examples#

>> names = rsRsiGetConfigVars(rsi)
names = 
    'InitialSpeed'

9.1.4. See Also#

rsRsiOpen

9.2. rsRsiGetConfigVarType#

Return the type of a configuration variable.

9.2.1. Syntax#

rsRsiGetConfigVarType(rsiId, varName)
rsRsiGetConfigVarType(rsiId, varName, configSetName)

9.2.2. Description#

rsRsiGetConfigVarType(rsiId, varName)

returns the type of configuration variable named varName in the currently active configuration variable set.

rsRsiGetConfigVarType(rsiId, varName, configSetName)

returns the type of configuration variable named varName in configuration variable set configSetName.

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

9.2.3. Examples#

>> cvt = rsRsiGetConfigVarType(rsiId,'InitialSpeed')
cvt =
  double{10.0, 30.0, 40.0}

9.2.4. See Also#

rsRsiOpen, rsRsiGetConfigVars, rsRsiSetConfigVarType, rsRsiSetActiveConfigVarSet

9.3. rsRsiSetConfigVarType#

Set the type of a configuration variable.

9.3.1. Syntax#

rsRsiSetConfigVarType(rsiId, varName, varType)
rsRsiSetConfigVarType(rsiId, varName, varType, configSetName)

9.3.2. Description#

rsRsiSetConfigVarType(rsiId, varName, varType)

sets the type of configuration variable varName to varType in the currently active configuration variable set.

rsRsiSetConfigVarType(rsiId, varName, varType, configSetName)

sets the type of configuration variable varName to varType in the configuration variable set configSetName.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen. rsRsiSave must be called to save modifications to .rsi file in order for them to be used by subsequent calls to rsSimOpen or rsTester. Updates to .rsi file are not propagated to any running Simulator or Tester sessions.

varName must be a configuration variable in the .rsi file.

varType must have the same base type (e.g. double, int32, etc…) as workspace variable varName. See Section Type Constraint Syntax of the Reactis User’s Guide for a description of the syntax of Reactis type constraints.

Raises an error if varType is not valid for the variable.

9.3.3. See Also#

rsRsiOpen, rsRsiSave, rsRsiGetConfigVars, rsRsiGetConfigVarType

9.4. rsRsiAddConfigVar#

Add a configuration variable to the .rsi file.

9.4.1. Syntax#

rsRsiAddConfigVar(rsiId, varName)
rsRsiAddConfigVar(rsiId, varName, varType)

9.4.2. Description#

rsRsiAddConfigVar(rsiId, varName)

adds configuration variable varName to the .rsi file. Its type will consist of a base type equal to the type of the corresponding workspace variable and a constraint that limits it to a set of values containing only the value the workspace variable has after model initialization. The new configuration variable will be added to all existing configuration sets.

rsRsiAddConfigVar(rsiId, varName, varType)

adds configuration variable varName to the .rsi file and sets its type to varType.

varName must be a workspace variable in the associated model’s base workspace. To query a list of valid names use rsRsiGetPotentialConfigVars.

varType must have the same base type (e.g. double, int32, etc…) as workspace variable varName. See Section Type Constraint Syntax of the Reactis User’s Guide for a description of the syntax of Reactis type constraints.

Raises an error if varType is not valid for the variable.

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

9.4.3. See Also#

rsRsiOpen, rsRsiRemoveConfigVar, rsRsiGetPotentialConfigVars

9.5. rsRsiRemoveConfigVar#

Remove configuration variable from .rsi file.

9.5.1. Syntax#

rsRsiRemoveConfigVar(rsiId, varName)

9.5.2. Description#

rsRsiRemoveConfigVar(rsiId, varName)

removes configuration variable varName from all configuration sets in the .rsi file. An error is raised if varName is not present in the .rsi file.

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

9.5.3. See Also#

rsRsiOpen, rsRsiAddConfigVar

9.6. rsRsiGetPotentialConfigVars#

Get potential configuration variables.

9.6.1. Syntax#

rsRsiGetPotentialConfigVars(rsiId)

9.6.2. Description#

rsRsiGetPotentialConfigVars(rsiId)

inspects the MATLAB base workspace after initializing the model associated with the .rsi file and returns a cell array containing a list of workspace variable names that can be used in rsRsiAddConfigVar.

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

9.6.3. See Also#

rsRsiOpen, rsRsiAddConfigVar

9.7. rsRsiGetConfigVarSets#

Return names of configuration variable sets in the .rsi file.

9.7.1. Syntax#

names = rsRsiGetConfigVarSets(rsiId)

9.7.2. Description#

names = rsRsiGetConfigVarSets(rsiId)

returns a cell array containing a list of configuration variable set names specified in the .rsi file.

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

9.7.3. See Also#

rsRsiOpen

9.8. rsRsiAddConfigVarSet#

Add a new configuration variable set to the .rsi file.

9.8.1. Syntax#

rsRsiAddConfigVarSet(rsiId, configVarSetName)

9.8.2. Description#

rsRsiAddConfigVarSet(rsiId, configVarSetName)

adds configuration variable set configVarSetName to the .rsi file.

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

9.8.3. See Also#

rsRsiOpen, rsRsiRemoveConfigVarSet, rsRsiSetActiveConfigVarSet

9.9. rsRsiRemoveConfigVarSet#

Remove a configuration variable set from .rsi file.

9.9.1. Syntax#

rsRsiRemoveConfigVarSet(rsiId, configVarSetName)

9.9.2. Description#

rsRsiRemoveConfigVarSet(rsiId, configVarSetName)

removes configuration variable set configVarSetNamefrom the .rsi file. An error is raised if configVarSetName is not present in the .rsi file.

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

9.9.3. See Also#

rsRsiOpen, rsRsiAddConfigVarSet

9.10. rsRsiGetConfigVarSetEnabled#

Get enabled/disabled status of a configuration variable set.

9.10.1. Syntax#

enab = rsRsiGetConfigVarSetEnabled(rsiId, configVarSetName)

9.10.2. Description#

enab = rsRsiGetConfigVarSetEnabled(rsiId, configVarSetName)

returns 1 if configuration variable set configVarSetName is enabled, otherwise it returns 0.

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

9.10.3. Examples#

rsRsiGetConfigVarSetEnabled(rsi,'ConfigVarSet1')
ans =
     1

9.10.4. See Also#

rsRsiOpen, rsRsiSetConfigVarSetEnabled

9.11. rsRsiSetConfigVarSetEnabled#

Set enabled/disabled status of a configuration variable set.

9.11.1. Syntax#

rsRsiSetConfigVarSetEnabled(rsiId, configVarSetName, enab)

9.11.2. Description#

rsRsiSetConfigVarSetEnabled(rsiId, configVarSetName, enab)

If enab is 1, then this function enables configuration variable set configVarSetName, otherwise it disables it.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen. rsRsiSave must be called to save modifications to .rsi file in order for them to be used by subsequent calls to rsSimOpen or rsTester. Updates to .rsi file are not propagated to any running Simulator or Tester sessions.

9.11.3. See Also#

rsRsiOpen, rsRsiSave, rsRsiGetConfigVarSetEnabled

9.12. rsRsiGetActiveConfigVarSet#

Return name of currently active configuration variable set.

9.12.1. Syntax#

activeConfigVarSetName = rsRsiGetActiveConfigVarSet(rsiId)

9.12.2. Description#

activeConfigVarSetName = rsRsiGetActiveConfigVarSet(rsiId)

returns the name of the currently active configuration variable set.

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

9.12.3. See Also#

rsRsiOpen, rsRsiSetActiveConfigVarSet

9.13. rsRsiSetActiveConfigVarSet#

Sets the active configuration variable set.

9.13.1. Syntax#

rsRsiSetActiveConfigVarSet(rsiId, activeConfigVarSetName)

9.13.2. Description#

rsRsiSetActiveConfigVarSet(rsiId, activeConfigVarSetName)

changes the currently active configuration variable set to activeConfigVarSetName.

rsiId is the identifier of an .rsi file previously opened by rsRsiOpen. rsRsiSave must be called to save modifications to .rsi file in order for them to be used by subsequent calls to rsSimOpen or rsTester. Updates to .rsi file are not propagated to any running Simulator or Tester sessions.

9.13.3. See Also#

rsRsiOpen, rsRsiSave, rsRsiGetActiveConfigVarSet