00001 #ifndef tcsCMD_PARALLEL_H
00002 #define tcsCMD_PARALLEL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __cplusplus
00021 #error This is a C++ include file and cannot be used from plain C
00022 #endif
00023
00024
00025
00026
00027 #include <eccsErr.h>
00028 #include <evhOBJ_CALLBACK.h>
00029 #include <evhCOMMAND.h>
00030 #include <evhTASK.h>
00031 #include <fndLIST.h>
00032
00033
00034
00035
00036 #include "tcs.h"
00037 #include "tcsCMD_HANDLER.h"
00038
00039 class tcsCMD_PARALLEL : public evhSIMPLE_TASK
00040 {
00041 public:
00042 tcsCMD_PARALLEL();
00043 virtual ~tcsCMD_PARALLEL();
00044
00045 virtual ccsCOMPL_STAT SetCompletedCB(evhCALLBACK &cb);
00046 virtual ccsCOMPL_STAT SetErrorCB(evhCALLBACK &cb);
00047
00048 virtual ccsCOMPL_STAT SetTimeoutCB(evhCALLBACK &cb, const ccsTIMEVAL &timeout);
00049 virtual ccsCOMPL_STAT SetTimeout(const ccsTIMEVAL &timeout);
00050 virtual ccsTIMEVAL GetTimeout() const;
00051
00052 virtual ccsCOMPL_STAT AddMessage(const msgMESSAGE &msg);
00053 virtual ccsCOMPL_STAT Send();
00054
00055 virtual ccsCOMPL_STAT Reset();
00056 virtual ccsCOMPL_STAT Init();
00057 virtual const vltLOGICAL GetStatus() const;
00058
00059 virtual const vltINT32 GetNumCmds() const;
00060 virtual const vltINT32 GetNumWait() const;
00061
00062 protected:
00063 virtual const fndLIST &GetCmdList() const;
00064 virtual ccsCOMPL_STAT RunCompleted(const msgMESSAGE &);
00065 virtual ccsCOMPL_STAT RunError(const msgMESSAGE &);
00066
00067 virtual evhCB_COMPL_STAT ReplyCB(msgMESSAGE &, void *);
00068 virtual evhCB_COMPL_STAT ErrReplyCB(msgMESSAGE &, void *);
00069 virtual evhCB_COMPL_STAT TimeoutCB(msgMESSAGE &, void *);
00070
00071 private:
00072 vltINT32 numWait;
00073 ccsTIMEVAL timeout;
00074
00075 vltINT32 numCmds;
00076 fndLIST cmdList;
00077 fndLIST msgList;
00078
00079 evhCALLBACK *completedCB;
00080 evhCALLBACK *errorCB;
00081 evhCALLBACK *timeoutCB;
00082 };
00083
00084 #endif // !tcsCMD_PARALLEL_H