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

From T-VEC Wiki
Jump to: navigation, search
Line 37: Line 37:
  
 
===Structures===
 
===Structures===
 +
====Structure Type Definition====
  
===Structure Types===
+
Structure types are represented hierarchically. Structure field names must be associated with a scalar or predefined structure type as shown below
 
+
Structure types are represented hierarchically. Structure field names and types must be provided as shown below
+
 
+
  
 
[[Image:Structure type.png|center|Structure Type]]
 
[[Image:Structure type.png|center|Structure Type]]
  
===Structure Usage===
+
====Structure Condition 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.
+
In a condition or event expression a structure variable can be related to another structure variable using the "=" or "!=" operators. Structure field elements are referenced using a dot notation and the relationship must correspond to the type of the field element.
  
 
  structure_name.field1 = scalar
 
  structure_name.field1 = scalar
Line 54: Line 52:
 
  structure_name.field1 = function(param,…);
 
  structure_name.field1 = function(param,…);
  
===Assignment Usage===
+
====Structure 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:
+
For outputs, terms or functions, a structure field elements can assign a value to one or more field elements terminated by a semicolon. For example, the vertical tracker3 example that is provided as part of the installation illustrates the use of an assignment to a structure type with two fields (tState and tStatus):
  
 
  tState = FAIL;
 
  tState = FAIL;
 
  tStatus = currentStatus;
 
  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.  
+
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 must be fully qualified.  
  
 
===Functions===
 
===Functions===
Line 71: Line 69:
  
 
Note, the return value associated with the reference to advisoryStatus is associated with an intermediate values called an INTERM. An  
 
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 variable is a local temporary variables that can be assigned from the return of a function. References to that INTERM variable can be made in an Assignment or Condition Reference form such as:
  
 
  INTERM_x := function(a, b, c)
 
  INTERM_x := function(a, b, c)

Revision as of 08:29, 16 October 2008