10. Reactis Info File - Test Points#
10.1. rsRsiAddTestPoint#
Add a test point to an .rsi file.
10.1.1. Syntax#
tpId = rsRsiAddTestPoint(rsiId,location)
10.1.2. Description#
- tpId = rsRsiAddTestPoint(rsiId,location)
adds a test point found via the string location to the .rsi file identified by rsiId.
For Simulink, location should contain the path and name of a block
and an output port number, e.g., sys1/sys2/testblock/3
adds output
port #3 of block “testblock” located within sys1/sys2
as a test
point.
For Stateflow, location should contain the name of a variable within
a Stateflow chart, e.g., sys1/sys2/chart/var
adds the variable named
“var”, located within Stateflow chart “chart” which itself is located
within “sys1/sys2”. For variables defined within Stateflow sub-states,
the state path must also be given,
e.g. sys1/sys2/chart/state1/state2/var
.
tpId is an identifier for the test point used when calling other rsRsiTestPoint* functions.
10.1.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.2. rsRsiImportTestPoints#
Imports all Simulink test point set in the model and adds them as Reactis test points.
10.2.1. Syntax#
rsRsiImportTestPoints(rsiId)
rsRsiImportTestPoints(rsiId,kinds)
10.2.2. Description#
- rsRsiImportTestPoints(rsiId)
imports test points from the model associated with the .rsi file rsiId and adds them to the .rsi file. The following items are imported:
Simulink signals with their “Test point” property checked
Stateflow variables with their “Test point” property checked
- rsRsiImportTestPoints(rsiId,kinds)
imports test points from the model associated with the .rsi file rsiId and adds them to the .rsi file. The items to be imported are specified by the kinds parameter which must be a cell array of strings. Possible kinds of items that can be imported are:
SL
Simulink signals with their “Test point” property checked.
SF
Stateflow variables with their “Test point” property checked.
SLSignal
Simulink signals that must resolve to Simulink.Signal objects.
SFSignal
Stateflow variables that must resolve to Simulink.Signal objects
10.2.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiSyncTestPoints, rsRsiAddTestPoint, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.3. rsRsiClearTestPoints#
Remove all test points from an .rsi file.
10.3.1. Syntax#
rsRsiClearTestPoints(rsiId)
10.3.2. Description#
- rsRsiClearTestPoints(rsiId)
removes all test points from the .rsi file identified by rsiId.
10.3.3. See Also#
rsRsiOpen, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiAddTestPoint, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.4. rsRsiDefaultTestPoints#
Reset all test point constraints to default values.
10.4.1. Syntax#
rsRsiDefaultTestPoints(rsiId)
10.4.2. Description#
- rsRsiDefaultTestPoints(rsiId)
Each test point in the .rsi file identified by rsiId is processed as follows: if the test point exists in the .rsi file but the corresponding block or variable cannot be found in the model, the test point is removed from the .rsi file. Otherwise the model data type’s full range will be set as the constraint for the test point.
10.4.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiAddTestPoint, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.5. rsRsiGetTestPoints#
Get all test points from an .rsi file.
10.5.1. Syntax#
tpIds = rsRsiGetTestPoints(rsiId)
10.5.2. Description#
- tpIds = rsRsiGetTestPoints(rsiId)
tpIds is an array containing a list of integer identifiers for test points specified in the .rsi file. These identifiers are used when calling other rsRsiTestPoint* functions.
10.5.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiAddTestPoint, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.6. rsRsiSyncTestPoints#
Synchronize data types of test points between the .rsi file and associated model.
10.6.1. Syntax#
rsRsiSyncTestPoints(rsiId)
10.6.2. Description#
- rsRsiSyncTestPoints(rsiId)
Each test point in the .rsi file identified by rsiId is processed as follows: if the test point exists in the .rsi file but the corresponding block or variable cannot be found in the model, the test point is removed from the .rsi file. Otherwise, if the data type of the test point has changed in the model, the new data type’s full range will be set as the constraint for the test point.
10.6.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiDefaultTestPoints, rsRsiAddTestPoint, rsRsiRemoveTestPoint, rsRsiGetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.7. rsRsiRemoveTestPoint#
Remove a test point from an .rsi file.
10.7.1. Syntax#
rsRsiRemoveTestPoint(rsiId,tpId)
10.7.2. Description#
- rsRsiRemoveTestPoint(rsiId,tpId)
removes the test point identified by tpId from the file identified by rsiId. tpId must be a test point id returned by rsRsiGetTestPoints or rsRsiAddTestPoint.
10.7.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiAddTestPoint, rsRsiSetTestPointParameterValue, rsRsiSetTestPointParameterValue
10.8. rsRsiGetTestPointParameterValue#
Get the value of a test point parameter.
10.8.1. Syntax#
value = rsRsiGetTestPointParameterValue(rsiId,tpId,paramName)
10.8.2. Description#
- value = rsRsiGetTestPointParameterValue(rsiId,tpId,paramName)
retrieves the parameter whose name matches paramName from the test point identified by tpId. rsiId identifies the .rsi file containing the test point. tpId must be a test point id returned by rsRsiGetTestPoints or rsRsiAddTestPoint.
See the documentation for rsRsiSetTestPointParameterValue for a list of available parameters.
10.8.3. See Also#
rsRsiOpen, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiRemoveTestPoint, rsRsiAddTestPoint, rsRsiSetTestPointParameterValue
10.9. rsRsiSetTestPointParameterValue#
Set the value of a test point parameter.
10.9.1. Syntax#
rsRsiSetTestPointParameterValue(rsiId,tpId,name1,val1,name2,val2,....)
10.9.2. Description#
- rsRsiSetTestPointParameterValue(rsiId,tpId,name1,val1,name2,val2,….)
sets the values of the specified test point parameters to the specified values.
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.
tpId must be a test point id returned by rsRsiGetTestPoints or rsRsiAddTestPoint.
The following parameters are available:
Name |
User-defined name of the test point. |
Constraint |
Sets the data type constraint for the test point. For a description of the syntax of type constraints in .rsi files see section 5.3.2 (“Type Constraint Syntax”) in the Reactis User’s guide. |
Capture |
Capture the data from this test point when creating test suites (possible values are “on” or “off”). |
Constrain |
If Capture is enabled then enabling Constrain will constrain values captured in the test suite to the constraint given for the test point (possible values are “on” or “off”). |
Compare |
Select whether to compare the value of the test point to the value in an existing test suite when running the suite in Simulator (possible values are “on” or “off”). |
Tolerance |
Tolerance for the test point when comparing the test point value to test suite values (only used if Compare is “on”). |
Assertion |
Create an assertion that will be violated if the value of the test point is outside the limits given for the constraint. (possible values are “on” or “off”). |
BoundaryTargets |
Track boundary coverage according to the constraint data type (possible values are “on” or “off”). |
CheckRange |
Select whether to produce an error or warning if the value of the test point is outside the limits given for the constraint. (possible values are “ignore” or “warning” or “error”). |
10.9.3. See Also#
rsRsiOpen, rsRsiSave, rsRsiClearTestPoints, rsRsiDefaultTestPoints, rsRsiGetTestPoints, rsRsiImportTestPoints, rsRsiSyncTestPoints, rsRsiRemoveTestPoint, rsRsiAddTestPoint, rsRsiGetTestPointParameterValue
10.10. rsRsiGetTestPointIntervals#
Get the coverage intervals specified for a test point in the .rsi file.
10.10.1. Syntax#
rsRsiGetTestPointIntervals(rsiId,tpId)
rsRsiGetTestPointIntervals(rsiId,tpId,element)
10.10.2. Description#
- rsRsiGetTestPointIntervals(rsiId,tpId)
returns a cell array of string containing the coverage tracking intervals set for the test point identified by tpId.
- rsRsiGetTestPointIntervals(rsiId,tpId,element)
returns a cell array of string containing the coverage tracking intervals set for element of the test point identified by tpId. See rsRsiSetInputType for more information on how to select an element.
rsiId is the identifier of an .rsi file previously opened by rsRsiOpen. tpId must be a test point id returned by rsRsiGetTestPoints or rsRsiAddTestPoint.
See rsRsiSetTestPointIntervals for a description of the interval syntax.
10.10.3. See Also#
10.11. rsRsiSetTestPointIntervals#
Set the coverage intervals specified for a test point in the .rsi file.
10.11.1. Syntax#
rsRsiSetTestPointTolerance(rsiId,tpId,intervals)
rsRsiSetTestPointTolerance(rsiId,tpId,element,intervals)
10.11.2. Description#
- rsRsiSetTestPointIntervals(rsiId,tpId,intervals)
sets the coverage tracking intervals for the test point identified by tpId to intervals.
- rsRsiSetTestPointIntervals(rsiId,tpId,element,intervals)
sets the coverage tracking intervals for element of the test point identified by tpId to intervals.
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.
tpId must be a test point id returned by rsRsiGetTestPoints or rsRsiAddTestPoint.
A basic interval is specified by the string [min:max] where min and max are double values specifying the (inclusive) minimum and (inclusive) maximum boundaries of the interval.
To exclude the minimum value use ‘]’ instead of ‘[’ as the left delimiter.
To exclude the maximum value use ‘[’ instead of ‘]’ as the right delimiter.
An interval may be prefixed by a ‘~’ character to invert it.
The special string ‘y0’ describes the initial value of the test point, i.e. the test point’s value at the end of the first simulation step (time 0.0). Thus, specifying an interval of ~y0 will track whether the test point’s value has ever changed during a test.
10.11.3. Examples#
tpIds = rsRsiGetTestPoints(rsiId);
rsRsiSetTestPointIntervals(rsiId,tpIds(1),{'[0:20]', ']20:40]', ']40:60]'})
10.11.4. See Also#
rsRsiOpen, rsRsiSave, rsRsiGetTestPoints, rsRsiGetTestPointIntervals