MTDistributedCycledAnalogMsgDispatcher.h

Go to the documentation of this file.
00001 #ifndef MTDistributedCycledAnalogMsgDispatcher_H_
00002 #define MTDistributedCycledAnalogMsgDispatcher_H_
00003 
00004 #include "DistributedAnalogMessageDispatcher.h"
00005 #include "DistributedCycledAnalogMsgDispatcher.h"
00006 #include "ThreadPool.h"
00007 
00008 class DistributedCycledAnalogMessagesDispatchJob : public ThreadPoolJob
00009 {
00010 public:
00011     DistributedCycledAnalogMessagesDispatchJob(DistributedCycledAnalogMsgDispatcher
00012                                                                                 *cycledAnalogMsgDispatcher)
00013                                                         : _cycledAnalogMsgDispatcher(cycledAnalogMsgDispatcher)
00014     {}
00015 
00016     virtual void start()
00017     {
00018         _cycledAnalogMsgDispatcher->dispatchDelayerCycledIncomingAnalogMsgs();
00019     }
00020 
00021 protected:
00022     DistributedCycledAnalogMsgDispatcher * _cycledAnalogMsgDispatcher;
00023 };
00024 
00025 
00026 class MTDistributedCycledAnalogMsgDispatcher : public DistributedCycledAnalogMsgDispatcher
00027 {
00028 public:
00029 
00030     MTDistributedCycledAnalogMsgDispatcher(ThreadPool &thrPool,
00031                                        vector< DistributedAnalogMessageDispatcher *> & stCycledAnalogDispatchers);
00032 
00033     virtual ~MTDistributedCycledAnalogMsgDispatcher();
00034 
00035     virtual void dispatchDelayerCycledIncomingAnalogMsgs();
00036     
00037 protected:
00038         ThreadPool &thr_pool;
00039         vector< DistributedCycledAnalogMessagesDispatchJob > jobs;    
00040 };
00041 
00042 #endif /*MTDistributedCycledAnalogMsgDispatcher_H_*/

Generated on Wed Jul 9 16:34:38 2008 for PCSIM by  doxygen 1.5.5