OTX Reference  
OpenTestSystem.Otx.Core.Declarations.StateVariableDeclaration Class Reference

Declares a state variable. More...

Inheritance diagram for OpenTestSystem.Otx.Core.Declarations.StateVariableDeclaration:
Inheritance graph

Public Attributes

Visibility visibility
 Cardinality [0..1]
Visibility for access from outside the document More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Declarations.Declaration
DeclarationRealisation realisation
 Cardinality [0..1]
For declarations at specification stage, having a name for the declaration is sufficient. For realisation stage, the declaration needs a data type assignment. The optional realisation element is used for exactly this task – it contains a dataType sub element. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.UniversalTypes.NamedAndSpecified
ExtensibleData[] extendedData
 Declares general data for NamedAndSpecified which can be extented by new general data defined in new OTX extensions using the standardised extension mechanism. For example it can be used to specify specification relevant content in a better structured way. More...
 
OtxId id
 Unique identifier of an element More...
 
MetaData metaData
 Additional tool-specific data More...
 
OtxName name
 Name of an element More...
 
NamedAndSpecifiedSpecification[] specification
 Descriptive specification More...
 

Detailed Description

Declares a state variable.

Test sequences require a technique to provide different status information to the environment, e.g. progress of execution or currently selected ECU etc. This is the intention of state variables. State variables are the counterpart of context variables, see context concept (cf. 6.7). They provide the mechanism to transport status information from inside a procedure to the environment, whilst context variables are the mechanism to transport environment information to the procedure.

Note
IMPORTANT — State variables can only be set and cannot read inside OTX. In other words: The test logic shall not be based on the value of a State variable.
Note
IMPORTANT — OTX documents declaring state variables should be connected to corresponding setting routines which can set the current value of the status in scope.Therefore, test applications require a mapping between state variables and according setting routines. The mapping may be kept in application specific places, but it may also be contained in meta-data compartments of an OTX document (cf. 7.16.5). The recommendations for meta-data compartments described in ISO 13209-2, 7.5.3 shall be applied also for state variables.

OTX authors may define default values for state variables. If an initial value is defined the setting routine should be called immediately after declaration of the state variable. For data types for which no implicit value is specified, the state variable is un-initialized, the setting routine will not be called. If no initial value is defined and the variable value is never written inside a procedure, the setting routine will never be called. Inside a procedure the setting routine will only be called if the value of that variable is changed. Changes of a state variable shall be immediately reported to the runtime environment.

Checker rules
CheckerRule.Core_Chk065 – No reading of state variables across documents

Member Data Documentation

◆ visibility

Visibility OpenTestSystem.Otx.Core.Declarations.StateVariableDeclaration.visibility

Cardinality [0..1]
Visibility for access from outside the document