Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

trkwsFOCUS_DATA.h

Go to the documentation of this file.
00001 #ifndef trkwsFOCUS_DATA_H
00002 #define trkwsFOCUS_DATA_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: trkwsFOCUS_DATA.h,v 1.157 2003/10/17 14:00:43 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  ----------------------------------------------
00010 * gchiozzi  17/04/97  Added attribute for focus check time
00011 * rkarban  22/01/97  created
00012 */
00013 
00014 /************************************************************************
00015  *
00016  *----------------------------------------------------------------------
00017  */
00018 
00019 #define _POSIX_SOURCE 1
00020 #include "vltPort.h"
00021 
00022 #include "trkws.h"
00023 #include "ECCS.h"
00024 #include "eccsDB_ATTR.h"
00025 #include "eccsDB_TABLE.h"
00026 #include "evhTIMER.h"
00027 #include "trkwsSELF_CMD.h"
00028 #include "mswFOCUS.h"
00029 #include "mswINS_DATA_MONITOR.h"
00030 
00031 class trkwsFOCUS_RECORD : public eccsDB_TABLE_RECORD {
00032   public:
00033     vltBYTES20  focusName;
00034     vltBYTES256 rotAddress;
00035     vltBYTES256 adAddress;
00036     vltBYTES256 pomFile;
00037 
00038     ccsCOMPL_STAT Unpack( void *buffer );
00039     ccsCOMPL_STAT Pack( void *buffer );
00040 };
00041 
00042 class trkwsFOCUS_DATA : public fndOBJECT, public eccsERROR_CLASS
00043 {
00044   public:
00045     // Class constructor: here all the basic event handlers are installed
00046     trkwsFOCUS_DATA(const dbSYMADDRESS rootDbPoint, mswFOCUS &focus);
00047 
00048     // Class destructor: here everything is cleaned up
00049     ~trkwsFOCUS_DATA();
00050 
00051     ccsCOMPL_STAT  Init(const char *focusString, vltLOGICAL pollFocusIfNotReady = ccsTRUE);
00052     ccsCOMPL_STAT  SetReplyHandler(evhCALLBACK &cb);
00053     ccsCOMPL_STAT  SetErrorHandler(evhCALLBACK &cb);
00054     evhCALLBACK  *GetReplyHandler();
00055     evhCALLBACK  *GetErrorHandler();
00056 
00057     void ResetUserCBs ();
00058     void Reset ();
00059     ccsCOMPL_STAT UpdateFocus(evhCALLBACK *replyCB = NULL, evhCALLBACK *errorCB = NULL);
00060     ccsCOMPL_STAT UpdateRotator(evhCALLBACK *replyCB = NULL, evhCALLBACK *errorCB = NULL);
00061     ccsCOMPL_STAT UpdateOffAxisTracking(evhCALLBACK *replyCB = NULL, evhCALLBACK *errorCB = NULL);
00062     void ResetUpdateFocus();
00063     void ResetUpdateRotator();
00064     void ResetUpdateOax();
00065 
00066   protected:
00067     eccsDB_LOGICAL                   loadOnInit;
00068     eccsDB_TABLE<trkwsFOCUS_RECORD>  rotTable;
00069     eccsDB_STRING                    rotPosAddr;
00070     eccsDB_STRING                    adPosAddr;
00071     eccsDB_UINT32                    newpcmAlarm;
00072     eccsDB_UINT32                    setfocAlarm;
00073     eccsDB_UINT32                    setrotAlarm;
00074     eccsDB_UINT32                    setoaxAlarm;
00075     eccsDB_INT32                     checkTime;
00076     mswFOCUS                         &trkwsFocus;
00077 
00078   private:
00079     ccsCOMPL_STAT    _Init(const char *focusString);
00080     ccsCOMPL_STAT  ReadPOMFile (const char *fileName);
00081     evhCB_COMPL_STAT  NewpcmOKCB(msgMESSAGE &, void*);
00082     evhCB_COMPL_STAT  SetrotOKCB(msgMESSAGE &, void*);
00083     evhCB_COMPL_STAT  NewpcmErrorCB(msgMESSAGE &, void*);
00084     evhCB_COMPL_STAT  SetfocErrorCB(msgMESSAGE &, void*);
00085     evhCB_COMPL_STAT  SetrotErrorCB(msgMESSAGE &, void*);
00086     evhCB_COMPL_STAT  SetoaxErrorCB(msgMESSAGE &, void*);
00087     evhCB_COMPL_STAT  CheckFocusCB(msgMESSAGE &msg, void *);
00088     evhCB_COMPL_STAT  InsDataChangedCB(msgMESSAGE &msg, void *);
00089 
00090     mswINS_DATA_MONITOR insConfigData;
00091     char               pcmCmd[trkwsMAX_MSG_LEN];
00092     char               setfocCmd[trkwsMAX_MSG_LEN];
00093     char               setrotCmd[trkwsMAX_MSG_LEN];
00094     char               setoaxCmd[trkwsMAX_MSG_LEN];
00095     trkwsFOCUS_RECORD  focusFound;
00096     evhTIMER          *timer;
00097     char               oldFocusString[trkwsFOCUS_STRING_MAX_LEN];
00098     vltLOGICAL         checkFocus;
00099     trkwsSELF_CMD      newpcm;
00100     trkwsSELF_CMD      setfoc;
00101     trkwsSELF_CMD      setrot;
00102     trkwsSELF_CMD      setoax;
00103     evhCALLBACK       *userReplyCB;
00104     evhCALLBACK       *userErrorCB;
00105 };
00106 
00107 /* end class trkwsFOCUS_DATA */
00108 
00109 #endif
00110 
00111 
00112 

Generated on Wed Dec 3 14:52:23 2003 for ATCS API by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001