#*****************************************************************************
# E.S.O. - VLT project
#
# "@(#) $Id: CcsEnvTable,v 1.49 2003/12/02 17:54:36 vltsccm Exp $"
#
# who       when      what
# --------  --------  ----------------------------------------------
# xxxxxxxx  dd/mm/yy  created
#
# tebert    19/06/98  first version
# tebert    16/07/99  shifted timsTimeKeeper in phase 2
# tebert    07/08/99  added scan system applications
# tebert    14/06/00  added entry for ccsCmdServer
# bgilli    09/10/00  added entries for dbMQDBM, sampPlotInit,
#                     sampHistInit & hisDHMngr
# bgilli    14/01/02  removed entries sampPlotInit, sampHistInit, since
#                     now integrated in respective processes.
#                     scan running as user rtap
# bgilli    23/01/02  Allowed multiple copies of ccsNextPhase
# bgilli    22/02/02  Added missing alrmLogger entry
#
#************************************************************************
#   NAME
#   CcsEnvTable - CCS environment table
#
#   SYNOPSIS
#   $VLTROOT/ENVIRONMENTS/<envName>/CcsEnvTable
#
#   DESCRIPTION
#   CcsEnvTable is a file containing instructions for the ccsScheduler.
#   It must exist in the environment directory of every CCS_Lite environment.
#   This environment directory is the one associated with the environment
#   name in the CcsEnvList(5) file, and for VLT projects is:
#   $VLTROOT/ENVIRONMENTS/<envName>/CcsEnvTable
#   The file contains a list of processes running in the environment and
#   configuration parameters on how to start them. When an environment
#   is started, the ccsScheduler reads the file, and schedules the processes
#   as configured. Processes doesn't have to be in the file to run
#   into an environment. However, in that case, they cannot be autostarted
#   with the environment, and their behaviour will be according to the default
#   value for the configuration parameters. 
#   The file is strucured like a table, one row per process,
#   with the following columns:
#   
#   
#        1 - process number
#            a number between 0 and 255 that will represent the process
#            number within the environment. If 0, the process number will
#            be automatically allocated by the ccsScheduler, when the process
#            is started. The number will be released when the process
#            terminates. It will then become available for other processes.
#            If non 0, the number will be reserved for the process, being
#            running or not. Numbers 1 to 8 are reserved for CCS_Lite core
#            processes. Default value is dynamically allocated by taking
#            the next higher free process number, with a wrap around after 255
#        2 - Autostart phase
#            A number between 0 and 32767, representing the phase in which
#            the ccsScheduler will start the process. If 0, the process
#            won't be automatically scheduled at environment startup.
#            Environment startup can be split in sequential phases.
#            At startup, the ccsScheduler will first schedule, in the
#            order they appear in the file, all processes belonging to
#            phase 1, and wait for completion of that phase. It will
#            then proceed to the scheduling of all processes in phase 2, 
#            wait for completion of phase 2, and then proceed in the same
#            way with increasing phase numbers. Completion of a phase
#            is notified to the scheduler with a nextPhase request. 
#            A nextPhase request can be sent directly by a CCS_Lite core
#            process, like dbStartup, or using the ccsNextPhase utility.
#            CCS Core processes are started in the first 3 phases. 
#            Default value is 0. 
#        3 - Autostart as user "rtap" (Not supported by CCS_Lite)
#        4 - Restart on termination   (Not supported by CCS_Lite)
#        5 - Multiple copies allowed
#            Y or N. If Y, multiple copies of the process will be allowed
#            to run concurrently. In that case, the field 1 must be 0.
#            Default is Y
#        6 - Cleanup on termination
#            Controls the generation of obituary messages sent upon
#            termination of the process. If Y, obituaries will be sent
#            to processes having requested such a service (See next field)
#            Default is to generate obituaries.
#        7 - Care about process terminations
#            Controls if obituary messages are forwarded to the process.
#            If Y, the process will receive all obituary messages from
#            terminating processes, both in local and remote environments.
#            There is no filtering, the process must identify among the 
#            received notifications those of interest.
#            Default is N
#        8 - Shutdown order (Not supported by CCS_Lite)
#            At environment shutdown, processes are stopped in decreasing
#            process number.
#        9 - Priority       (Not supported by CCS_Lite)
#       10 - Command + arguments + redirection
#            usually the process name with run string arguments, and any
#            optional re-direction.
#
#   FILES
#   See CcsEnvList(5)
#
#   SEE ALSO
#   ccsScheduler(1), ccsNextPhase(1)
#
#
#------------------------------------------------------------------------
# 
#
#   P        R  M  C  G    S   P    C
#   R        E  U  L  E    H   R    O
#   O  P  U  S  L  E  T    U   I    M
#   C  H  S  T  T  A  O    T   O    M
#   N  A  E  A  I  N  B    D   R    A
#   U  S  R  R  P  U  I    W   T    N
#___M__E__?__T__L__P__T____N___Y____D_______________________________________
#
#  These are the core processes which I will always want to run.
#
    1  0  N  N  N  N  N  100  128   ccsScheduler
    2  1  N  N  N  N  N  100  128   ccsSHManager -s 20000
    0  1  N  N  Y  N  N  100  128   ccsNextPhase -t 3 
    0  2  N  N  N  N  N  100  128   dbStartup
   58  0  N  N  N  Y  Y  100  128   dbMQDBM
    3  2  N  N  N  Y  Y  100  128   qsemu 
    5  2  N  N  N  Y  Y  100  128   timsTimeKeeper
    0  3  N  N  N  N  N  100  128   cmdManager
    0  3  N  N  N  N  N  100  128   msgServer
    0  3  N  P  N  N  Y  100  128   logManager
    4  3  N  N  N  Y  Y  100  128   evtEventConfg
    8  3  N  N  N  Y  Y  100  128   ccsCmdServer
    9  3  N  N  N  Y  Y  100  128   alrmServer 
#
# Scan System
#
    6  3  Y  N  N  Y  Y    1  128   scanMngr
    7  0  Y  N  N  Y  Y    1  128   ccsScan
    0  0  Y  N  N  Y  Y    1  128   scanOut
    0  0  N  N  N  N  N    1  128   scanConfig
    0  3  N  N  Y  N  N  100  128   ccsNextPhase -t 30 

   16  4  N  P  N  N  N  100  128   alrmLogger
#
# Process that handle plot & history tables
#
   17  4  Y  P  N  A  N   50  128   hisDHMngr
#
# Applications
#
    0  0  N  N  Y  N  N    1  128   dbRead
    0  0  N  N  Y  N  N    1  128   dbWrite

# sequencer-shell that care about obituaries
    0  0  N  N  Y  Y  Y    1  128   seqObituary


#
#___oOo___

