00001 #ifndef mswCHANGE_FOCUS_H 00002 #define mswCHANGE_FOCUS_H 00003 /******************************************************************************* 00004 * E.S.O. - VLT project 00005 * 00006 * "@(#) $Id: mswCHANGE_FOCUS.h,v 1.115 2003/11/12 14:33:34 vltsccm Exp $" 00007 * 00008 * who when what 00009 * -------- -------- ---------------------------------------------- 00010 * jargomed 21/02/98 Added focus offset setting 00011 * gchiozzi 14/01/97 Made virtual some more methods 00012 * nttmgr 08/12/96 Overloaded Init() method to read config data from DB 00013 * gchiozzi 31/10/96 Removed DEC95 sections 00014 * gchiozzi 05/07/96 modified to use mswFOCUS class 00015 * gchiozzi 10/05/96 Porting to JUN96 (activated commented sections) 00016 * mverola 03/04/96 Added methods and data to support change focus task 00017 * gchiozzi 30/03/95 created 00018 */ 00019 00020 /************************************************************************ 00021 * NOTE (03/04/96) mverola: 00022 * The name of this file has been changed from mswSWITCH_FOCUS.h 00023 * to mswCHANGE_FOCUS.h (see ../src/ChangeLog). 00024 *---------------------------------------------------------------------- 00025 */ 00026 00027 #ifndef __cplusplus 00028 #error This is a C++ include file and cannot be used from plain C 00029 #endif 00030 00031 #include "eccsErr.h" 00032 #include "evhDB_TASK.h" 00033 #include "evhDB_SYNC.h" 00034 00035 #include "evhDB_CMD_SERIAL.h" 00036 00037 #include "msw.h" 00038 #include "mswMOD_LIST_MANAGER.h" 00039 #include "mswEVAL_STATE.h" 00040 #include "mswFOCUS.h" 00041 00042 #include "tcsBASE.h" 00043 00044 class mswCHANGE_FOCUS : public evhDB_TASK 00045 { 00046 public: 00047 mswCHANGE_FOCUS(mswMOD_LIST_MANAGER &listManager); 00048 mswCHANGE_FOCUS(const dbSYMADDRESS dbPoint, 00049 mswMOD_LIST_MANAGER &listManager); 00050 ~mswCHANGE_FOCUS(); 00051 00052 // Pure virtual Execute method 00053 // It must be replaced by the corresponding method 00054 // in the derived class (NTT/VLT) 00055 virtual ccsCOMPL_STAT Execute(msgMESSAGE &msg) = 0; 00056 00057 ccsCOMPL_STAT RegisterCallbacks(evhOBJ_CALLBACK okCB, 00058 evhOBJ_CALLBACK errCB); 00059 virtual vltINT32 CurrentFocus(); 00060 00061 virtual ccsCOMPL_STAT Init(); 00062 00063 virtual ccsCOMPL_STAT CheckModeSwitchingState(vltINT32 actState, 00064 vltINT32 actSubState) = 0; 00065 00066 vltDOUBLE GetFocusOffset(void); 00067 void SetFocusOffset(vltDOUBLE offset); 00068 00069 protected: 00070 virtual mswCHANGE_FOCUS &CurrentFocus(vltINT32 currFoc); 00071 virtual ccsCOMPL_STAT ReadMirrorsPos(vltINT32 *currFoc); 00072 00073 virtual ccsCOMPL_STAT CheckPresetToZenith(vltLOGICAL *zenith); 00074 00075 protected: 00076 vltDOUBLE focusOffset; 00077 mswFOCUS focus; 00078 mswMOD_LIST_MANAGER &modListManager; 00079 00080 msgMESSAGE chFocusMsg; 00081 00082 evhOBJ_CALLBACK chFocusOkCB; 00083 evhOBJ_CALLBACK chFocusErrorCB; 00084 }; 00085 00086 #include "mswCHANGE_FOCUS.icc" 00087 00088 #endif