Reactive Systems logo
Reactis API V2020

API - Reactis for C: MATLAB Bindings - Reactis Harness Library (Variables)

rcRshHarnessGetVarCandidatesGet a list of available variables.
rcRshHarnessGetVarCandidateByFullNameFind a harness variable candidate by its full name.
rcRshHarnessAddVarAdd a variable to a test harness.
rcRshHarnessCheckVarCheck the suitability of a variable for use in a test harness.
rcRshVarGetFullNameGet the name of a test variable.
rcRshVarGetHarnessTypeGet the harness type of a test variable.
rcRshVarGetInternalTypeGet the internal type of a test variable.
rcRshVarGetKindGet the kind of a test variable.
rcRshVarGetNameGet the name of a test variable.
rcRshVarGetPropertiesGet the properties of a test variable.
rcRshVarHasPropertyTest a property of a variable.
rcRshVarSetHarnessTypeSet the harness type of a test variable.
rcRshVarSetInternalTypeSet the internal type of a test variable.
rcRshVarSetNameSet the name of a test variable.
rcRshVarDeleteDelete a variable.


rcRshHarnessGetVarCandidates

Get a list of available variables.

Syntax

rcRshHarnessGetVarCandidates(harnessId)

Description

rcRshHarnessGetVarCandidates(harnessId) returns a list of ids of variable candidates which could potentially be added to the harness whose id is harnessId.


rcRshHarnessGetVarCandidateByFullName

Find a harness variable candidate by its full name.

Syntax

varId = rcRshHarnessGetVarCandidateByFullName(harnessId,fullName)

Description

varId = rcRshHarnessGetVarCandidateByFullName(harnessId,fullName) finds the variable candidate whose full name matches fullName. Include entry function parameters of the harness identified by harnessId in the search. The id number of the variable is returned.

See Also

rcRshOpen,rcRshGetHarnesses,rcRshHarnessAddVar


rcRshHarnessAddVar

Add a variable to a test harness.

Syntax

newVarId = rcRshHarnessAddVar(harnessId,newVarKind,varId)

Description

newVarId = rcRshHarnessAddVar(harnessId,newVarKind,varId) creates a new variable that is identical to the variable identified by varId, except for the kind which is set to newVarKind. This new variable is added to the harness identified by harnessId. The id number of the new variable is returned. newVarKind is a string which should hold one of the following values: RcInputVar, RcOutputVar, RcConfigVar. newVarId is an integer-valued double.

See Also

rcRshGetHarnesses,rcRshHarnessGetVarCandidates,rcRshHarnessCheckVar, rcRshVarDelete


rcRshHarnessCheckVar

Check the suitability of a variable for use in a test harness.

Syntax

rcRshHarnessCheckVar(harnessId,kind,var)

Description

rcRshHarnessCheckVar(harnessId,kind,var) adds a new variable with the properties contained in the structure var to the harness with id harnessId. kind is a string which should hold one of the following values: RcInputVar, RcOutputVar, RcConfigVar.

See Also

rcRshHarnessGetVarCandidates,rcRshVarDelete


rcRshVarGetFullName

Get the name of a test variable.

Syntax

fullName = rcRshVarGetFullName(varId)

Description

fullName = rcRshVarGetFullName(varId) returns the full name of the test variable identified by varId.

See Also

rcRshHarnessGetVars


rcRshVarGetHarnessType

Get the harness type of a test variable.

Syntax

harnessType = rcRshVarGetHarnessType(varId)

Description

harnessType = rcRshVarGetHarnessType(varId) returns the harness type of the test variable identified by varId.

See Also

rcRshHarnessGetVars, rcRshVarSetHarnessType


rcRshVarGetInternalType

Get the internal type of a test variable.

Syntax

name = rcRshVarGetInternalType(varId)

Description

name = rcRshVarGetInternalType(varId) returns the internal type of the test variable identified by varId. The internal type is the type of the variable in the code under test. The internal type will match the type in the source code unless the test variable contains a fixed-point value. In the latter case, the internal type will be a fixed-point type, while the source code type will be an integer type.

Input values are converted from the external type to the internal type before being passed to the code under test, and output values received from the code under test are converted from the internal type to the external type.

See Also

rcRshHarnessGetVars, rcRshVarSetInternalType


rcRshVarGetKind

Get the kind of a test variable.

Syntax

kind = rcRshVarGetKind(varId)

Description

kind = rcRshVarGetKind(varId) returns the kind of the test variable identified by varId. The kind is one of the following: RcInputVar, RcOutputVar, or RcConfigVar. If the variable is a potential variable, the empty string is returned.

See Also

rcRshHarnessGetVars


rcRshVarGetName

Get the name of a test variable.

Syntax

name = rcRshVarGetName(varId)

Description

name = rcRshVarGetName(varId) returns the name of the test variable identified by varId.

See Also

rcRshHarnessGetVars, rcRshVarSetName


rcRshVarGetProperties

Get the properties of a test variable.

Syntax

props = rcRshVarGetProperties(varId)

Description

props = rcRshVarGetProperties(varId) is assigned a cell array of property names for the test variable whose id matches varId.

See Also

rcRshHarnessGetVars, rcRshVarHasProperty


rcRshVarHasProperty

Test a property of a variable.

Syntax

hasProperty = rcRshVarGetName(varId,property)

Description

hasProperty = rcRshVarGetName(varId,property) is assigned true if the property list for variable identified by varId contains property and false otherwise.

See Also

rcRshHarnessGetVars,rcRshVarGetProperties


rcRshVarSetHarnessType

Set the harness type of a test variable.

Syntax

name =  rcRshVarSetHarnessType(varId,type)

Description

name = rcRshVarSetHarnessType(varId,type) sets the harness type of the test variable identified by varId to match the string type.

See Also

rcRshHarnessGetVars, rcRshVarGetHarnessType


rcRshVarSetInternalType

Set the internal type of a test variable.

Syntax

rcRshVarSetInternalType(varId,type)

Description

rcRshVarSetInternalType(varId,type) set the internal type of the test variable identified by varId to match type. The internal type should only be changed when the C code contains an integer type which is used to hold fixpoint values.

See Also

rcRshHarnessGetVars, rcRshVarGetInternalType


rcRshVarSetName

Set the name of a test variable.

Syntax

name = rcRshVarSetName(varId,newName)

Description

name = rcRshVarSetName(varId,newName) set the name of the test variable identified by varId to newName.

See Also

rcRshHarnessGetVars, rcRshVarGetName


rcRshVarDelete

Delete a variable.

Syntax

 rcRshVarDelete(varId)

Description

rcRshVarDelete(varId) deletes the variable identified by varId. The variable must be a member of a test harness. Deleting a variable removes it from its test harness, and invalidates varId.

See Also

rcRshHarnessGetVars