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

agwsCON_ADAPTER.h

Go to the documentation of this file.
00001 #ifndef agwsCON_ADAPTER_H
00002 #define agwsCON_ADAPTER_H
00003 /******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: agwsCON_ADAPTER.h,v 1.182 2003/11/12 08:34:08 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  --------------------------------------------------------
00010 * gchiozzi 2001-03-10 Some fixex to documentation
00011 * tcsmgr 2001-03-08 Added ProbeAbsRstCB.
00012 * gchiozzi 2000-08-30 Added to LoadSearchCrit() min and max search radius
00013 * gchiozzi 2000-07-27 Added agwsCON_SERVER to constructors and as member.
00014 * mkiekebu  01/07/99  command handling for command OFFSGP added
00015 * rkarban  31/10/98  add methods for handling adrot events
00016 * rkarban  31/10/98  add insdataMonitor callback and object
00017 * rkarban  25/07/98  add timer for polling probe position
00018 * gchiozzi  20/07/98  Added OFFSADG command handling
00019 * rkarban  05/05/98  add attribute adOffset to store msg of OFFSAD
00020 * gchiozzi  28/11/97  Replaced pointer to gsCatalogue with reference.
00021 * gchiozzi  28/10/97  Removed NTT/VLT ifdefs.
00022 * gchiozzi  28/10/97  Added CheckProbePos() method.
00023 * gchiozzi  19/10/97  Removed private member adapterCmd. Not used.
00024 * gchiozzi  19/10/97  Removed private members agwsConCheck and agwsConServer.
00025 * gchiozzi  19/10/97  Removed ProbeAbs() method. Merged with ProbeAbsCB().
00026 * gchiozzi  19/10/97  Added new ProbeCmdSend protected method.
00027 * gchiozzi  09/10/97  Changed all callbacks to get the agwsCMD_HANDLER in the udata
00028 * gchiozzi  02/10/97  Now subclass of evhDB_TASK and not any more of evhSIMPLE_TASK
00029 * gchiozzi  01/08/97  Changed prototype for ProbeGsCB
00030 * tphan     17/10/96  add NTT probe (thanks to rabuter)
00031 * nfiebig   26/07/96  added STOP command handler and call-back
00032 * nfiebig   05/06/96  implemented
00033 * gchiozzi  29/02/96  created
00034 */
00035 
00036 /******************************************************************************
00037  * Declaration of the agwsCON_ADAPTER class. This is the generic class for
00038  * interfacing to the adapter/guide-probe sub-system. There exist two 
00039  * polymorphic sub-classes ..._VLT and ..._NTT to overload the specific 
00040  * features of the VLT or NTT, resp.
00041  *-----------------------------------------------------------------------------
00042  */
00043 
00044 #ifndef __cplusplus
00045 #error This is a C++ include file and cannot be used from plain C
00046 #endif
00047 
00048 #include "math.h"
00049 extern "C" {
00050 #include "tcsVcc.h"
00051 #include "slalib.h"
00052 #include "slamac.h"
00053 }
00054 #include "agws.h"
00055 #include "agwsCON_CAT.h"
00056 #include "agwsCON_CHECK.h"
00057 #include "agwsCON_SERVER.h"
00058 #include "agwsCON_SETUP.h"
00059 #include "agwsCMD_HANDLER.h"
00060 #include "agwsTRANSFER.h"
00061 
00062 #include "evhDB_TASK.h"
00063 #include "evhCOMMAND.h"
00064 #include "evhSTD_COMMANDS.h"
00065 #include "mswMOD_LIST.h"
00066 #include "mswINS_DATA_MONITOR.h"
00067 
00068 class agwsCON_ADAPTER : public evhDB_TASK
00069 {
00070   public:
00071     agwsCON_ADAPTER(const dbSYMADDRESS  dbPoint, agwsCON_CAT &gsCat, agwsCON_SERVER &agServer);
00072     agwsCON_ADAPTER(const dbSYMADDRESS  dbPoint, agwsCON_CAT &gsCat, agwsCON_SERVER &agServer,
00073         agwsCON_SETUP *gsSetup);
00074     virtual ~agwsCON_ADAPTER();
00075     virtual ccsCOMPL_STAT Init();
00076     virtual ccsCOMPL_STAT Reset();
00077 
00078     virtual evhCB_COMPL_STAT ProbeAbsCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00079     virtual evhCB_COMPL_STAT ProbeAbsRstCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00080     virtual evhCB_COMPL_STAT ProbeCheckCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00081     virtual evhCB_COMPL_STAT ProbeCenterCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00082     virtual evhCB_COMPL_STAT ProbeDObjCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00083     virtual evhCB_COMPL_STAT ProbeGsCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00084     virtual evhCB_COMPL_STAT ProbeParkCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00085     virtual evhCB_COMPL_STAT OffsetAdCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00086     virtual evhCB_COMPL_STAT OffsetGpCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);   
00087     virtual evhCB_COMPL_STAT OffsetXyCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00088     virtual evhCB_COMPL_STAT OffsetAdgCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00089     virtual evhCB_COMPL_STAT StartManCorrCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00090     virtual evhCB_COMPL_STAT StopManCorrCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00091     virtual evhCB_COMPL_STAT ProbeStopCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00092 
00093     virtual evhCB_COMPL_STAT GeneralReplyCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00094     virtual evhCB_COMPL_STAT GeneralErrorCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00095 
00096     virtual evhCB_COMPL_STAT OffsetAdGpOkCB(msgMESSAGE &msg, void *udata);
00097 
00098     virtual evhCB_COMPL_STAT OffsetGpReplyCB(msgMESSAGE &msg, void *udata);
00099     virtual evhCB_COMPL_STAT OffsetGpErrorCB(msgMESSAGE &msg, void *udata);
00100     virtual evhCB_COMPL_STAT OffsetGpStepCB(evtEVENT_MSG &msg,  void *udata);
00101 
00102 
00103     virtual evhCB_COMPL_STAT OffsetAdgStopOkCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00104     virtual evhCB_COMPL_STAT OffsetAdgReplyCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00105 
00106     virtual evhCB_COMPL_STAT GpInPosOkCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00107     virtual evhCB_COMPL_STAT GpInPosErrorCB(msgMESSAGE &msg, agwsCMD_HANDLER &handler);
00108 
00109     virtual vltLOGICAL       CheckProbePos(vltDOUBLE  alpha,
00110              vltDOUBLE  delta,
00111              vltLOGICAL usedMargin,
00112              vltDOUBLE  rotAngle   );
00113 
00114     virtual ccsCOMPL_STAT    StopOffsAdg();
00115 
00116     virtual ccsCOMPL_STAT    GetProbeMagicScaleDB(vltDOUBLE *scaleX,
00117               vltDOUBLE *scaleY);
00118     virtual ccsCOMPL_STAT EnableAdRotEvents();
00119     virtual ccsCOMPL_STAT DisableAdRotEvents();
00120 
00121     virtual ccsCOMPL_STAT UpdateVignettingLimits();
00122 
00123  protected:
00124     virtual ccsCOMPL_STAT ProbeCmdSend (const msgCMD     cmd,
00125           const char      *buffer,
00126           ccsTIMEVAL       timeout,
00127           agwsCMD_HANDLER &handler,
00128           vltINT32 startState = agwsSTATE_OPERATING,
00129           vltINT32 endState = agwsSTATE_IDLE);
00130     virtual ccsCOMPL_STAT LoadSearchCrit(vltDOUBLE *minMag, vltDOUBLE *maxMag,
00131          vltDOUBLE *minRad, vltDOUBLE *maxRad,
00132                                  char *vignettingLimit);
00133 
00134     virtual evhCB_COMPL_STAT InsDataChangedCB(msgMESSAGE &msg, void *);
00135     virtual ccsCOMPL_STAT EvtRegister(evtEVENT *evt, const char *dbAttr, 
00136            evhCB_METHOD DbEventCB, evtFILTER filter = evtANY_WRITE);
00137     virtual ccsCOMPL_STAT EvtDetach(evtEVENT *evt, evhCB_METHOD DbEventCB);
00138 
00139     agwsCMD_HANDLER  prAbsCmdHandler;   // PRABS command handler
00140     agwsCMD_HANDLER  prChkCmdHandler;   // PRCHK command handler
00141     agwsCMD_HANDLER  prCntCmdHandler;   // PRCNT command handler
00142     agwsCMD_HANDLER  prDObjCmdHandler;  // PRDOBJ command handler
00143     agwsCMD_HANDLER  prGsCmdHandler;    // PRGS command handler
00144     agwsCMD_HANDLER  prParkCmdHandler;  // PRPARK command handler
00145     agwsCMD_HANDLER  offsAdCmdHandler;  // OFFSAD command handler
00146     agwsCMD_HANDLER  offsGpCmdHandler;  // OFFSGP command handler
00147     agwsCMD_HANDLER  offsAdgCmdHandler; // OFFSADG command handler
00148     agwsCMD_HANDLER  offsXyCmdHandler;  // OFFSXY command handler
00149     agwsCMD_HANDLER  startMcCmdHandler; // STARTMC command handler
00150     agwsCMD_HANDLER  stopMcCmdHandler;  // STOPMC command handler
00151     agwsCMD_HANDLER  prStopCmdHandler;  // PRSTOP command handler
00152 
00153     agwsTRANSFER     probeCmd;          // transfer command to move probe
00154     agwsTRANSFER     checkCmd;          // transfer command to check probe
00155     agwsTRANSFER     trkoffCmd;         // transfer command to trkws for offset
00156     agwsTRANSFER     gpInPosCmd;         // transfer command to ad for probe in position
00157 
00158     agwsCON_CAT     &gsCatalogue;       // internal guide-star catalogue
00159     agwsCON_SERVER  &agServer;          // reference to AG server
00160     agwsCON_SETUP   *gsSetupObj;        // internal handling setup values
00161 
00162     ccsTIMEVAL       prAbsTimeout;      // PRABS transfer command timeout
00163     ccsTIMEVAL       prChkTimeout;      // PRCHK transfer command timeout
00164     ccsTIMEVAL       prCntTimeout;      // PRCNT transfer command timeout
00165     ccsTIMEVAL       prParkTimeout;     // PRDOBJ transfer command timeout
00166     ccsTIMEVAL       offsAdTimeout;     // OFFSAD transfer command timeout
00167     ccsTIMEVAL       offsAdgTimeout;    // OFFSADG transfer command timeout
00168     ccsTIMEVAL       offsXyTimeout;     // OFFSXY transfer command timeout
00169     ccsTIMEVAL       startMcTimeout;    // STARTMC transfer command timeout
00170     ccsTIMEVAL       stopMcTimeout;     // STOPMC transfer command timeout
00171     ccsTIMEVAL       gpInPosTimeout;    // GPINPOS transfer command timeout
00172 
00173     vltLOGICAL       alreadyGuiding;
00174     msgMESSAGE       adOffset;
00175     evhCOMMAND       offsadCmd;
00176     evhCOMMAND       offsadGpCmd;
00177     mswINS_DATA_MONITOR insConfigData;       
00178     evtEVENT         evtOffsAlpha;
00179 
00180 private:    
00181 };
00182 
00183 #endif // !agwsCON_ADAPTER_H
00184 
00185 // __oOo__

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