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

From T-VEC Wiki
Jump to: navigation, search
(Example Links)
(Arrays)
 
Line 1: Line 1:
 
This section first introduces the SCR modeling approach that has been extended by TTM.  
 
This section first introduces the SCR modeling approach that has been extended by TTM.  
 
===Example Links===
 
===Example Links===
 +
*[[TTM Installation Examples]]
 
*[[Discrete_Filter|Discrete Filter]]
 
*[[Discrete_Filter|Discrete Filter]]
 
*[[Tracking and Avoidance|Tracking and Avoidance]]
 
*[[Tracking and Avoidance|Tracking and Avoidance]]
 +
  
 
==SCR Methods Supported by TTM==
 
==SCR Methods Supported by TTM==
Line 33: 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 Type Definition====
 +
 +
Structure types are represented hierarchically. Structure field names must be associated with a scalar or predefined structure type as shown below.
 +
 +
[[Image:Structure type.png|center|Structure Type]]
 +
 +
====Structure Condition Usage====
 +
 +
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
 +
structure1.field1 = structure2.field_n
 +
structure1 = structure2
 +
structure_name.field1 = function(param,…);
 +
structure1.field_integer < structure2.field_integer
 +
 +
====Structure Assignment Usage====
 +
 +
For outputs, terms or functions that are structures, a field element can be assigned a value to one or more field elements where each assignment is terminated by a semicolon. For example, the vertical tracker3 example that is provided as part of the TTM installation illustrates the use of an assignment to a structure type with two fields (tState and tStatus):
 +
 +
tState = FAIL;
 +
tStatus = currentStatus;
 +
 +
Only the field elements need to be used on the left side of the assignment. For inputs each field elements must be fully qualified such as sensorData.trk1 shown in the example below.
 +
 +
===Functions===
 +
Functions are parameterized condition tables. For example the tracking avoidance example provides several uses of function usage 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 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)
 +
 +
Note the INTERM assignment operator is ":=" as opposed to equality relational operator "=:". INTERM variables can be constrained in condition, but must be assigned from the function before additional constraints are applied as shown in the example above. INTERM variables can be assigned to output variable associated with table.
 +
 +
===Arrays===
 +
The following provides a look at how single dimensional arrays is to be supported for structures and scalars. The following provides an example for defining an array. Provide a name and select a data types and check the box indicating that the type is an array. Finally, supply a positive integer indicating the size of the array.
 +
 +
[[Image:Array_type_declaration.png|center|Array Types]]
 +
 +
Arrays are referenced similar to structures or scalars, but using square brackets if a particular array element is to be referenced. An array of size 4 has four elements, starting at location zero (0):
 +
 +
  a[0], a[1], a[2] and a[3]
 +
 +
An entire array or array elements can be referenced in a condition or an assignment. If a variable is used to index an array, then the range of the variable must be constrained to the size of the array. The following example shows three different ways to assign array information to an array of structures.
 +
* Row 1 shows that the output array is assigned the input array inArray
 +
* Row 2 shows that the zeroth element of the array is assigned two different field values, one for status and another for value
 +
* Row 3 shows that the output array associated with index is assigned to the index of inArray
 +
 +
[[Image:Array_reference.png|center|Array Reference]]
  
 
==Modular Organization==
 
==Modular Organization==
Line 38: Line 96:
 
Most organization start their model-based development efforts with a small thread of functionality and transition into one that is performed by a team of developers. Some have evolved to support  product lines. This requires coordination with the design team, system engineering team that write the product technical specification, test team, and the quality assurance organization.  
 
Most organization start their model-based development efforts with a small thread of functionality and transition into one that is performed by a team of developers. Some have evolved to support  product lines. This requires coordination with the design team, system engineering team that write the product technical specification, test team, and the quality assurance organization.  
  
This examples shows an example function such as Check that might have many different types and combination of filtering, matching. This example discusses the organizational and process impacts of developing a feature for the Check component that impacts Filter, Match, and Select.  
+
This example shows an example function such as Check that might have many different types and combination of filtering, matching. This example discusses the organizational and process impacts of developing a feature for the Check component that impacts Filter, Match, and Select.  
  
 
[[Image:Component_example.jpg|center|Conceptual Components Example]]
 
[[Image:Component_example.jpg|center|Conceptual Components Example]]

Latest revision as of 11:03, 27 October 2008