OutPortCorbaCdrProvider.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_OUTPORTCORBACDRPROVIDER_H
21 #define RTC_OUTPORTCORBACDRPROVIDER_H
22 
23 #include <rtm/idl/DataPortSkel.h>
24 #include <rtm/BufferBase.h>
25 #include <rtm/OutPortProvider.h>
26 #include <rtm/CORBA_SeqUtil.h>
27 #include <rtm/Manager.h>
28 #include <rtm/ConnectorListener.h>
29 #include <rtm/ConnectorBase.h>
30 
31 #ifdef WIN32
32 #pragma warning( disable : 4290 )
33 #endif
34 
35 namespace RTC
36 {
62  : public OutPortProvider,
63  public virtual ::POA_OpenRTM::OutPortCdr,
64  public virtual PortableServer::RefCountServantBase
65  {
66  public:
81 
95  virtual ~OutPortCorbaCdrProvider(void);
96 
124  virtual void init(coil::Properties& prop);
125 
151  virtual void setBuffer(CdrBufferBase* buffer);
152 
197  virtual void setListener(ConnectorInfo& info,
198  ConnectorListeners* listeners);
199 
224  virtual void setConnector(OutPortConnector* connector);
225 
243  virtual ::OpenRTM::PortStatus get(::OpenRTM::CdrData_out data)
244  throw (CORBA::SystemException);
245 
246 
247  private:
255  ::OpenRTM::PortStatus convertReturn(BufferStatus::Enum status,
256  const cdrMemoryStream& data);
257 
258 
268  inline void onBufferRead(const cdrMemoryStream& data)
269  {
270  m_listeners->
271  connectorData_[ON_BUFFER_READ].notify(m_profile, data);
272  }
273 
283  inline void onSend(const cdrMemoryStream& data)
284  {
285  m_listeners->
286  connectorData_[ON_SEND].notify(m_profile, data);
287  }
288 
296  inline void onBufferEmpty()
297  {
298  m_listeners->
299  connector_[ON_BUFFER_EMPTY].notify(m_profile);
300  }
301 
309  inline void onBufferReadTimeout()
310  {
311  m_listeners->
312  connector_[ON_BUFFER_READ_TIMEOUT].notify(m_profile);
313  }
314 
322  inline void onSenderEmpty()
323  {
324  m_listeners->
325  connector_[ON_SENDER_EMPTY].notify(m_profile);
326  }
327 
335  inline void onSenderTimeout()
336  {
337  m_listeners->
338  connector_[ON_SENDER_TIMEOUT].notify(m_profile);
339  }
340 
348  inline void onSenderError()
349  {
350  m_listeners->
351  connector_[ON_SENDER_ERROR].notify(m_profile);
352  }
353 
354  private:
356  ::OpenRTM::OutPortCdr_var m_objref;
360  }; // class OutPortCorbaCdrProvider
361 }; // namespace RTC
362 
363 extern "C"
364 {
378  void OutPortCorbaCdrProviderInit(void);
379 };
380 
381 #ifdef WIN32
382 #pragma warning( default : 4290 )
383 #endif
384 
385 #endif // RTC_OUTPORTCORBACDRPROVIDER_H
ConnectorListeners class.
virtual void setConnector(OutPortConnector *connector)
set Connector
RT-Component.
void onSenderEmpty()
Notify an ON_SENDER_EMPTY event to listeners.
void onBufferRead(const cdrMemoryStream &data)
Notify an ON_BUFFER_READ event to listeners.
::OpenRTM::OutPortCdr_var m_objref
virtual ~OutPortCorbaCdrProvider(void)
Destructor.
void onSenderTimeout()
Notify an ON_SENDER_TIMEOUT event to listeners.
void OutPortCorbaCdrProviderInit(void)
Module initialization.
Enum
DataPortStatus return codes.
Definition: BufferStatus.h:84
::OpenRTM::PortStatus convertReturn(BufferStatus::Enum status, const cdrMemoryStream &data)
Return codes conversion.
RTComponent manager class.
void onSend(const cdrMemoryStream &data)
Notify an ON_SEND event to listeners.
virtual void init(coil::Properties &prop)
Initializing configuration.
Connector base class.
void onSenderError()
Notify an ON_SENDER_ERROR event to listeners.
void onBufferReadTimeout()
Notify an ON_BUFFER_READ_TIMEOUT event to listeners.
Buffer abstract class.
OutPortProvider class.
CORBA sequence utility template functions.
virtual void setListener(ConnectorInfo &info, ConnectorListeners *listeners)
Set the listener.
prop
Organization::get_organization_property ();.
virtual void setBuffer(CdrBufferBase *buffer)
Setting outside buffer&#39;s pointer.
Class represents a set of properties.
Definition: Properties.h:101
BufferBase abstract class.
Definition: BufferBase.h:104
connector listener class
void onBufferEmpty()
Notify an ON_BUFFER_EMPTY event to listeners.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:53