European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

mswMOD_LIST_MANAGER Class Reference

See man page mswMOD_LIST_MANAGER(4)
More...

#include <mswMOD_LIST_MANAGER.h>

Collaboration diagram for mswMOD_LIST_MANAGER:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mswMOD_LIST_MANAGER ()
 mswMOD_LIST_MANAGER (const dbSYMADDRESS dbPoint)
 ~mswMOD_LIST_MANAGER ()
ccsCOMPL_STAT SendAll (msgMESSAGE &msg, const vltINT8 phase=mswSEND_NO_PHASE, const vltINT8 mode=mswSEND_REQUIRED, const vltINT8 focus=0)
ccsCOMPL_STAT UpdateCallbacks ()
const mswMOD_RECORD_ARRAYGetRequiredModules ()
vltLOGICAL CheckReqModState (vltINT32 stateToCheck)
ccsCOMPL_STAT UpdateReqModList (vltINT8 oldFocus, vltINT8 newFocus)
ccsCOMPL_STAT DisableModulesListEvent ()
ccsCOMPL_STAT EnableModulesListEvent ()

Protected Member Functions

virtual evhCB_COMPL_STAT ListChangedCB (evtEVENT_MSG &msg, void *udata)
virtual evhCB_COMPL_STAT UnitStateChangedCB (evtEVENT_MSG &msg, void *udata)

Private Member Functions

ccsCOMPL_STAT ConstructorInit ()
ccsCOMPL_STAT TriggerEvaluation (vltINT8 whatToTrigger)

Private Attributes

evtEVENT evt
evtEVENT unitEvent [mswNO_OF_MODULES]
mswMOD_LISTmodList
dbSYMADDRESS modPoint
Table modules
 mswNO_OF_MODULES
BYTES32 modName
BYTES32 BYTES32 modId
BYTES32 BYTES32 BYTES256 modSymbAddr
BYTES32 BYTES32 BYTES256 INT8 startPhase
BYTES32 BYTES32 BYTES256 INT8 INT8 stopPhase
BYTES32 BYTES32 BYTES256 INT8
INT8 INT8 
tracking
BYTES32 BYTES32 BYTES256 INT8
INT8 INT8 INT8 
focus
BYTES32 BYTES32 BYTES256 INT8
INT8 INT8 INT8 BOOLEAN 
required
BYTES32 BYTES32 BYTES256 INT8
INT8 INT8 INT8 BOOLEAN BOOLEAN 
ignore
BYTES32 BYTES32 BYTES256 INT8
INT8 INT8 INT8 BOOLEAN BOOLEAN
BYTES256 userField INT32 
listchanged = 0
INT32 unitchanged = 0
BYTES32 cmd

Detailed Description

See man page mswMOD_LIST_MANAGER(4)
Manpage of mswMOD_LIST_MANAGER

mswMOD_LIST_MANAGER

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

NAME

mswMOD_LIST_MANAGER - Class off the TCS Mode Switching module to
                      handle and interact with the list of required
                      LCUs/Control modules

 

SYNOPSIS


#include "mswMOD_LIST_MANAGER.C"

class mswMOD_LIST_MANAGER : public evhDB_CMD_SERIAL
{
  public:
    mswMOD_LIST_MANAGER();
    mswMOD_LIST_MANAGER(const dbSYMADDRESS  dbPoint);
   ~mswMOD_LIST_MANAGER();

    ccsCOMPL_STAT        SendAll(msgMESSAGE &msg,
                                 const vltINT8 phase = mswSEND_NO_PHASE,
                                 const vltINT8 mode  = mswSEND_REQUIRED,
                                 const vltINT8 focus = 0);
    ccsCOMPL_STAT        UpdateCallbacks();
    mswMOD_RECORD_ARRAY &GetRequiredModules();
    vltLOGICAL           CheckReqModState(vltINT32 stateToCheck);
    ccsCOMPL_STAT        UpdateReqModList(vltINT8 oldFocus,vltINT8 newFocus);

  protected:
    virtual evhCB_COMPL_STAT  ListChangedCB(evtEVENT_MSG &msg, void *udata);
    virtual evhCB_COMPL_STAT  UnitStateChangedCB(msgMESSAGE &msg, void *udata);

  private:
    ccsCOMPL_STAT      ConstructorInit();
    ccsCOMPL_STAT      TriggerEvaluation(vltINT8 whatToTrigger);

    evtEVENT           evt;
    evtEVENT           unitEvent[mswNO_OF_MODULES];
    mswMOD_LIST       *modList;
    dbSYMADDRESS       modPoint;

};

 

PARENT CLASS


evhDB_CMD_SERIAL

 

DESCRIPTION


Look at the documentation for the base class evhDB_CMD_SERIAL(4) to get
information about command handling in this class, internal states and
notification of errors and completion.

This class provides methods to:
     - Send commands to a list of units, selected from a table
       based on flag values
     - Modify the list changing the flags
     - Monitor the list for changes done externaly (for example
       during maintenance).
     - Access table information

mswMOD_LIST_MANAGER requires a database support point
where the list is stored and can be assessed.
Typically this will be the msw list point in the standard TCS
mode switching database branch, i.e. ":Appl_data:TCS:msw:list".
The default value is built assuming a standard TCS database
and using the tcsDbRoot(3) function.

Commands are serialized, i.e. is a request for a new SendAll() is
performed while a command is still pending, the new request is queued
and actually performed when the pending one is completed.

Please, read the CAUTION section for limits in the implementation
of the SendAll() method.

 

PUBLIC METHODS


    mswMOD_LIST_MANAGER();
    mswMOD_LIST_MANAGER(const dbSYMADDRESS  dbPoint);
       When the object is created the database table is loaded in
       memory by calling the mswMOD_LIST_COMMAND method SetMswPoint.
       The ListChangedCB() callback is registered to monitor the
       table itself for changes occurring from outside.
       It also installs event handlers on the state database attributes
       for all the required units to call UnitStateChangedCB() whenever
       they change state.
       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.

   ~mswMOD_LIST_MANAGER();

    ccsCOMPL_STAT RefreshAndSendAll(msgMESSAGE &msg);
       Behaves like the SendAll() method, but before sending the command
       ask for a Refresh().
       In order to do this verifies that mswMIRROR units are in stand-by
       or on-line, If not, ask them to go in stand-by, then read mirror
       positions and uses this data to refresh the required's list.
       This task is accomplished calling the Refresh() protected
       method.
       If everything is OK, can send the requested command.
       THIS METHOD IS NOT YET IMPLEMENTED.

    ccsCOMPL_STAT SendAll(msgMESSAGE &msg,
                          const vltINT8 phase = mswSEND_NO_PHASE,
                          const vltINT8 mode  = mswSEND_REQUIRED,
                          const vltINT8 focus = 0);
       This method is just an interface to mswMOD_LIST_COMMAND
       Send() method.
       This method is using the overloaded Send method of mswMOD_LIST_COMMAND.

    ccsCOMPL_STAT  UpdateCallbacks();
       Method to re-install all required callback for the state
       attributes of required modules.

    mswMOD_RECORD_ARRAY  &GetRequiredModules();
       This method is just an interface to mswMOD_LIST to obtain
       the list of required modules.

    vltLOGICAL        CheckReqModState(vltINT32 stateToCheck);
       Checks if ALL the required modules are in the specified state.

    ccsCOMPL_STAT     UpdateReqModList(vltINT8 oldFocus,vltINT8 newFocus);
       Interface to the corresponding mswMOD_LIST class method.

 

PROTECTED METHODS


    evhCB_COMPL_STAT  ListChangedCB(msgMESSAGE &msg, void *udata);
       This function is called whenever the list is modified from
       outside.
       When this event occurres the DB table is reloaded into memory
       and the value of DB attribute listchanged is incremented,
       in order to create an event for mswEVAL_STATE.

    evhCB_COMPL_STAT  UnitStateChangedCB(msgMESSAGE &msg, void *udata);
       This function is called whenever the state of a required unit
       in the list changes.
       When this event occurres the value of DB attribute unitchanged
       is incremented, in order to create an event for mswEVAL_STATE.

    ccsCOMPL_STAT     Refresh();
       This is the actual function used to perform a refresh in the list
       of required LCUs and coordination modules.
       In function verifies that mswMIRROR units are in stand-by
       or on-line, If not, ask them to go in stand-by, then read mirror
       positions and uses this data to refresh the required's list.
       This has been placed as a separated protected method to make
       easier the implementation of NTT and VLT specific subclasses.
       THIS METHOD IS NOT YET IMPLEMENTED.

 

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

    ccsCOMPL_STAT   TriggerEvaluation(vltINT8 whatToTrigger);
       Generates an event for mswEVAL_STATE by incrementing the database
       attributed soecified with whatToTrigger.

 

PRIVATE DATA MEMBERS


     evtEVENT evt;
       Event to monitor external changes of the table

     evtEVENT  unitEvent[mswNO_OF_MODULES];
       Array of events for required modules state attribute

     mswMOD_LIST *modList;
       Object for handling of list

     dbSYMADDRESS modPoint;
       Point name of mode switching table

 

ON LINE DATABASE


The class need the support of an instance of the mswMOD_LIST_MANAGER
database class:

   CLASS prsDB_CMD_SERIAL mswMOD_LIST_MANAGER
 

BEGIN


         ATTRIBUTE Table modules(mswNO_OF_MODULES,
                                 BYTES32   modName,
                                 BYTES32   modId,
                                 BYTES256  modSymbAddr,
                                 int8      startPhase
                                 int8      stopPhase,
                                 int8      tracking,
                                 int8      focus,
                                 logical   required,
                                 logical   ignore,
                                 BYTES256  userField
                                )
         ATTRIBUTE int32        listchanged 0
         ATTRIBUTE int32        unitchanged 0
 

CAUTIONS


  SendAll(): Due to limitations in the current implementation,
             the phase selected in a call to SendAll() will
             be applied applied TO ALL PENDING QUEUES, and not
             only to the issued command.
             This means that it is possible to have at any
             time only a pending command and a queued command
             with a different phase. If there are more command
             queued and a new one is issued, all the queued one
             will get the same phase of newly issued Send
  RefreshAndSendAll();
  Refresh();
             These methods are not yet implemented



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE METHODS
PRIVATE DATA MEMBERS
ON LINE DATABASE
BEGIN
CAUTIONS

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

Definition at line 33 of file mswMOD_LIST_MANAGER.h.


Constructor & Destructor Documentation

mswMOD_LIST_MANAGER::mswMOD_LIST_MANAGER (  ) 
mswMOD_LIST_MANAGER::mswMOD_LIST_MANAGER ( const dbSYMADDRESS  dbPoint  ) 

Definition at line 306 of file mswMOD_LIST_MANAGER.C.

References ConstructorInit().

mswMOD_LIST_MANAGER::~mswMOD_LIST_MANAGER (  ) 

Definition at line 365 of file mswMOD_LIST_MANAGER.C.


Member Function Documentation

vltLOGICAL mswMOD_LIST_MANAGER::CheckReqModState ( vltINT32  stateToCheck  ) 
ccsCOMPL_STAT mswMOD_LIST_MANAGER::ConstructorInit (  )  [private]
ccsCOMPL_STAT mswMOD_LIST_MANAGER::DisableModulesListEvent (  ) 

Definition at line 352 of file mswMOD_LIST_MANAGER.C.

References evt.

ccsCOMPL_STAT mswMOD_LIST_MANAGER::EnableModulesListEvent (  ) 

Definition at line 357 of file mswMOD_LIST_MANAGER.C.

References evt.

const mswMOD_RECORD_ARRAY & mswMOD_LIST_MANAGER::GetRequiredModules (  ) 
evhCB_COMPL_STAT mswMOD_LIST_MANAGER::ListChangedCB ( evtEVENT_MSG &  msg,
void *  udata 
) [protected, virtual]
ccsCOMPL_STAT mswMOD_LIST_MANAGER::SendAll ( msgMESSAGE &  msg,
const vltINT8  phase = mswSEND_NO_PHASE,
const vltINT8  mode = mswSEND_REQUIRED,
const vltINT8  focus = 0 
)
ccsCOMPL_STAT mswMOD_LIST_MANAGER::TriggerEvaluation ( vltINT8  whatToTrigger  )  [private]
evhCB_COMPL_STAT mswMOD_LIST_MANAGER::UnitStateChangedCB ( evtEVENT_MSG &  msg,
void *  udata 
) [protected, virtual]

Definition at line 600 of file mswMOD_LIST_MANAGER.C.

References modPoint, mswERR_DB_LOAD_TABLE, mswMOD, TRIGGER_UNIT, and TriggerEvaluation().

Referenced by UpdateCallbacks().

ccsCOMPL_STAT mswMOD_LIST_MANAGER::UpdateCallbacks (  ) 
ccsCOMPL_STAT mswMOD_LIST_MANAGER::UpdateReqModList ( vltINT8  oldFocus,
vltINT8  newFocus 
)

Member Data Documentation

BYTES32 mswMOD_LIST_MANAGER::cmd [private]

Definition at line 64 of file mswMOD_LIST_MANAGER.class.

evtEVENT mswMOD_LIST_MANAGER::evt [private]
BYTES32 BYTES32 BYTES256 INT8 INT8 INT8 INT8 mswMOD_LIST_MANAGER::focus [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 BYTES256 INT8 INT8 INT8 INT8 BOOLEAN BOOLEAN mswMOD_LIST_MANAGER::ignore [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 BYTES256 INT8 INT8 INT8 INT8 BOOLEAN BOOLEAN BYTES256 userField INT32 mswMOD_LIST_MANAGER::listchanged = 0 [private]

Definition at line 62 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 mswMOD_LIST_MANAGER::modId [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 mswMOD_LIST_MANAGER::modName [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

dbSYMADDRESS mswMOD_LIST_MANAGER::modPoint [private]

Definition at line 69 of file mswMOD_LIST_MANAGER.h.

Referenced by ConstructorInit(), ListChangedCB(), and UnitStateChangedCB().

BYTES32 BYTES32 BYTES256 mswMOD_LIST_MANAGER::modSymbAddr [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

Referenced by CheckReqModState(), and UpdateCallbacks().

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

Referenced by UpdateCallbacks().

BYTES32 BYTES32 BYTES256 INT8 INT8 INT8 INT8 BOOLEAN mswMOD_LIST_MANAGER::required [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 BYTES256 INT8 mswMOD_LIST_MANAGER::startPhase [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 BYTES256 INT8 INT8 mswMOD_LIST_MANAGER::stopPhase [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

BYTES32 BYTES32 BYTES256 INT8 INT8 INT8 mswMOD_LIST_MANAGER::tracking [private]

Definition at line 50 of file mswMOD_LIST_MANAGER.class.

INT32 mswMOD_LIST_MANAGER::unitchanged = 0 [private]

Definition at line 63 of file mswMOD_LIST_MANAGER.class.

Definition at line 65 of file mswMOD_LIST_MANAGER.h.

Referenced by UpdateCallbacks().


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