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

trkwsSELF_CMD.h

Go to the documentation of this file.
00001 #ifndef trkwsSELF_CMD_H
00002 #define trkwsSELF_CMD_H
00003 /******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: trkwsSELF_CMD.h,v 1.157 2003/10/17 14:00:44 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  --------------------------------------------------------
00010 * nfiebig   14/11/96  created
00011 */
00012 
00013 /******************************************************************************
00014  * Declaration of class trkwsSELF_CMD.
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 <fndSTRING.h>
00023 #include <evhCALLBACK.h>
00024 #include <evhOBJ_CALLBACK.h>
00025 #include <evhTASK.h>
00026 #include <evhCOMMAND.h>
00027 
00028 #define DELETE_OBJECT(object) do                        \
00029                                     {                     \
00030                                     if (object != NULL)   \
00031                                         {                 \
00032                                         delete object;    \
00033                                         object = NULL;    \
00034                                         }                 \
00035                                     } while (0)
00036 
00037 
00038 class trkwsSELF_CMD : public evhSIMPLE_TASK
00039 {
00040   public:
00041     trkwsSELF_CMD();
00042     ~trkwsSELF_CMD();
00043     ccsCOMPL_STAT SetReplyHandler(evhCALLBACK &cb);
00044     ccsCOMPL_STAT SetErrorHandler(evhCALLBACK &cb);
00045     ccsCOMPL_STAT Send(msgCMD cmdName, const char *format, ...);
00046     void ResetCBs();
00047     void Reset();
00048     vltLOGICAL IsActive();
00049   void SetDescription(const char *setdescription);
00050 
00051   protected:
00052     evhCB_COMPL_STAT ReplyCB(msgMESSAGE &msg, void *);
00053     evhCB_COMPL_STAT ErrorCB(msgMESSAGE &msg, void *);
00054 
00055   private:
00056     evhCOMMAND        command;      // command which sent internally
00057     fndSTRING         description;  // description of purpose for error logging
00058     evhCALLBACK      *userReplyCB;  // user's reply handler
00059     evhCALLBACK      *userErrorCB;  // user's error reply handler
00060 };
00061 
00062 #endif // !trkwsSELF_CMD_H

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