Constants in the Base VTS System

Constants, as their name implies, have values that do not change during execution. The value of a constant must be assigned when it is declared and may be of any type.

The VTS module (contained within the base VTS system) handles the launching and setup of your VTS application. Within the VTS module, the following constants may be of interest to you.

POINTCLASS             The POINTCLASS constant defines the class number for tag template modules. This value is currently 0x0002. Any variables in the library that have a class in the range of 0x0002 to 0xFEFF are treated as tag templates. This constant is also defined in the AppMod.src file as POINTS (see AppMod.src Root File for a Standard Application).

Note: A class is a template defining both the properties and behavior of objects.

GROUPCLASS            The GROUPCLASS constant defines the class number for the group modules. It has a value of 0xFF00. This constant is also defined in the AppMod.src file as GROUPS (see AppMod.src Root File for a Standard Application).

LIBCLASS                   The LIBCLASS constant defines the class number for Library modules. It has a value of 0xFF01. Library modules are typically drawing objects that are available to the user at build time, but which are not associated with any particular tag type (for example, the tools in the Standard Library, such as the Border tool, or the Page Change Hotbox tool). Variables typically used for global system values may also be included in this class – although the SRVCLASS range is usually a better location for them (see SRVCLASS variable class in Variable Classes).

                             This constant is also defined in the AppMod.src file as LIBRARIES (see AppMod.src Root File for a Standard Application).

 

GRAPHCLASS            The GRAPHCLASS constant defines the class number for tag drawing method modules. The GRAPHCLASS constant has a value of 0xFF02. It is also defined in AppMod.src as GRAPHICS (see AppMod.src Root File for a Standard Application).

Note: Further information on tag drawing method modules can be found in External Tag Drawing Method Modules.

PAGECLASS               The PAGECLASS constant defines the starting class number for the page modules. The page modules used to display application graphics are placed in this class. The current class range for page variables is 0xFF03. This constant is also defined in the AppMod.src file as PAGES (see AppMod.src Root File for a Standard Application).

SRVCLASS                  The SRVCLASS constant defines the starting class number for the service modules and variables. The services are any modules that the user requires to customize the application.

                             These services are typically utility type modules and modules such as the Alarm Manager and the Trend Manager. The service class is 0xFF04. This constant is also defined in the AppMod.src file as SERVICES (see AppMod.src Root File for a Standard Application).

PLUGINCLASS          The PLUGINCLASS constant defines the class number for plug-in modules. Plug-ins are modules that are added to tag modules or other modules at runtime, enabling these modules to specifically be added to a project without modifying the base system. For example, a plug-in module could be used to add a new subroutine method to the alarm manager, or to add a new report type to an application. Plug-in modules are assigned class PLUGINS in the host module. The plug-ins class is 0xFF05. This constant is also defined in the AppMod.src file as PLUGINS (see AppMod.src Root File for a Standard Application).

Note: Further information on plug-in modules can be found in External Plug-in Modules.

PRIORITYCLASS      The PRIORITYCLASS constant defines the starting class number for the priority service modules and variables. These priority services are any modules or variables that the user needs to have started before any other modules in any of the other class types. The network manager resides in this class. The priority service class is 0xFF06. This constant is also defined in the AppMod.src file as PRIORITYSTART (see AppMod.src Root File for a Standard Application).

TSRVCLASS               The TSRVCLASS constant defines the starting class number for the threaded service modules. These threaded services are any modules that need to be executed in their own separate threads. The Security Manager resides in this class. The threaded service class is 0xFF07. This constant is also defined in the AppMod.src file as TSERVICES (see AppMod.src Root File for a Standard Application).

CHILDCLASS             The CHILDCLASS constant defines the starting class number for child modules. The child module class is 0xFF08. This constant is also defined in the AppMod.src file as CHILDREN (see AppMod.src Root File for a Standard Application).

NTags                         The NTags variable contains a count of the number of tag types defined in the system. This count is updated at load time. It does not represent the number of actual tag instances defined in the database; rather it represents the tag template modules defined in the Library.

DataBase                  The Database variable contains the object value of the database module where all the tag instances are kept.

AppObj                       The AppObj variable contains the object value of the application's AppMod.src module. This module is not actively used in the running of the VTS application, but is simply a template used to specify the modules and variables to load. The "AppObj" variable must be used if there is code written to maintain the modules and variables in the AppMod.src file (see AppMod.src Root File for a Standard Application).

ProjPath                    The ProjPath variable is a text string giving the full path to the user application.

Drive                          The Drive variable contains a text string giving the driver letter to the user application.

AppName   (Obsolete)        The value of the AppName variable is the text name of the ODBC data source configured for your application to enable communications between the tag properties database ("Points.mdb") and your application.

                             The default value for "AppName" is "Tags". The Points.mdb database file in the application directory is used as the primary data source if a data source is not currently defined. If the "Points.mdb" database file does not exist, and there is only one .mdb file in the application directory, that file is used as the ODBC data source. This relative data source assignment allows applications to be copied to another machine without having to reconfigure the ODBC data source.