...
Expand | ||
---|---|---|
| ||
The Data Dictionary support supplied with the Tsentry system is a collection of functions and programs that provide easy access to all of the global variables defined in the system. It is included in all versions of Tsentry and is used internally for basic functionality as system startup, shutdown, and ProbeX and TrendX displays. Access to a variable is provided by the fully qualified variable name; that is the variable name as it might be used in a ‘C’ program. This variable name may be used by data dictionary functions to access and update the variable value. Additionally, the variable may have a user defined minimum, maximum, and initial values defined as well as a text description. These values are also accessible through data dictionary functions calls. The HMI included in Tsentry is provided with components that directly reference data dictionary functionality. Components display text values and graphical objects that change size, shape, and color based on variable values reference global common variables through the data dictionary functionality. Global variables are initialized using the contents of data dictionary control and data files whenever the application system is restarted. On system shutdown, these same variables are saved on files for restoration on the next system restart. The Data Dictionary is normally built as a standard part of the application build procedure. |
...
References in the files in the remainder of this chapter to ‘Loc’ indicate where you would substitute an abbreviation of your location. ‘Sys’ refers to places where you would substitute an abbreviation of your system. |
Data Dictionary Form
Expand | ||
---|---|---|
| ||
The Data Dictionary Form displays all of the data dictionaries available on the host system. |
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
The data dictionary form is primarily used to select one or more variables out of the data dictionary for display on a given screen. The list of currently selected variables shown in the top-right of the form and shows the variable name, type, description, and source (dictionary) for each selected variable. The top-left of this form contains the data dictionary browser which displays the currently selected data dictionary either as a hierarchical tree-based or as a list of variable names, depending on the type of data dictionary. For a tree-based data dictionary such as TsentryGsm, the root elements in the tree represent each of the available global commons, and expanding one of these commons reveals its internal structure. For a list-based data dictionary such as one associated with a historical trend data file, the individual variable names are presented as a flat list. The currently displayed dictionary can be changed by clicking on the “…” button above the browser. The bottom half of this form allows the user to search for text within the list of all variable names and descriptions. The user can search the data dictionary for multiple strings by separating them with spaces in the Search string; in this case all of the specified words must exist in either the variable name or description in order for the variable to be displayed. Variables can be added to the list of selected variables from either the data dictionary browser or the search results by highlighting the appropriate variable and either clicking the Add button or simply dragging the variable name up to the list. The Remove button removed the currently selected variable from the list and the Clear button removes all variables from the list. Right-clicking on the list displays a popup menu with several options for modifying the variables in the list. The Prefix Variable sub-menu allows the user to apply a prefix to the variable name in case he wishes to return not the variable value itself but rather some metadata about the variable. The following prefix options are available:
When the user clicks the Accept button each of the variables in the selection list will be passed back to the caller. For instance, on the ProbeX screen selecting multiple variables in the data dictionary form will add a probe for each selected variable |
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
All of the files used by the TsentryGsm data dictionary system reside in the ‘Pif’ directory of the application. (example: \LocNtRt\sys\pif\* ). The following table describes the files used by the TsentryGsm data dictionary.
|
Expand | ||
---|---|---|
| ||
The data dictionary is built with the GsmPifBld program located in the \tpriNtRt\bin directory. It requires two parameters:
The following is an example command as would be submitted to a DOS box command line: d:\LocNtRt\tpriNtRt\bin\GsmPifBld d:\LocNtRt\sys\Inc\sysGsm.h d:\LocNtRt\sys\Pif\sysStruct.ini Execution of this program will replace the current copy of sysStruct.ini with an updated copy built from the latest application C/C++ language header files. This program parses all header files included in sysGsm.h and generates the text sysStruct.ini file that specifies the name, type, size, dimensions, and descriptions for all structures and structure members that it finds in the header files. |
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
The data dictionary builder automatically extracts descriptions from the comments associated with each structure member defined in the header files. Descriptions are parsed according to the following rules:
These descriptions are stored in the sysStruct.ini file along with the properties (name, type, size, etc.) of each of the structure members. Note however that these descriptions are associated with single structure members in the data dictionary, and a given structure member may exist in multiple locations in the entire data dictionary. The data dictionary generates the description for a fully qualified variable as follows:
For example, suppose a system includes the following header file:
and the data dictionary is initialized with the following sysVars.ini file:
The data dictionary would indicate descriptions for each of the following variables as:
|
Expand | ||
---|---|---|
| ||
The initialization of the data dictionary, including reading the variable definitions, allocation of the global shared regions, populating the global shared regions, and saving the global shared regions is automatically taken care of by the NtRtMgr process. |
Expand | ||
---|---|---|
| ||
The data dictionary access may be initialized within any task with the following call:
|
Expand | ||
---|---|---|
| ||
Access to an individual Global Shared Memory region within a process may be gained with the following call (example region = “SYSDATA”):
|
Expand | ||
---|---|---|
| ||
Access to the Data Dictionary and to the associated Global Shared Memory Regions may be deleted from a process with the following function call:
|
Expand | ||
---|---|---|
| ||
The variables in the Global Shared Memory Regions with “F” persistence may be saved to disk with the following call:
|
Expand | ||
---|---|---|
| ||
Maintenance requirements include the following:
|
...