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

tcsCMD_PARALLEL.h

Go to the documentation of this file.
00001 #ifndef tcsCMD_PARALLEL_H
00002 #define tcsCMD_PARALLEL_H
00003 /******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: tcsCMD_PARALLEL.h,v 1.136 2003/11/27 15:10:06 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  --------------------------------------------------------
00010 * rkarban 2002-02-03 created
00011 */
00012 
00013 /******************************************************************************
00014  * Declaration of the tcsCMD_PARALLEL class. This class serves to send a list
00015  * of commands in parallel (various commands to various targets) and collect
00016  * all the replies.
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  * eccs and evh includes
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  * module includes
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;        // number of replies still pending
00073     ccsTIMEVAL   timeout;        // overall timeout on waiting for replies
00074 
00075     vltINT32     numCmds;        // number of commands handled in parallel
00076     fndLIST      cmdList;        // list of commands handled in parallel
00077     fndLIST      msgList;        // list of msg handled in parallel
00078 
00079     evhCALLBACK *completedCB;    // user defined reply handler
00080     evhCALLBACK *errorCB;        // user defined error reply handler
00081     evhCALLBACK *timeoutCB;      // user defined timeout handler
00082 };
00083 
00084 #endif // !tcsCMD_PARALLEL_H

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