European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

mswCHANGE_FOCUS Class Reference

See man page mswCHANGE_FOCUS(4)
More...

#include <mswCHANGE_FOCUS.h>

Inheritance diagram for mswCHANGE_FOCUS:
Inheritance graph
[legend]
Collaboration diagram for mswCHANGE_FOCUS:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mswCHANGE_FOCUS (mswMOD_LIST_MANAGER &listManager)
 mswCHANGE_FOCUS (const dbSYMADDRESS dbPoint, mswMOD_LIST_MANAGER &listManager)
 ~mswCHANGE_FOCUS ()
virtual ccsCOMPL_STAT Execute (msgMESSAGE &msg)=0
ccsCOMPL_STAT RegisterCallbacks (evhOBJ_CALLBACK okCB, evhOBJ_CALLBACK errCB)
virtual vltINT32 CurrentFocus ()
virtual ccsCOMPL_STAT Init ()
virtual ccsCOMPL_STAT CheckModeSwitchingState (vltINT32 actState, vltINT32 actSubState)=0
vltDOUBLE GetFocusOffset (void)
void SetFocusOffset (vltDOUBLE offset)

Protected Member Functions

virtual mswCHANGE_FOCUSCurrentFocus (vltINT32 currFoc)
virtual ccsCOMPL_STAT ReadMirrorsPos (vltINT32 *currFoc)
virtual ccsCOMPL_STAT CheckPresetToZenith (vltLOGICAL *zenith)

Protected Attributes

vltDOUBLE focusOffset
mswFOCUS focus
mswMOD_LIST_MANAGERmodListManager
msgMESSAGE chFocusMsg
evhOBJ_CALLBACK chFocusOkCB
evhOBJ_CALLBACK chFocusErrorCB

Private Attributes

INT32 currentFocus = 0
BYTES256 altAddr
 __pad0__:Appl_data:TCS:trk:data:position:actPos.alt" BYTES256 m3PosAddr

Detailed Description

See man page mswCHANGE_FOCUS(4)
Manpage of mswCHANGE_FOCUS

mswCHANGE_FOCUS

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

NAME

mswCHANGE_FOCUS - Control telescope's focus change.

 

SYNOPSIS


#include "mswCHANGE_FOCUS.h"

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

     virtual vltLOGICAL    CheckPresetToZenith();
     virtual vltINT32      CurrentFocus();
     ccsCOMPL_STAT         RegisterCallbacks(evhOBJ_CALLBACK okCB,
                                             evhOBJ_CALLBACK errCB);

     virtual ccsCOMPL_STAT Execute(msgMESSAGE &msg) = 0;

   protected:
     virtual mswCHANGE_FOCUS  &CurrentFocus(vltINT32 currFoc);
     virtual ccsCOMPL_STAT     ReadMirrorsPos(vltINT32 *currFoc);
             ccsCOMPL_STAT     CheckPresetToZenith(msgMESSAGE &msg)

   protected:
     mswFOCUS             focus;
     mswMOD_LIST_MANAGER &modListManager;
     msgMESSAGE           chFocusMsg;
     evhDB_CMD_SERIAL    *M3Cmd;
     msgMESSAGE           M3Msg;
     evhOBJ_CALLBACK      chFocusOkCB;
     evhOBJ_CALLBACK      chFocusErrorCB;
}


 

PARENT CLASS


evhDB_TASK


 

DESCRIPTION


Base class to perform focus change. It is a pure virtual class.
Subclasses implements the real focus changing functionality taking
into account the specific telescope architecture (VLT, NTT).


 

PUBLIC METHODS


mswCHANGE_FOCUS(mswMOD_LIST_MANAGER &listManager);
mswCHANGE_FOCUS(const dbSYMADDRESS   dbPoint,
                mswMOD_LIST_MANAGER &listManager);

  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.
  It prepares all the internal structures. It reads from the database
  the timeout value for the commands to be sent by means of internal
  object and installs the callbacks to process the replies.
  It computes from the mirrors position the current focus and saves
  this value in the database.


~mswCHANGE_FOCUS()

  Deletes all the internal structures created dynamically.


 virtual vltLOGICAL        CheckPresetToZenith();

  Checks if the telescope is pointing to zenith.
  Reads from the database the current altitude (with an indirect
  addressing) and compares this value with a range around zenith
  (90 deg).

 virtual vltINT32          CurrentFocus();

  Returns the current focus value as stored in the database.

 ccsCOMPL_STAT     RegisterCallbacks(evhOBJ_CALLBACK okCB,
                                     evhOBJ_CALLBACK errCB);

  Registers into the change focus object a success and an error
  callback, which have to be called respectively either when
  the change focus procedure has completed successfully or when
  any error occurred. By means of these callbacks the program
  flow comes back always under mswCONTROL_MAIN object control.

 vltDOUBLE GetFocusOffset(void);

 void SetFocusOffset(vltDOUBLE foffset);

 vltLOGICAL IsSelectIntrument(msgMESSAGE &msg);

 virtual ccsCOMPL_STAT CheckModeSwitchingState(vltINT32 actState,
                                               vltINT32 actSubState);

 virtual ccsCOMPL_STAT Execute(msgMESSAGE &msg) = 0;

  Pure virtual function. It is overridden by the corresponding
  function in the derived classes to implement the actual changing
  focus procedure.


 

PROTECTED METHODS


 virtual mswCHANGE_FOCUS  &CurrentFocus(vltINT32 currFoc);
  Stores the current focus value in the database.

 virtual ccsCOMPL_STAT     ReadMirrorsPos(vltINT32 *currFoc);
  Computes the current focus by reading the mirrors positions.
  Here only a default dummy implementation is provided, returning
  always the initial focus defined in mswDefines.h by
  mswSTARTING_FOCUS.
  Every subclass should provide a proper implementation.

 

PROTECTED DATA MEMBERS


 mswFOCUS             focus;
    Standard focur access object.

 mswMOD_LIST_MANAGER &modListManager;
    List manager object, used when accessing the msw database table.

 msgMESSAGE           chFocusMsg;
    Message object to store received command in order to return
    reply to the sender from the callbacks.

 evhDB_CMD_SERIAL    *M3Cmd;
    Command object to send commands to M3 subsystem.

 msgMESSAGE           M3Msg;
    Message object to store command to M3 subsystem.

 evhOBJ_CALLBACK      chFocusOkCB;
    Callback function object to store the pointer to the
    mswCONTROL_MAIN method, which is called when the change focus
    procedure has completed successfully.

 evhOBJ_CALLBACK      chFocusErrorCB;
    Callback function object to store the pointer to the
    mswCONTROL_MAIN method, which is called when an error
    occurred during the change focus procedure.

 

ON LINE DATABASE


The following database branch in the preset structure pertains
to the instance of mswCHANGE_FOCUS:

  CLASS evhDB_TASK mswCHANGE_FOCUS
 

BEGIN


        ATTRIBUTE INT32             currentFocus
        ATTRIBUTE BYTES256          altAddr
        ATTRIBUTE INT32             M3CmdTimeout
        ATTRIBUTE evhDB_CMD_SERIAL  M3Cmd
 

ENVIRONMENT


  TCS_DBPOINT - TCs default database root point

 

SEE ALSO


evhDB_TASK(4), tcsDbRoot(4)



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PROTECTED DATA MEMBERS
ON LINE DATABASE
BEGIN
ENVIRONMENT
SEE ALSO

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

Definition at line 44 of file mswCHANGE_FOCUS.h.


Constructor & Destructor Documentation

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

Definition at line 253 of file mswCHANGE_FOCUS.C.

mswCHANGE_FOCUS::~mswCHANGE_FOCUS (  ) 

Definition at line 264 of file mswCHANGE_FOCUS.C.


Member Function Documentation

virtual ccsCOMPL_STAT mswCHANGE_FOCUS::CheckModeSwitchingState ( vltINT32  actState,
vltINT32  actSubState 
) [pure virtual]
ccsCOMPL_STAT mswCHANGE_FOCUS::CheckPresetToZenith ( vltLOGICAL *  zenith  )  [protected, virtual]
mswCHANGE_FOCUS & mswCHANGE_FOCUS::CurrentFocus ( vltINT32  currFoc  )  [protected, virtual]

Definition at line 340 of file mswCHANGE_FOCUS.C.

References mswFOCUS::CurrentFocus(), focus, and mswFocusNameMap.

vltINT32 mswCHANGE_FOCUS::CurrentFocus (  )  [virtual]
virtual ccsCOMPL_STAT mswCHANGE_FOCUS::Execute ( msgMESSAGE &  msg  )  [pure virtual]
vltDOUBLE mswCHANGE_FOCUS::GetFocusOffset ( void   )  [inline]

Definition at line 22 of file mswCHANGE_FOCUS.icc.

References focusOffset.

ccsCOMPL_STAT mswCHANGE_FOCUS::Init (  )  [virtual]
ccsCOMPL_STAT mswCHANGE_FOCUS::ReadMirrorsPos ( vltINT32 *  currFoc  )  [protected, virtual]

Reimplemented in mswCHANGE_FOCUS_NTT, and mswCHANGE_FOCUS_VLT.

Definition at line 359 of file mswCHANGE_FOCUS.C.

References mswUNDEFINED_FOCUS.

Referenced by Init().

ccsCOMPL_STAT mswCHANGE_FOCUS::RegisterCallbacks ( evhOBJ_CALLBACK  okCB,
evhOBJ_CALLBACK  errCB 
)

Definition at line 303 of file mswCHANGE_FOCUS.C.

References chFocusErrorCB, and chFocusOkCB.

Referenced by mswCONTROL_MAIN::Init().

void mswCHANGE_FOCUS::SetFocusOffset ( vltDOUBLE  offset  )  [inline]

Definition at line 25 of file mswCHANGE_FOCUS.icc.

References focusOffset.

Referenced by mswCONTROL_MAIN::TcsChangeFocusCB().


Member Data Documentation

Definition at line 57 of file mswCHANGE_FOCUS.class.

BYTES256 mswCHANGE_FOCUS::altAddr [private]

Definition at line 56 of file mswCHANGE_FOCUS.class.

Referenced by CheckPresetToZenith().

evhOBJ_CALLBACK mswCHANGE_FOCUS::chFocusErrorCB [protected]
msgMESSAGE mswCHANGE_FOCUS::chFocusMsg [protected]
evhOBJ_CALLBACK mswCHANGE_FOCUS::chFocusOkCB [protected]
INT32 mswCHANGE_FOCUS::currentFocus = 0 [private]

Definition at line 54 of file mswCHANGE_FOCUS.class.

Referenced by CurrentFocus(), Init(), and mswCHANGE_FOCUS_NTT::M3CmdOkCB().

Definition at line 73 of file mswCHANGE_FOCUS.h.

Referenced by CurrentFocus(), and mswCHANGE_FOCUS_VLT::ReadMirrorsPos().

vltDOUBLE mswCHANGE_FOCUS::focusOffset [protected]

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