9. Reactis Harness Library - Variables#

9.1. rcRshGetCurrentHarness#

9.1.1. Syntax#

rcRshGetCurrentHarness

9.1.2. Description#

rcRshGetCurrentHarness :

9.1.3. See Also#

9.2. rcRshHarnessGetVarCandidates#

Get a list of available variables.

9.2.1. Syntax#

rcRshHarnessGetVarCandidates(harnessId)

9.2.2. Description#

rcRshHarnessGetVarCandidates(harnessId)

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

9.3. rcRshHarnessGetVarCandidateByFullName#

Find a harness variable candidate by its full name.

9.3.1. Syntax#

varId = rcRshHarnessGetVarCandidateByFullName(harnessId,fullName)

9.3.2. 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.

9.3.3. See Also#

rcRshOpen, rcRshGetHarnesses, rcRshHarnessAddVar

9.4. rcRshHarnessAddVar#

Add a variable to a test harness.

9.4.1. Syntax#

newVarId = rcRshHarnessAddVar(harnessId,newVarKind,varId)

9.4.2. 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.

9.4.3. See Also#

rcRshGetHarnesses, rcRshHarnessGetVarCandidates, rcRshHarnessCheckVar, rcRshVarDelete

9.5. rcRshHarnessCheckVar#

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

9.5.1. Syntax#

rcRshHarnessCheckVar(harnessId,kind,var)

9.5.2. 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.

9.5.3. See Also#

rcRshHarnessGetVarCandidates, rcRshVarDelete

9.6. rcRshSetCurrentHarness#

9.6.1. Syntax#

rcRshSetCurrentHarness

9.6.2. Description#

rcRshSetCurrentHarness :

9.6.3. See Also#

9.7. rcRshVarGetFullName#

Get the name of a test variable.

9.7.1. Syntax#

fullName = rcRshVarGetFullName(varId)

9.7.2. Description#

fullName = rcRshVarGetFullName(varId)

returns the full name of the test variable identified by varId.

9.7.3. See Also#

rcRshHarnessGetVars

9.8. rcRshVarGetHarnessType#

Get the harness type of a test variable.

9.8.1. Syntax#

harnessType = rcRshVarGetHarnessType(varId)

9.8.2. Description#

harnessType = rcRshVarGetHarnessType(varId)

returns the harness type of the test variable identified by varId.

9.8.3. See Also#

rcRshHarnessGetVars, rcRshVarSetHarnessType

9.9. rcRshVarGetInternalType#

Get the internal type of a test variable.

9.9.1. Syntax#

name = rcRshVarGetInternalType(varId)

9.9.2. 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.

9.9.3. See Also#

rcRshHarnessGetVars, rcRshVarSetInternalType

9.10. rcRshVarGetKind#

Get the kind of a test variable.

9.10.1. Syntax#

kind = rcRshVarGetKind(varId)

9.10.2. 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.

9.10.3. See Also#

rcRshHarnessGetVars

9.11. rcRshVarGetName#

Get the name of a test variable.

9.11.1. Syntax#

name = rcRshVarGetName(varId)

9.11.2. Description#

name = rcRshVarGetName(varId)

returns the name of the test variable identified by varId.

9.11.3. See Also#

rcRshHarnessGetVars, rcRshVarSetName

9.12. rcRshVarGetProperties#

Get the properties of a test variable.

9.12.1. Syntax#

props = rcRshVarGetProperties(varId)

9.12.2. Description#

props = rcRshVarGetProperties(varId)

is assigned a cell array of property names for the test variable whose id matches varId.

9.12.3. See Also#

rcRshHarnessGetVars, rcRshVarHasProperty

9.13. rcRshVarHasProperty#

Test a property of a variable.

9.13.1. Syntax#

hasProperty = rcRshVarGetName(varId,property)

9.13.2. Description#

hasProperty = rcRshVarGetName(varId,property)

is assigned true if the property list for variable identified by varId contains property and false otherwise.

9.13.3. See Also#

rcRshHarnessGetVars, rcRshVarGetProperties

9.14. rcRshVarSetHarnessType#

Set the harness type of a test variable.

9.14.1. Syntax#

name =  rcRshVarSetHarnessType(varId,type)

9.14.2. Description#

name = rcRshVarSetHarnessType(varId,type)

sets the harness type of the test variable identified by varId to match the string type.

9.14.3. See Also#

rcRshHarnessGetVars, rcRshVarGetHarnessType

9.15. rcRshVarSetInternalType#

Set the internal type of a test variable.

9.15.1. Syntax#

rcRshVarSetInternalType(varId,type)

9.15.2. 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.

9.15.3. See Also#

rcRshHarnessGetVars, rcRshVarGetInternalType

9.16. rcRshVarSetName#

Set the name of a test variable.

9.16.1. Syntax#

name = rcRshVarSetName(varId,newName)

9.16.2. Description#

name = rcRshVarSetName(varId,newName)

set the name of the test variable identified by varId to newName.

9.16.3. See Also#

rcRshHarnessGetVars, rcRshVarGetName

9.17. rcRshVarDelete#

Delete a variable.

9.17.1. Syntax#

rcRshVarDelete(varId)

9.17.2. 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.

9.17.3. See Also#

rcRshHarnessGetVars