Difference between revisions of "T-VEC Tablular Modeler Examples"

From T-VEC Wiki
Jump to: navigation, search
(Modular Organization)
Line 35: Line 35:
  
 
TTM models support the inclusion of existing models of other requirements, interfaces, or functional behavior. As a result, this feature helps consolidate behavior common to multiple models into a single model and includes it in other models where needed. This feature also supports partitioning a model to allow multiple engineers to work on it in parallel. It is described below.
 
TTM models support the inclusion of existing models of other requirements, interfaces, or functional behavior. As a result, this feature helps consolidate behavior common to multiple models into a single model and includes it in other models where needed. This feature also supports partitioning a model to allow multiple engineers to work on it in parallel. It is described below.
 +
 +
===Structures===
 +
 +
===Structure Types===
 +
 +
Structure types are represented hierarchically. Structure field names and types must be provided as shown below
 +
 +
 +
[[Image:Structure type.png|center|Structure Type]]
 +
 +
===Structure Usage===
 +
 +
Output assignments for structures assign a value to one or more field elements terminated by a semicolon. In a condition table reference structure fields are referenced using a dot notation.
 +
 +
structure_name.field1 = scalar
 +
structure1.field1 = structure2.field_n
 +
structure1 = structure2
 +
structure_name.field1 = function(param,…);
 +
 +
===Assignment Usage===
 +
 +
For outputs or terms, such as the vertical tracker3 example that is provided as part of the installation, an output that is a structure type such as trackingStateStrType with two fields is referenced as follow:
 +
 +
tState = FAIL;
 +
tStatus = currentStatus;
 +
 +
Note that only the field elements need to be used on the left side of the assignment. Individual field elements of an inputs such as sensorData.trk1 shown in the example with functions below, can be fully qualified.
 +
 +
===Functions===
 +
Functions are parameterized condition tables. For example the tracking avoidance example provides several uses of functions such as:
 +
*trackAttributes(sensorData.trk1)
 +
*advisoryStatus(sensorData)
 +
 +
[[Image:Funtion reference.png|center|Function Reference]]
 +
 +
Note, the return value associated with the reference to advisoryStatus is associated with an intermediate values called an INTERM. An
 +
INTERM variable are local temporary variables that can be assigned from the return of a function. Reference to that INTERM variable can be made in an Assignment or Condition Reference form such as:
 +
 +
INTERM_x := function(a, b, c)
 +
 +
Note INTERM assignment operator is := as opposed to equality relational operator =
 +
 +
*INTERM variables can be constrained in condition, but must be assigned from function before additional constraints are applied as shown in the example.
 +
*INTERM variables can be assigned to output variable associated with table
 +
 +
===Arrays===
 +
Single dimensional arrays are supported for structures and scalars.
  
 
==Modular Organization==
 
==Modular Organization==

Revision as of 06:59, 16 October 2008