European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

mswEVAL_STATE Class Reference

See man page mswEVAL_STATE(4)
More...

#include <mswEVAL_STATE.h>

Collaboration diagram for mswEVAL_STATE:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mswEVAL_STATE (mswMOD_LIST_MANAGER &listManager)
 mswEVAL_STATE (const dbSYMADDRESS dbPoint, mswMOD_LIST_MANAGER &listManager)
 ~mswEVAL_STATE ()
ccsCOMPL_STAT Disable ()
ccsCOMPL_STAT Enable ()
vltLOGICAL Enabled ()
virtual ccsCOMPL_STAT Evaluate ()
ccsCOMPL_STAT SubState (vltINT32 substate)
vltINT32 SubState ()

Protected Member Functions

evhCB_COMPL_STAT RequiredListChangedCB (evtEVENT_MSG &msg, void *udata)
evhCB_COMPL_STAT StateChangedCB (evtEVENT_MSG &msg, void *udata)

Private Member Functions

ccsCOMPL_STAT ConstructorInit ()

Private Attributes

evtEVENT evtList
evtEVENT evtUnit
mswMOD_LIST_MANAGERmodListManager
vltLOGICAL enabled

Detailed Description

See man page mswEVAL_STATE(4)
Manpage of mswEVAL_STATE

mswEVAL_STATE

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:09
Index Return to man pages list
 

NAME

mswEVAL_STATE - Class of the TCS Mode Switching module to evaluate
                TCS Global State

 

SYNOPSIS


#include "mswEVAL_STATE.h"

class mswEVAL_STATE : public evhDB_TASK
{
  public:
    mswEVAL_STATE(mswMOD_LIST_MANAGER &listManager);
    mswEVAL_STATE(const dbSYMADDRESS  dbPoint,
                  mswMOD_LIST_MANAGER &listManager);
   ~mswEVAL_STATE();

    ccsCOMPL_STAT Disable();
    ccsCOMPL_STAT Enable();
    vltLOGICAL    Enabled();

    ccsCOMPL_STAT Evaluate();

    ccsCOMPL_STAT SubState(vltINT32 substate);
    vltINT32      SubState();

  protected:
    evhCB_COMPL_STAT RequiredListChangedCB(msgMESSAGE &msg, void *udata);
    evhCB_COMPL_STAT StateChangedCB(evtEVENT_MSG &msg, void *udata);

  private:
    ccsCOMPL_STAT ConstructorInit();

    evtEVENT             evtList;
    evtEVENT             evtUnit;
    mswMOD_LIST_MANAGER &modListManager;
    vltLOGICAL           enabled;
};

 

PARENT CLASS


evhDB_TASK

 

DESCRIPTION


    This class is used to evaluate (when enabled) the state and substate
    of TCS based on the states of the required or anyway involved
    LCUs and coordination modules.
    It is a support class for the mswCONTROL_MAIN class and assumes that
    the given const dbSYMADDRESS  dbPoint database address contains
    attributes for the state and substate values (then it shares the same
    database point with mswCONTROL_MAIN).
    It will receive in this parameter the database address for the instance
    of mswCONTROL_MAIN.
    In order to easily get the list of required LCUs, needs the support
    of an instance of mswMOD_LIST_MANAGER class, that is passed by
    reference on the constructor.
    Any changes detected by the mswMOD_LIST_MANAGER class are transferred
    to this class by means of events of two dedicated attributes
    listchanged and unitchanged.

 

PUBLIC METHODS


    mswEVAL_STATE(mswMOD_LIST_MANAGER &listManager);
    mswEVAL_STATE(const dbSYMADDRESS  dbPoint,
                  mswMOD_LIST_MANAGER &listManager);
       Creates the object.
       Two constructors are provided.
       The second one receives as parameter the symbolic address of
       online database support point for the object, i.e. the point
       where the object can find configuration and run time values.
       The first one defines the online database support point calling
       the standard tcsDbRoot(4) function and appenting the
       default relative path from the TCS database root point,
       assuming a complete default TCS database structure.
       This point is assumed to have a "state" and "substate"
       attributes.

   ~mswEVAL_STATE();

    ccsCOMPL_STAT Disable();
       Disable evaluation of state up to the next call to Enable()

    ccsCOMPL_STAT Enable();
       Enable evaluation of state up to the next call to Disable()
       It calls always Evaluate method.

    vltLOGICAL    Enabled();
       Returns TRUE if evaluation of the state is enabled, FALSE if it
       is disabled.

    ccsCOMPL_STAT Evaluate();
       Evaluates the new values for state and substate and updates the database.
       This task is performed by asking the instance of mswMOD_LIST_MANAGER
       for the database addresses of the LCUs and coordinating modules and
       then reading their states. The new TCS state is based on these values and
       on the TCS's current state.
       The new state is written in the corresponding database attribute.
       The algorithm for TCS Global state is as follow:
        if any required module is UNDEFINED or OFF or LOADED
                                  then global state = OFF
        else if all required modules are ONLINE
                                  then global state = ONLINE
        else global state = STANDBY

    ccsCOMPL_STAT SubState(vltINT32 substate);
       Support method to write TCS global substate to the database.

    vltINT32 SubState();
       Support method to read TCS global substate from the database.

 

PROTECTED METHODS


    evhCB_COMPL_STAT RequiredListChangedCB(msgMESSAGE &msg, void *udata);
      This callback is called by an event from mswMOD_LIST_MANAGER.
      It updates the state callbacks and if evaluation is enabled
      recalculates TCS global state.

    evhCB_COMPL_STAT StateChangedCB(msgMESSAGE &msg, void *udata);
      This callback is called by an event from mswMOD_LIST_MANAGER.
      It recalculates TCS global state if evaluation is enabled.


 

PRIVATE METHODS


    ccsCOMPL_STAT ConstructorInit();
      Support method called by the constructors to grup in a single
      place code that would have been otherwise copied in all constructors

 

PRIVATE DATA MEMBERS


    evtEVENT evtList;
      Event object used for required list changed

    evtEVENT evtUnit;
      Event object used for state changed

    mswMOD_LIST_MANAGER &modListManager;
      Object to get support from modlist manager

    vltLOGICAL enabled;
      Flag to indicate if evaluation is enabled or disabled


 

ON LINE DATABASE


   The database support point for this class is assumed to have
   the following attributes:

        ATTRIBUTE int32 state
        ATTRIBUTE int32 substate

   It has not been defined a specific database class but the reference
   is the mswCONTROL_MAIN database class

 

RETURN VALUES


   mswEVAL_STATE_DISABLED    If requested state evaluation while disabled



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE METHODS
PRIVATE DATA MEMBERS
ON LINE DATABASE
RETURN VALUES

This document was created by man2html, using the manual pages.
Time: 10:09:27 GMT, April 23, 2012

Definition at line 30 of file mswEVAL_STATE.h.


Constructor & Destructor Documentation

mswEVAL_STATE::mswEVAL_STATE ( mswMOD_LIST_MANAGER listManager  ) 
mswEVAL_STATE::mswEVAL_STATE ( const dbSYMADDRESS  dbPoint,
mswMOD_LIST_MANAGER listManager 
)

Definition at line 231 of file mswEVAL_STATE.C.

References ConstructorInit().

mswEVAL_STATE::~mswEVAL_STATE (  ) 

Definition at line 284 of file mswEVAL_STATE.C.


Member Function Documentation

ccsCOMPL_STAT mswEVAL_STATE::ConstructorInit (  )  [private]
ccsCOMPL_STAT mswEVAL_STATE::Disable (  ) 
ccsCOMPL_STAT mswEVAL_STATE::Enable (  ) 
vltLOGICAL mswEVAL_STATE::Enabled (  ) 

Definition at line 309 of file mswEVAL_STATE.C.

References enabled.

Referenced by mswCONTROL::CommandInProgress(), RequiredListChangedCB(), and StateChangedCB().

ccsCOMPL_STAT mswEVAL_STATE::Evaluate (  )  [virtual]
evhCB_COMPL_STAT mswEVAL_STATE::RequiredListChangedCB ( evtEVENT_MSG &  msg,
void *  udata 
) [protected]
evhCB_COMPL_STAT mswEVAL_STATE::StateChangedCB ( evtEVENT_MSG &  msg,
void *  udata 
) [protected]

Definition at line 513 of file mswEVAL_STATE.C.

References Enabled(), and Evaluate().

Referenced by ConstructorInit().

vltINT32 mswEVAL_STATE::SubState (  ) 

Definition at line 467 of file mswEVAL_STATE.C.

References mswDB_SUBSTATE_ATTR, mswERR_DB_READ, mswMOD, and mswSUB_STATE_UNK.

Referenced by Evaluate().

ccsCOMPL_STAT mswEVAL_STATE::SubState ( vltINT32  substate  ) 

Member Data Documentation

vltLOGICAL mswEVAL_STATE::enabled [private]

Definition at line 58 of file mswEVAL_STATE.h.

Referenced by Disable(), Enable(), and Enabled().

evtEVENT mswEVAL_STATE::evtList [private]

Definition at line 55 of file mswEVAL_STATE.h.

Referenced by ConstructorInit().

evtEVENT mswEVAL_STATE::evtUnit [private]

Definition at line 56 of file mswEVAL_STATE.h.

Referenced by ConstructorInit().

Definition at line 57 of file mswEVAL_STATE.h.

Referenced by Evaluate(), and RequiredListChangedCB().


The documentation for this class was generated from the following files:
Generated on Mon Apr 23 10:12:39 2012 for INTROOT API by doxygen 1.6.3