2.4 CCS ENVIRONMENT
2.4.1 Purpose
The Central Control Software (CCS) consists of a collection of libraries, servers and utilities. The libraries provide a set of services to be used for SW development in a CCS environment covering program-to-program communications, data storage and retrieval, access control to hardware and/or software resources and user interaction with the VLT system. Purpose of the servers is to provide special services on application level.
The CCS is organized in software modules each providing specialized services. The first module called "ccs" provides the basic facilities to configure the necessary resources to get access to the different services provided by the other modules, in particular to the on-line database and the message system.
With the JAN06 release, support for multithreaded applications is provided by means of a dedicated library providing a thread safe version of the standard ccs functions and some additional functions to initiate new threads within a ccs environment.
Support for Unix real time priorities is also provided by the ccsScheduler which is now handling the corresponding configuration parameters from the ccsEnvTable.
2.4.2 Basic Concepts
CCS inherits from RTAP the concept of environment.
2.4.2.1 Definitions
· An Rtap environment is defined as a combination of RtapScheduler (An RTAP specific process), other RTAP processes, and applications, together with the communication channels and other resources which they share.(e.g. database)
· A CCS environment is basically an RTAP environment together with some CCS specific processes and Database structures used by these processes. CCS_LITE shares the same concept of environment. However in that case, Rtap processes are replaced by ccs processes, e.g RtapScheduler <-> ccsScheduler; RtapPerfMon <-> ccsPerfMon.
· The environment concept has been extended in a compatible way to the LCUs where RTAP is not available.
· Multiple environments can exist on several hosts or on a single host workstation, either independently or with their processes communicating.
2.4.2.2 Naming rules
· The name must follow the rules for environment names specified in the VLT LAN Specifications. All the rules apply, but the one interesting CCS are:
· Environment names must be declared in the RtapEnvList according to Rtap rules. CCS_LITE uses a similar table: CcsEnvList located in $VLTDATA/config/. All environments to be accessed by a CCS_LITE environment must be declared there according to the same rules. This includes Rtap, CCS_LITE, and LCU environments.
2.4.3 Functions
With the present release of CCS_Lite, 2 new tools are delivered:
· CcseiDb, a database browser allowing to verify the database structure and content. In order to enforce the configuration control rules, , it is not permitted to modify on-line the database structure. This tool is described in a dedicated user manual[21]
· ccsMongui, a grapical user inteface to an environment monitoring tool replacing the old ccsPerfMon and extending its basic capabilities. Usage of the monitoring tools is described in a dedicated document[22]
The CCS library grants the applications programmatic access to the different resources such as:
The following functions are provided in this release:
ccsExit Performs cleanup operations before exiting a process. Any message still present in the input queue is removed. Found commands are answered with an error reply, all other messages are simply discarded.
- the name by which a process is registered with the environment
Additional functions for multithreading support (Available in the threadsafe version of the ccs Library: libCCS_P.lib):
2.4.4 Examples
See examples in other sections for use of the ccs functions.
2.4.5 Configuration
In order to access a CCS environment, one has first to configure the corresponding CCS_Lite/Rtap environment, and then make the CCS specific applications available to that environment.
It is assumed hereafter, that the reader is already familiar with the RTAP or CCS_Lite terminology, and that the CCS_Lite or the RTAP software has already been successfully installed according to the respective installation procedures.
2.4.5.1 Configuration of the CCS environment
A minimum environment is delivered with CCS. To operate it, proceed with the following steps:
1. Rename the minimum environment according to your application, in accordance to the rules given in the VLT LAN Specifications. This name will be represented hereafter with <envName>
· RTAPROOT The existence of this environment variable depends on the installation. It must be defined only when full CCS, based on Rtap, is installed. In the CCS_LITE case, it must remain undefined. It is Pointing to the directory Rtap is installed on, normally set to: /opt/rtap/A.06.70
· RTAPENV set to the name of your CCS environment <envName> . Must be defined both for CCS and CCS_LITE environments.
4. Declare your environment in the $RTAPROOT/etc/RtapEnvList (FULL CCS) or $VLTDATA/config/CcsEnvList (CCS_LITE)
This entry must point to the directory containing the RtapEnvTable file delivered with CCS, or the CcsEnvTable for CCS_LITE environments.
Remote environments located on LCUs or Workstations, and communicating with the local one must also be declared with similar entries such as:
5. The following shows an example of template for the RtapEnvTable pointed to by the entry in RtapEnvList.
The second example shows a similar file, called CcsEnvTable, sharing the same syntax, needed for CCS_LITE environments. The following features are now supported with the JANUARY 2006 release:
· . real time priorities are taken into consideration. The values and ranges being different on HP, Solaris and Linux Operating systems, ccs recognizes values ranging from 0 to 99, 0 being the lowest priority. This value from the CcsEnvTable is remapped into the corresponding OS range. By default, the ccsScheduler ignores Real Time priorities. To operate an environment with Real Time priorities, the ccsScheduler must be satred with option -R
· . Shutdown sequence is now considered. When shuting down an environment, the ccsScheduler sendsthe termination request to processes with highest number first, and lowest number last.
The envs module provides a default template for the CcsEnvTable file with proper configuration values for the ccs processes. This file is automatically used by the standard tools to generate environments, if not replaced by a user provided file. In that case, the user is responsible for providing correct values in the shutdown column. On the Linux platform, incorrect configuration might result in difficulties to release the system resources when the environment is shut down.
7. Allocate a unique tcp port number to your environment, and declare it in the /etc/services file to make your environment known to the external world. The entry must look like:
<envName> nnnn/tcp # CCS environment for application xxxx
Accordingly one entry must exist for each LCU respectively WS environment your environment will have to communicate with.
2.4.5.2 CCS specific configuration
1. Some more environment variables must be declared for the different parts of CCS. The Logging system requires VLT_ROOT_LOG and VLT_LOG_FILES to be defined. See the logging system section of this manual for their definition.
2. The PATH variable must include the path of the directory containing the executable files before the CCS environment is started. All executables of the VLT software are installed in $VLTROOT/bin. If necessary, add also <module>/bin and $INTROOT/bin.
2.4.5.3 Starting the environment
The following command is valid for the minimum environment and for simple test purposes:
Wait for the environment to be ready, and check in rtap_log alternatively ccs_log file if everything started properly.
The rtap_log file is located in the RTAPDIR defined for that environment. Similarly, the ccs_log exists under the environment directory for CCS_LITE.
2.4.5.4 Application dependent configuration
The application is made of additional processes to be run within the environment (possibly other environments) and data to be stored in the on line database.
Additional processes to be started within the environment automatically or not must be added to the Ccs/RtapEnvTable and the different field described above configured as necessary.
The database is populated with user defined points described in dbl files stored in the $VLTDATA/<environment>/dbl directory. The dbLoader transforms these files into a DB directory tree containing the point configuration files according to the Rtap syntax. The generated point configuration files are then automatically loaded into the online database at environment startup. Read the dbStartup/RtapDbStartup man pages for a detailed description of the loading process, in particular with respect to existing snapshots.
2.4.5.5 Resources configuration
This chapter concerns only Rtap based configuration, i.e. Full CCS. The environment delivered with CCS is really a minimum environment. If your application makes extensive use of the message system, you better increase the resources allocated for your environment (see RTAP Reference Manual, Volume 1).
The following setup is recommended, if applications heavily loading the message system will be started:
>RtapScheduler -e <envName> -g 1024 -m 256&
NOTE: The possible ranges of these values depend on the configuration of your UNIX kernel. In order to use the values above, the following settings are necessary:
2.4.6 Reference
The minimum configuration to support and configure a CCS environment is:
The following options must be ordered:
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |