00001 #ifndef tcsSELF_CMD_H
00002 #define tcsSELF_CMD_H
00003
00004
00005
00006
00007
00008
00009
00010
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 <fndSTRING.h>
00023 #include <evhCALLBACK.h>
00024 #include <evhOBJ_CALLBACK.h>
00025 #include <evhTASK.h>
00026 #include <evhCOMMAND.h>
00027
00028 #include <tcsCMD_HANDLER.h>
00029
00030 class tcsSELF_CMD : private evhCOMMAND
00031 {
00032 public:
00033 tcsSELF_CMD();
00034 ~tcsSELF_CMD();
00035 ccsCOMPL_STAT SetCmdHandler(tcsCMD_HANDLER *handler, const char *description = "");
00036 ccsCOMPL_STAT SetReplyHandler(evhCALLBACK &cb);
00037 ccsCOMPL_STAT SetErrorHandler(evhCALLBACK &cb);
00038 ccsCOMPL_STAT Send(msgCMD cmdName, const char *format, ...);
00039 ccsCOMPL_STAT Reset();
00040 const char *Command() const;
00041 vltLOGICAL IsActive();
00042
00043 protected:
00044 evhCB_COMPL_STAT ReplyCB(msgMESSAGE &msg, void *);
00045 evhCB_COMPL_STAT ErrorCB(msgMESSAGE &msg, void *);
00046
00047 private:
00048 fndSTRING description;
00049 tcsCMD_HANDLER *cmdHandler;
00050 evhCALLBACK *userReplyCB;
00051 evhCALLBACK *userErrorCB;
00052 };
00053
00054 #endif // !tcsSELF_CMD_H