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

pomINSTALL_MAIN_TASK.h

Go to the documentation of this file.
00001 #ifndef pomINSTALL_MAIN_TASK_H
00002 #define pomINSTALL_MAIN_TASK_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: pomINSTALL_MAIN_TASK.h,v 1.69 2003/09/17 16:04:58 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  ----------------------------------------------
00010 * pglaves  04/04/96  created
00011 */
00012 
00013 /************************************************************************
00014  *
00015  *----------------------------------------------------------------------
00016  */
00017 
00018 #ifndef __cplusplus
00019 #error This is a C++ include file and cannot be used from plain C
00020 #endif
00021 
00022 #include "pom.h"
00023 
00024 class pomINSTALL_MAIN_TASK : public tcsSTATE
00025 {
00026   public:
00027     pomINSTALL_MAIN_TASK(const dbSYMADDRESS  dbPoint);
00028    ~pomINSTALL_MAIN_TASK();
00029 
00030     // Standard commands' callbacks.
00031     evhCB_COMPL_STAT StopCB(msgMESSAGE &msg, void *);
00032     evhCB_COMPL_STAT OnlineCB(msgMESSAGE &msg, void *);
00033     evhCB_COMPL_STAT StandbyCB(msgMESSAGE &msg, void *);
00034     evhCB_COMPL_STAT OffCB(msgMESSAGE &msg, void *);
00035     evhCB_COMPL_STAT StatusCB(msgMESSAGE &msg, void *udata);
00036     
00037     // Callbacks for the new commands
00038     virtual evhCB_COMPL_STAT InstalaCB(msgMESSAGE &msg, void *);
00039     virtual evhCB_COMPL_STAT InstalbCB(msgMESSAGE &msg, void *);
00040     virtual evhCB_COMPL_STAT InstacaCB(msgMESSAGE &msg, void *);
00041     virtual evhCB_COMPL_STAT InstacoCB(msgMESSAGE &msg, void *);
00042         
00043     virtual evhCB_COMPL_STAT LoadmodCB(msgMESSAGE &msg, void *);   
00044     virtual evhCB_COMPL_STAT MergeCB(msgMESSAGE &msg, void *);
00045     virtual evhCB_COMPL_STAT TargetCB(msgMESSAGE &msg, void *);
00046     
00047     ccsCOMPL_STAT    Recover();
00048 
00049     // Callbacks for trk's Loadmod command
00050     virtual evhCB_COMPL_STAT TrkReplyCB(msgMESSAGE &msg, void *);
00051     virtual evhCB_COMPL_STAT TrkErrorCB(msgMESSAGE &msg, void *);
00052     virtual evhCB_COMPL_STAT TrkTimeoutCB(msgMESSAGE &msg, void *);
00053 
00054 protected:
00055     tcsCMD_HANDLER *instalaHandler;
00056     // Overloading of inherited commands
00057     virtual evhCB_COMPL_STAT ExitCB(msgMESSAGE &msg, void *udata);
00058     virtual evhCB_COMPL_STAT InitCB(msgMESSAGE &msg, void *udata);
00059 
00060     
00061     ccsCOMPL_STAT    Stop();
00062     ccsCOMPL_STAT    Init();
00063     ccsCOMPL_STAT    SwitchOff();
00064 
00065     ccsCOMPL_STAT    SendErrReplyCheck(tcsCMD_HANDLER& h) const {
00066   if (h.SendReply(ErrStack()) == FAILURE) {
00067       ErrAdd(tcsMOD,tcsERR_SEND_OK_REPLY,__FILE_LINE__,"");
00068       ErrStackClose();    // LOG the problem
00069       return FAILURE;
00070   }
00071   return SUCCESS;
00072     };
00073     
00074     ccsCOMPL_STAT    SendReplyCheck(tcsCMD_HANDLER& h, 
00075             const char *buff, const int len=0, 
00076             const vltLOGICAL last=ccsTRUE) {
00077   if (h.SendReply(buff,len,last) == FAILURE) {
00078       ErrAdd(tcsMOD,tcsERR_SEND_OK_REPLY,__FILE_LINE__,"");
00079       ErrStackClose();    // LOG the problem
00080       return FAILURE;
00081   }
00082   return SUCCESS;
00083     };
00084 
00085 
00086     void installModel(tcsCMD_HANDLER &h, msgMESSAGE &msg,
00087           const char *filename, const char *label);
00088 private:
00089      dbSYMADDRESS       dbPoint;
00090     // path to where pointing files are
00091     char pointDir[256]; 
00092 
00093     // Standard commands.
00094     tcsCMD_HANDLER    *initHandler;    // INIT command handler
00095     tcsCMD_HANDLER    *exitHandler;    // EXIT command handler
00096     tcsCMD_HANDLER    *stopHandler;    // STOP command handler
00097     tcsCMD_HANDLER    *onlineHandler;  // ONLINE command handler
00098     tcsCMD_HANDLER    *standbyHandler; // STANDBY command handler
00099     tcsCMD_HANDLER    *offHandler;     // OFF command handler
00100     tcsCMD_HANDLER    *statusHandler;  // STATUS command handler
00101 
00102     // pomINSTALL specific commands.
00103     tcsCMD_HANDLER *instalbHandler;
00104     tcsCMD_HANDLER *instacaHandler;
00105     tcsCMD_HANDLER *instacoHandler;
00106     tcsCMD_HANDLER *loadmodHandler;
00107     tcsCMD_HANDLER *mergeHandler;
00108     tcsCMD_HANDLER *targetHandler;
00109 
00110     evhCOMMAND    command;  // to send commands to trk
00111 };
00112 
00113 
00114 #endif 

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