Variables are defined in the data dictionary ( <sw-variables>). They are principally to be treated globally. i.e. their <short-name> must be unique.
Functions use these variables for the exchange of information. These variables are referenced according to their order to do this ( <sw-function-variables>).
Variables are however used as input parameters and as intermediate values as well.
Variables can be assigned with <admin-data> in order for instance, to support library management.
The structure for the description of software variables is recursive. This enables hierarchical structures for the variables to be built up, that e.g. can display a STRUCT-Konstrukt (in the programming language C).
Figure 11: Variable
It shall be observed for the description of data types (variables and parameters) that data always possess an internal (coded) as well as an external (physical) display form (e.g. for an engine speed, internal 0..200: external 0..2000 RPM, internal 201..254: not defined and internal 255: engine speed not available). Conversion between these presentations is by means of the conversion formula referenced in <sw-compu-method-ref>.
Hence <sw-limits> can be given both in physical ( <phys>)as well as in coded ( <phys>) terms.
The internal value for not available is entered in <sw-var-not-av-value>. This is the value that the variable takes when the external is not available (unless not yet determined or there is an error present). There can be no external value given for not available since it is not available.
Not all variables are needed in the application system for the calibration. This fact is documented by the attribute [calibration]. It can take the values calibration, no-calibration and not-in-memory. This attribute is used exactly the way parameters are used.
<sw-variable>
<long-name>engine temperature</long-name>
<short-name>tmot</short-name>
<desc></desc>
<sw-variable-implementation>
<sw-base-type>ub</sw-base-type>
<sw-addressing-method-ref>NearRamByte></sw-addressing-method-ref>
<sw-compu-method-ref>rel_ub_b127p5</sw-compu-method-ref>
<sw-code-syntax-ref>RamNearUb</sw-code-syntax-ref>
</sw-variable-implementation>
</sw-variable>
|