InPortCorbaCdrProvider.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_INPORTCORBACDRPROVIDER_H
21 #define RTC_INPORTCORBACDRPROVIDER_H
22 
23 #include <rtm/idl/DataPortSkel.h>
24 #include <rtm/BufferBase.h>
25 #include <rtm/InPortProvider.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 InPortProvider,
63  public virtual POA_OpenRTM::InPortCdr,
64  public virtual PortableServer::RefCountServantBase
65  {
66  public:
81 
95  virtual ~InPortCorbaCdrProvider(void);
96 
124  virtual void init(coil::Properties& prop);
125 
151  virtual void setBuffer(BufferBase<cdrMemoryStream>* buffer);
152 
201  virtual void setListener(ConnectorInfo& info,
202  ConnectorListeners* listeners);
203 
228  virtual void setConnector(InPortConnector* connector);
229 
247  virtual ::OpenRTM::PortStatus put(const ::OpenRTM::CdrData& data)
248  throw (CORBA::SystemException);
249 
250  private:
258  ::OpenRTM::PortStatus
260  const cdrMemoryStream& data);
261 
262 
272  inline void onBufferWrite(const cdrMemoryStream& data)
273  {
274  m_listeners->
275  connectorData_[ON_BUFFER_WRITE].notify(m_profile, data);
276  }
277 
287  inline void onBufferFull(const cdrMemoryStream& data)
288  {
289  m_listeners->
290  connectorData_[ON_BUFFER_FULL].notify(m_profile, data);
291  }
292 
302  inline void onBufferWriteTimeout(const cdrMemoryStream& data)
303  {
304  m_listeners->
305  connectorData_[ON_BUFFER_WRITE_TIMEOUT].notify(m_profile, data);
306  }
307 
317  inline void onBufferWriteOverwrite(const cdrMemoryStream& data)
318  {
319  m_listeners->
320  connectorData_[ON_BUFFER_OVERWRITE].notify(m_profile, data);
321  }
322 
332  inline void onReceived(const cdrMemoryStream& data)
333  {
334  m_listeners->
335  connectorData_[ON_RECEIVED].notify(m_profile, data);
336  }
337 
347  inline void onReceiverFull(const cdrMemoryStream& data)
348  {
349  m_listeners->
350  connectorData_[ON_RECEIVER_FULL].notify(m_profile, data);
351  }
352 
360  inline void onReceiverTimeout(const cdrMemoryStream& data)
361  {
362  m_listeners->
363  connectorData_[ON_RECEIVER_TIMEOUT].notify(m_profile, data);
364  }
365 
373  inline void onReceiverError(const cdrMemoryStream& data)
374  {
375  m_listeners->
376  connectorData_[ON_RECEIVER_ERROR].notify(m_profile, data);
377  }
378 
379  private:
381  ::OpenRTM::InPortCdr_var m_objref;
385 
386  }; // class InPortCorCdrbaProvider
387 }; // namespace RTC
388 
389 extern "C"
390 {
404  void InPortCorbaCdrProviderInit(void);
405 };
406 
407 #ifdef WIN32
408 #pragma warning( default : 4290 )
409 #endif
410 
411 #endif // RTC_INPORTCORBACDRPROVIDER_H
412 
void onBufferWriteTimeout(const cdrMemoryStream &data)
Notify an ON_BUFFER_WRITE_TIMEOUT event to listeners.
ConnectorListeners class.
InPortProvider class.
RT-Component.
void onBufferWriteOverwrite(const cdrMemoryStream &data)
Notify an ON_BUFFER_WRITE_OVERWRITE event to listeners.
void onReceiverError(const cdrMemoryStream &data)
void InPortCorbaCdrProviderInit(void)
Module initialization.
virtual ~InPortCorbaCdrProvider(void)
Destructor.
void onReceiverTimeout(const cdrMemoryStream &data)
Notify an ON_RECEIVER_TIMEOUT event to listeners.
Enum
DataPortStatus return codes.
Definition: BufferStatus.h:84
RTComponent manager class.
virtual void setListener(ConnectorInfo &info, ConnectorListeners *listeners)
Set the listener.
void onBufferWrite(const cdrMemoryStream &data)
Notify an ON_BUFFER_WRITE event to listeners.
Connector base class.
void onReceiverFull(const cdrMemoryStream &data)
Notify an ON_RECEIVER_FULL event to listeners.
virtual void setConnector(InPortConnector *connector)
set Connector
Buffer abstract class.
CORBA sequence utility template functions.
prop
Organization::get_organization_property ();.
::OpenRTM::InPortCdr_var m_objref
Class represents a set of properties.
Definition: Properties.h:101
virtual void setBuffer(BufferBase< cdrMemoryStream > *buffer)
Setting outside buffer&#39;s pointer.
virtual void init(coil::Properties &prop)
Initializing configuration.
void onReceived(const cdrMemoryStream &data)
Notify an ON_RECEIVED event to listeners.
::OpenRTM::PortStatus convertReturn(BufferStatus::Enum status, const cdrMemoryStream &data)
Return codes conversion.
void onBufferFull(const cdrMemoryStream &data)
Notify an ON_BUFFER_FULL event to listeners.
BufferBase abstract class.
Definition: BufferBase.h:104
connector listener class
virtual ::OpenRTM::PortStatus put(const ::OpenRTM::CdrData &data)
[CORBA interface] Write data into the buffer


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:43