Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

PublisherNew.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00020 /*
00021  * $Log: PublisherNew.h,v $
00022  * Revision 1.2  2007/01/06 18:00:54  n-ando
00023  * Some trivial fixes.
00024  *
00025  * Revision 1.1  2006/11/27 09:44:49  n-ando
00026  * The first commitment.
00027  *
00028  */
00029 
00030 #ifndef PublisherNew_h
00031 #define PublisherNew_h
00032 
00033 #include <ace/Task.h>
00034 #include <ace/Synch.h>
00035 #include <rtm/PublisherBase.h>
00036 
00037 namespace RTC
00038 {
00039   class InPortConsumer;
00040   class Properties;
00050   class PublisherNew
00051     : public PublisherBase,
00052       public ACE_Task<ACE_MT_SYNCH>
00053   {
00054   public:
00062     PublisherNew(InPortConsumer* consumer,
00063                  const Properties& property);
00064 
00072     virtual ~PublisherNew();
00073 
00081     virtual void update();
00082 
00096     virtual int svc(void);
00097 
00111     virtual int open(void *args);
00112 
00126     virtual void release();
00127 
00128   protected:
00129     
00130   private:
00131     InPortConsumer* m_consumer;
00132     bool m_running;
00133     unsigned long m_usec;
00134 
00135     // NewData condition struct
00136     struct NewData
00137     {
00138       NewData() : _cond(_mutex), _updated(false) {};
00139       ACE_Thread_Mutex _mutex;
00140       ACE_Condition<ACE_Thread_Mutex> _cond;
00141       bool _updated;
00142 
00143     };
00144     
00145     // A condition variable for data update notification 
00146     NewData m_data;
00147   };
00148  
00149 };     // namespace RTC
00150 #endif // PublisherNew_h
00151 

Generated on Mon Jan 15 12:15:35 2007 for OpenRTM by  doxygen 1.4.1