Reactive Systems logo
September 19, 2020
Reactis API
 
Spacer

API - Reactis: MATLAB Bindings - Reactis Info File (Configuration Variables)


rsRsiGetConfigVarsReturn configuration variables in the .rsi file.
rsRsiGetConfigVarTypeReturn the type of a configuration variable.
rsRsiSetConfigVarTypeSet the type of a configuration variable.
rsRsiAddConfigVarAdd a configuration variable to the .rsi file.
rsRsiRemoveConfigVarRemove configuration variable from .rsi file.
rsRsiGetPotentialConfigVarsGet potential configuration variables.
rsRsiGetConfigVarSetsReturn names of configuration variable sets in the .rsi file.
rsRsiAddConfigVarSetAdd a new configuration variable set to the .rsi file.
rsRsiRemoveConfigVarSetRemove a configuration variable set from .rsi file.
rsRsiGetConfigVarSetEnabledGet enabled/disabled status of a configuration variable set.
rsRsiSetConfigVarSetEnabledSet enabled/disabled status of a configuration variable set.
rsRsiGetActiveConfigVarSetReturn name of currently active configuration variable set.
rsRsiSetActiveConfigVarSetSets the active configuration variable set.


rsRsiGetConfigVars

Return configuration variables in the .rsi file.

Syntax

names = rsRsiGetConfigVars(rsiId)

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.

Examples

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

See Also

rsRsiOpen


rsRsiGetConfigVarType

Return the type of a configuration variable.

Syntax

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

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.

Examples

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

See Also

rsRsiOpen, rsRsiGetConfigVars, rsRsiSetConfigVarType, rsRsiSetActiveConfigVarSet


rsRsiSetConfigVarType

Set the type of a configuration variable.

Syntax

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

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.

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.

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

See Also

rsRsiOpen, rsRsiGetConfigVars, rsRsiGetConfigVarType


rsRsiAddConfigVar

Add a configuration variable to the .rsi file.

Syntax

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

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.

See Also

rsRsiOpen, rsRsiRemoveConfigVar, rsRsiGetPotentialConfigVars


rsRsiRemoveConfigVar

Remove configuration variable from .rsi file.

Syntax

rsRsiRemoveConfigVar(rsiId, varName)

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.

See Also

rsRsiOpen, rsRsiAddConfigVar


rsRsiGetPotentialConfigVars

Get potential configuration variables.

Syntax

rsRsiGetPotentialConfigVars(rsiId)

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.

See Also

rsRsiOpen, rsRsiAddConfigVar


rsRsiGetConfigVarSets

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

Syntax

names = rsRsiGetConfigVarSets(rsiId)

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.

See Also

rsRsiOpen


rsRsiAddConfigVarSet

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

Syntax

rsRsiAddConfigVarSet(rsiId, configVarSetName)

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.

See Also

rsRsiOpen, rsRsiRemoveConfigVarSet, rsRsiSetActiveConfigVarSet


rsRsiRemoveConfigVarSet

Remove a configuration variable set from .rsi file.

Syntax

rsRsiRemoveConfigVarSet(rsiId, configVarSetName)

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.

See Also

rsRsiOpen, rsRsiAddConfigVarSet


rsRsiGetConfigVarSetEnabled

Get enabled/disabled status of a configuration variable set.

Syntax

enab = rsRsiGetConfigVarSetEnabled(rsiId, configVarSetName)

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.

Examples

rsRsiGetConfigVarSetEnabled(rsi,'ConfigVarSet1')
ans =
     1

See Also

rsRsiOpen, rsRsiSetConfigVarSetEnabled


rsRsiSetConfigVarSetEnabled

Set enabled/disabled status of a configuration variable set.

Syntax

rsRsiSetConfigVarSetEnabled(rsiId, configVarSetName, enab)

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.

See Also

rsRsiOpen, rsRsiGetConfigVarSetEnabled


rsRsiGetActiveConfigVarSet

Return name of currently active configuration variable set.

Syntax

activeConfigVarSetName = rsRsiGetActiveConfigVarSet(rsiId)

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.

See Also

rsRsiOpen, rsRsiSetActiveConfigVarSet


rsRsiSetActiveConfigVarSet

Sets the active configuration variable set.

Syntax

rsRsiSetActiveConfigVarSet(rsiId, activeConfigVarSetName)

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.

See Also

rsRsiOpen, rsRsiGetActiveConfigVarSet



Spacer