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

RtcOutPortBase.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00021 #ifndef __RtcOutPortBase_h__
00022 #define __RtcOutPortBase_h__
00023 
00024 #include <list>
00025 #include <ace/Task.h>
00026 
00027 #include "rtm/RTC.h"
00028 #include "rtm/idl/RTCDataTypeSkel.h"
00029 #include "rtm/idl/RTCOutPortSkel.h"
00030 #include "rtm/idl/RTCOutPortStub.h"
00031 #include "rtm/RtcInPortBase.h"
00032 #include "rtm/RtcRingBuffer.h"
00033 
00034 
00035 namespace RTM {
00036   class SubscriberBase;
00037   using namespace std;
00038 
00060   class OutPortBase :
00061         public POA_RTM::OutPort,
00062         public PortableServer::RefCountServantBase
00063   {
00064   public:
00079         OutPortBase(){};
00080 
00095         virtual ~OutPortBase(){};
00096 
00097         //============================================================
00098         // CORBA interfaces.
00099         //============================================================
00111         virtual CORBA::Any* get() throw (CORBA::SystemException) = 0;
00112 
00114         //      virtual CORBA::TypeCode_ptr port_type();
00115 
00127         virtual RtmRes subscribe(InPort_ptr in_port, SubscriptionID_out id,
00128                                                          const SubscriberProfile &profile)
00129           throw (CORBA::SystemException);
00130 
00142         virtual RtmRes unsubscribe(const char* id) throw (CORBA::SystemException);
00143 
00155         virtual InPortList* inports() throw (CORBA::SystemException);
00156 
00168         virtual PortProfile* profile() throw (CORBA::SystemException);
00169 
00170         // End of CORBA interfaces
00171         //============================================================
00172 
00184         //      virtual RtmRes push(const InPort_ptr& inport, SubscriptionID subsid) = 0;
00185         virtual RtmRes push(const InPort_ptr& inport, std::string& subsid) = 0;
00186 
00198         virtual void updateall();
00199 
00211         virtual void disconnect_all();
00212 
00224         virtual const char* name() {return m_Profile.name;};
00225 
00242         virtual void write_pm() = 0;
00243 
00244 
00245   protected:
00246         virtual RtmRes unsubscribeNoLocked(const char* id);
00247 
00255         //      list<SubscriberBase*> m_Subscribers;
00256         struct Subscribers
00257         {
00258           ACE_Thread_Mutex m_Mutex;
00259           list<SubscriberBase*> m_List;
00260         };
00261         Subscribers m_Subscribers;
00262           
00263 
00271         PortProfile m_Profile;
00272 
00273   };
00274 
00275 
00276   
00277 }; // End of namespace RTM
00278 
00279 #endif // End of ifndef __RtcOutPortBase_h__

Generated on Wed Apr 6 14:22:22 2005 for OpenRTM by doxygen 1.3.6