[openrtm-commit:03306] r3272 - trunk/OpenRTM-aist/src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 3月 28日 (水) 13:24:46 JST
Author: miyamoto
Date: 2018-03-28 13:24:46 +0900 (Wed, 28 Mar 2018)
New Revision: 3272
Added:
trunk/OpenRTM-aist/src/lib/rtm/DirectInPortBase.h
trunk/OpenRTM-aist/src/lib/rtm/DirectOutPortBase.h
trunk/OpenRTM-aist/src/lib/rtm/DirectPortBase.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.h
Modified:
trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp
trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.h
trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPort.h
trunk/OpenRTM-aist/src/lib/rtm/InPortBase.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortBase.h
trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.h
trunk/OpenRTM-aist/src/lib/rtm/Makefile.am
trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
trunk/OpenRTM-aist/src/lib/rtm/NamingManager.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPort.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.cpp
trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h
trunk/OpenRTM-aist/src/lib/rtm/PortBase.cpp
trunk/OpenRTM-aist/src/lib/rtm/PortBase.h
Log:
[merge] r3184-3194 have been merged from RELENG_1_2.
Modified: trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -35,7 +35,7 @@
* @endif
*/
CorbaNaming::CorbaNaming(CORBA::ORB_ptr orb)
- : m_varORB(orb), m_nameServer(""),
+ : m_ptrORB(orb), m_nameServer(""),
m_rootContext(CosNaming::NamingContextExt::_nil()),
m_blLength(100)
{
@@ -49,7 +49,7 @@
* @endif
*/
CorbaNaming::CorbaNaming(CORBA::ORB_ptr orb, const char* name_server)
- : m_varORB(orb), m_nameServer(name_server),
+ : m_ptrORB(orb), m_nameServer(name_server),
m_rootContext(CosNaming::NamingContextExt::_nil()),
m_blLength(100)
{
@@ -57,7 +57,7 @@
m_nameServer = "corbaloc::" + m_nameServer + "/NameService";
try
{
- obj = m_varORB->string_to_object(m_nameServer.c_str());
+ obj = m_ptrORB->string_to_object(m_nameServer.c_str());
m_rootContext = CosNaming::NamingContextExt::_narrow(obj);
if (CORBA::is_nil(m_rootContext)) throw std::bad_alloc();
}
@@ -79,7 +79,7 @@
m_nameServer = name_server;
m_nameServer = "corbaloc::" + m_nameServer + "/NameService";
CORBA::Object_var obj;
- obj = m_varORB->string_to_object(m_nameServer.c_str());
+ obj = m_ptrORB->string_to_object(m_nameServer.c_str());
m_rootContext = CosNaming::NamingContextExt::_narrow(obj);
if (CORBA::is_nil(m_rootContext)) throw std::bad_alloc();
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/CorbaNaming.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -1681,7 +1681,7 @@
* @brief ORB
* @endif
*/
- CORBA::ORB_var m_varORB;
+ CORBA::ORB_ptr m_ptrORB;
/*!
* @if jp
Copied: trunk/OpenRTM-aist/src/lib/rtm/DirectInPortBase.h (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DirectInPortBase.h)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/DirectInPortBase.h (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/DirectInPortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,183 @@
+// -*- C++ -*-
+/*!
+ * @file DirectInPortBase.h
+ * @brief DirectInPortBase class
+ * @date $Date: 2018-1-23 03:08:05 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#ifndef RTC_DIRECTINPORTBASE_H
+#define RTC_DIRECTINPORTBASE_H
+
+
+
+#include <coil/Mutex.h>
+
+
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @class DirectInPortBase
+ * @brief direct接続用InPort基底クラス
+ *
+ *
+ * @since 1.2.0
+ *
+ * @else
+ * @class DirectOutPortBase
+ * @brief
+ *
+ *
+ *
+ * @since 1.2.0
+ *
+ * @endif
+ */
+ template <class DataType>
+ class DirectInPortBase : public DirectPortBase
+ {
+ public:
+ /*!
+ * @if jp
+ * @brief コンストラクタ
+ *
+ * @param value
+ *
+ * @else
+ * @brief Constructor
+ *
+ * @param value
+ *
+ * @endif
+ */
+ DirectInPortBase(DataType& value):
+ m_directNewData(false), m_value(value)
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief デストラクタ
+ *
+ *
+ * @else
+ * @brief Destructor
+ *
+ *
+ * @endif
+ */
+ virtual ~DirectInPortBase(void){};
+
+
+
+
+ /*!
+ * @if jp
+ *
+ * @brief 最新データが存在するか確認する
+ *
+ * InPortに未読の最新データが到着しているかをbool値で返す。
+ * InPortが未接続の場合、および接続コネクタのバッファがEmpty
+ * の場合にはfalseを返す。
+ *
+ * @return true 未読の最新データが存在する
+ * false 未接続またはバッファにデータが存在しない。
+ *
+ * @else
+ *
+ * @brief Check whether the data is newest
+ *
+ * Check whether the data stored at a current buffer position is newest.
+ *
+ * @return Newest data check result
+ * ( true:Newest data. Data has not been readout yet.
+ * false:Past data.Data has already been readout.)
+ *
+ * @endif
+ */
+ virtual bool isNew()
+ {
+ return m_directNewData;
+ }
+
+ /*!
+ * @if jp
+ *
+ * @brief バッファが空かどうか確認する
+ *
+ * InPortのバッファが空かどうかを bool 値で返す。
+ * 空の場合は true, 未読データがある場合は false を返す。
+ *
+ * @return true バッファは空
+ * false バッファに未読データがある
+ *
+ * @else
+ *
+ * @brief Check whether the data is newest
+ *
+ * Check whether the data stored at a current buffer position is newest.
+ *
+ * @return Newest data check result
+ * ( true:Newest data. Data has not been readout yet.
+ * false:Past data.Data has already been readout.)
+ *
+ * @endif
+ */
+ virtual bool isEmpty()
+ {
+ return !m_directNewData;
+ }
+
+ /*!
+ * @if jp
+ * @brief データの書き込み
+ *
+ * @param data データ
+ *
+ * @else
+ * @brief
+ *
+ * @param data
+ *
+ * @endif
+ */
+ virtual void write(const DataType& data)
+ {
+ }
+
+
+ protected:
+
+ /*!
+ * @if jp
+ * @brief バインドされる T 型の変数への参照
+ * @else
+ * @brief The reference to type-T value bound this OutPort
+ * @endif
+ */
+ DataType& m_value;
+ mutable coil::Mutex m_valueMutex;
+
+
+ /*!
+ * @if jp
+ * @brief ダイレクトデータ転送フラグ
+ * @else
+ * @brief A flag for direct data transfer
+ * @endif
+ */
+ bool m_directNewData;
+ };
+}; // End of namesepace RTM
+
+#endif // RTC_DIRECTINPORTBASE_H
Copied: trunk/OpenRTM-aist/src/lib/rtm/DirectOutPortBase.h (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DirectOutPortBase.h)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/DirectOutPortBase.h (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/DirectOutPortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,141 @@
+// -*- C++ -*-
+/*!
+ * @file DirectOutPortBase.h
+ * @brief DirectOutPortBase class
+ * @date $Date: 2018-1-23 03:08:05 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#ifndef RTC_DIRECTOUTPORTBASE_H
+#define RTC_DIRECTOUTPORTBASE_H
+
+
+#include <coil/Mutex.h>
+#include <rtm/DirectPortBase.h>
+
+
+
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @class DirectOutPortBase
+ * @brief directÚ±pOutPortîêNX
+ *
+ *
+ * @since 1.2.0
+ *
+ * @else
+ * @class DirectOutPortBase
+ * @brief
+ *
+ *
+ *
+ * @since 1.2.0
+ *
+ * @endif
+ */
+ template <class DataType>
+ class DirectOutPortBase : public DirectPortBase
+ {
+ typedef coil::Guard<coil::Mutex> Guard;
+ public:
+ /*!
+ * @if jp
+ * @brief RXgN^
+ *
+ * @param value
+ *
+ * @else
+ * @brief Constructor
+ *
+ * @param value
+ *
+ * @endif
+ */
+ DirectOutPortBase(DataType& value):
+ m_directNewData(false), m_directValue(value)
+ {
+ }
+ /*!
+ * @if jp
+ * @brief fXgN^
+ *
+ *
+ * @else
+ * @brief Destructor
+ *
+ *
+ * @endif
+ */
+ virtual ~DirectOutPortBase(void)
+ {
+ }
+ /*!
+ * @if jp
+ * @brief f[^Ìæ¾
+ *
+ * @param data f[^ði[·éÏ
+ *
+ * @else
+ * @brief
+ *
+ * @param data
+ *
+ * @endif
+ */
+ virtual void read(DataType& data)
+ {
+ }
+ /*!
+ * @if jp
+ * @brief VKf[^̶ÝmF
+ *
+ * @return trueFVKf[^ è
+ *
+ * @else
+ * @brief
+ *
+ * @return
+ *
+ * @endif
+ */
+ virtual bool isNew()
+ {
+ return !m_directNewData;
+ }
+ /*!
+ * @if jp
+ * @brief VKf[^ª³¢±ÆðmF
+ *
+ * @return trueFVKf[^ȵ
+ *
+ * @else
+ * @brief
+ *
+ * @return
+ *
+ * @endif
+ */
+ virtual bool isEmpty()
+ {
+ return !m_directNewData;
+ }
+
+ protected:
+ coil::Mutex m_valueMutex;
+ bool m_directNewData;
+ DataType m_directValue;
+ };
+}; // namespace RTC
+
+#endif // RTC_DIRECTOUTPORTBASE_H
Copied: trunk/OpenRTM-aist/src/lib/rtm/DirectPortBase.h (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DirectPortBase.h)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/DirectPortBase.h (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/DirectPortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,80 @@
+// -*- C++ -*-
+/*!
+ * @file DirectPortBase.h
+ * @brief DirectPortBase class
+ * @date $Date: 2018-1-23 03:08:05 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#ifndef RTC_DIRECTPORTBASE_H
+#define RTC_DIRECTPORTBASE_H
+
+
+
+
+
+
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @class DirectPortBase
+ * @brief directÚ±pPortîêNX
+ *
+ *
+ * @since 1.2.0
+ *
+ * @else
+ * @class DirectPortBase
+ * @brief
+ *
+ *
+ *
+ * @since 1.2.0
+ *
+ * @endif
+ */
+ class DirectPortBase
+ {
+ public:
+ /*!
+ * @if jp
+ * @brief RXgN^
+ *
+ *
+ * @else
+ * @brief Constructor
+ *
+ *
+ * @endif
+ */
+ DirectPortBase(){};
+
+ /*!
+ * @if jp
+ * @brief fXgN^
+ *
+ *
+ * @else
+ * @brief Destructor
+ *
+ *
+ * @endif
+ */
+ virtual ~DirectPortBase(void){};
+
+
+
+ };
+}; // End of namesepace RTM
+
+#endif // RTC_DIRECTINPORTBASE_H
Modified: trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -37,6 +37,8 @@
#include <rtm/OutPortCorbaCdrProvider.h>
#include <rtm/InPortDirectProvider.h>
#include <rtm/InPortDirectConsumer.h>
+#include <rtm/OutPortDirectProvider.h>
+#include <rtm/OutPortDirectConsumer.h>
#include <rtm/InPortSHMProvider.h>
#include <rtm/InPortSHMConsumer.h>
#include <rtm/OutPortSHMProvider.h>
@@ -74,6 +76,8 @@
OutPortCorbaCdrProviderInit();
InPortDirectProviderInit();
InPortDirectConsumerInit();
+ OutPortDirectProviderInit();
+ OutPortDirectConsumerInit();
InPortSHMProviderInit();
InPortSHMConsumerInit();
OutPortSHMProviderInit();
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPort.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPort.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPort.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -37,7 +37,10 @@
#include <rtm/PortCallback.h>
#include <rtm/InPortConnector.h>
#include <rtm/Timestamp.h>
+#include <rtm/DirectInPortBase.h>
+
+
namespace RTC
{
/*!
@@ -154,6 +157,7 @@
#else
: InPortBase(name, ::CORBA_Util::toRepositoryId<DataType>()),
#endif
+ DirectInPortBase<DataType>(value),
m_name(name), m_value(value),
m_OnRead(NULL), m_OnReadConvert(NULL),
m_status(1), m_directNewData(false)
@@ -162,6 +166,7 @@
new Timestamp<DataType>("on_received"));
this->addConnectorDataListener(ON_BUFFER_READ,
new Timestamp<DataType>("on_read"));
+ m_directport = this;
}
/*!
@@ -435,42 +440,47 @@
return false;
}
- // In single-buffer mode, all connectors share the same buffer. This
- // means that we only need to read from the first connector to get data
- // received by any connector.
- ret = m_connectors[0]->read(cdr);
- m_status[0] = ret;
+
}
- if (ret == PORT_OK)
- {
- Guard guard(m_valueMutex);
- RTC_DEBUG(("data read succeeded"));
-#ifdef ORB_IS_ORBEXPRESS
- cdr.cdr >> m_value;
-#elif defined(ORB_IS_TAO)
- TAO_InputCDR tao_cdr = TAO_InputCDR(cdr.cdr);
- tao_cdr >> m_value;
-#else
- m_value <<= cdr;
-#endif
- if (m_OnReadConvert != 0)
- {
- m_value = (*m_OnReadConvert)(m_value);
- RTC_DEBUG(("OnReadConvert called"));
- return true;
- }
- return true;
- }
- else if (ret == BUFFER_EMPTY)
- {
- RTC_WARN(("buffer empty"));
- return false;
- }
- else if (ret == BUFFER_TIMEOUT)
- {
- RTC_WARN(("buffer read timeout"));
- return false;
- }
+
+ if (!m_connectors[0]->getDirectData(m_value))
+ {
+ {
+ Guard guard(m_connectorsMutex);
+ // In single-buffer mode, all connectors share the same buffer. This
+ // means that we only need to read from the first connector to get data
+ // received by any connector.
+ ret = m_connectors[0]->read(cdr);
+ }
+ m_status[0] = ret;
+ if (ret == PORT_OK)
+ {
+ Guard guard(m_valueMutex);
+ RTC_DEBUG(("data read succeeded"));
+ m_value <<= cdr;
+ if (m_OnReadConvert != 0)
+ {
+ m_value = (*m_OnReadConvert)(m_value);
+ RTC_DEBUG(("OnReadConvert called"));
+ return true;
+ }
+ return true;
+ }
+ else if (ret == BUFFER_EMPTY)
+ {
+ RTC_WARN(("buffer empty"));
+ return false;
+ }
+ else if (ret == BUFFER_TIMEOUT)
+ {
+ RTC_WARN(("buffer read timeout"));
+ return false;
+ }
+ }
+ else
+ {
+ return true;
+ }
RTC_ERROR(("unknown retern value from buffer.read()"));
return false;
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortBase.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortBase.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortBase.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -1015,6 +1015,25 @@
// endian type set
connector->setEndian(m_littleEndian);
+
+
+ if (coil::normalize(prop["interface_type"]) == "direct")
+ {
+ OutPortBase* outport = getLocalOutPort(profile);
+ if (outport == NULL)
+ {
+ RTC_DEBUG(("interface_type is direct, "
+ "but a peer InPort servant could not be obtained."));
+ delete connector;
+ return 0;
+ }
+
+
+ connector->setOutPort(outport);
+
+
+ }
+
m_connectors.push_back(connector);
RTC_PARANOID(("connector push backed: %d", m_connectors.size()));
return connector;
@@ -1033,6 +1052,43 @@
return m_listeners;
}
+ /*!
+ * @if jp
+ * @brief ¥í¡¼¥«¥ë¤Î¥Ô¥¢OutPort¤ò¼èÆÀ
+ * @else
+ * @brief Getting local peer OutPort if available
+ * @endif
+ */
+ OutPortBase*
+ InPortBase::getLocalOutPort(const ConnectorInfo& profile)
+ {
+ RTC_DEBUG(("Trying direct port connection."));
+ CORBA::ORB_var orb = ::RTC::Manager::instance().getORB();
+ RTC_DEBUG(("Current connector profile: name=%s, id=%s",
+ profile.name.c_str(), profile.id.c_str()));
+ // finding peer port object
+ for (size_t i = 0; i < profile.ports.size(); ++i)
+ {
+ CORBA::Object_var obj;
+ obj = orb->string_to_object(profile.ports[i].c_str());
+ if (getPortRef()->_is_equivalent(obj)) { continue; }
+ RTC_DEBUG(("Peer port found: %s.", profile.ports[i].c_str()));
+ try
+ {
+ PortableServer::POA_var poa = ::RTC::Manager::instance().getPOA();
+ OutPortBase* outport = dynamic_cast<OutPortBase*>
+ (poa->reference_to_servant(obj));
+ RTC_DEBUG(("OutPortBase servant pointer is obtained."));
+ return outport;
+ }
+ catch (...)
+ {
+ RTC_DEBUG(("Peer port might be a remote port"));
+ }
+ }
+ return NULL;
+ }
+
ReturnCode_t InPortBase::notify_connect(ConnectorProfile& connector_profile)
throw (CORBA::SystemException)
{
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortBase.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortBase.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -24,6 +24,7 @@
#include <rtm/DataPortStatus.h>
#include <rtm/CdrBufferBase.h>
#include <rtm/ConnectorListener.h>
+#include <rtm/OutPortBase.h>
#ifdef WIN32
#pragma warning( push )
@@ -821,6 +822,14 @@
createConnector(const ConnectorProfile& cprof, coil::Properties& prop,
OutPortConsumer* consumer);
protected:
+ /*!
+ * @if jp
+ * @brief ¥í¡¼¥«¥ë¤Î¥Ô¥¢OutPort¤ò¼èÆÀ
+ * @else
+ * @brief Getting local peer OutPort if available
+ * @endif
+ */
+ OutPortBase* getLocalOutPort(const ConnectorInfo& profile);
/*!
* @if jp
* @brief ¥Ð¥Ã¥Õ¥¡¥â¡¼¥É
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -18,6 +18,7 @@
*/
#include <rtm/InPortConnector.h>
+#include <rtm/OutPortBase.h>
namespace RTC
{
@@ -32,7 +33,7 @@
ConnectorListeners& listeners,
CdrBufferBase* buffer)
: rtclog("InPortConnector"), m_profile(info),
- m_listeners(listeners), m_buffer(buffer), m_littleEndian(true)
+ m_listeners(listeners), m_buffer(buffer), m_littleEndian(true), m_directOutPort(NULL), m_outPortListeners(NULL)
{
}
@@ -153,4 +154,19 @@
return m_littleEndian;
}
+ bool InPortConnector::setOutPort(OutPortBase* directOutPort)
+ {
+ {
+ if (directOutPort == NULL)
+ {
+ return false;
+ }
+ m_directOutPort = directOutPort;
+
+ m_outPortListeners = &(m_directOutPort->getListeners());
+ m_directOutPort->getListeners();
+ return true;
+ }
+ };
+
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortConnector.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -22,9 +22,12 @@
#include <rtm/ConnectorListener.h>
#include <rtm/ConnectorBase.h>
+#include <rtm/DirectOutPortBase.h>
+
namespace RTC
{
+ class OutPortBase;
/*!
* @if jp
* @class InPortConnector
@@ -232,6 +235,66 @@
*/
virtual bool isLittleEndian();
+
+ /*!
+ * @if jp
+ * @brief ¥Ç¡¼¥¿¤ò¥À¥¤¥ì¥¯¥È¤Ë½ñ¤¹þ¤à¤¿¤á¤ÎOutPort¤Î¥µ¡¼¥Ð¥ó¥È¤òÀßÄꤹ¤ë
+ *
+ * @param directOutPort OutPort¤Î¥µ¡¼¥Ð¥ó¥È
+ *
+ * @return True: ÀßÄê¤ËÀ®¸ù False: ´û¤ËÀßÄêºÑ¤ß¤Î¤¿¤á¼ºÇÔ
+ *
+ * @else
+ * @brief
+ *
+ * @param directOutPort
+ *
+ * @return true: little endian, false: big endian
+ *
+ * @endif
+ */
+ bool setOutPort(OutPortBase* directOutPort);
+
+ template <typename DataType>
+ bool getDirectData(DataType &data)
+ {
+ if (m_directOutPort == NULL)
+ {
+ return false;
+ }
+ DirectOutPortBase<DataType>* outport;
+ outport = static_cast<DirectOutPortBase<DataType>*>(m_directOutPort->getDirectPort());
+
+
+ if (outport->isEmpty())
+ {
+ m_listeners.
+ connector_[ON_BUFFER_EMPTY].notify(m_profile);
+ m_outPortListeners->
+ connector_[ON_SENDER_EMPTY].notify(m_profile);
+ RTC_PARANOID(("ON_BUFFER_EMPTY(InPort,OutPort), "
+ "ON_SENDER_EMPTY(InPort,OutPort) "
+ "callback called in direct mode."));
+ }
+ outport->read(data);
+ m_outPortListeners->connectorData_[ON_BUFFER_READ].notify(m_profile, data);
+ RTC_TRACE(("ON_BUFFER_READ(OutPort), "));
+ RTC_TRACE(("callback called in direct mode."));
+ m_outPortListeners->connectorData_[ON_SEND].notify(m_profile, data);
+ RTC_TRACE(("ON_SEND(OutPort), "));
+ RTC_TRACE(("callback called in direct mode."));
+ m_listeners.connectorData_[ON_RECEIVED].notify(m_profile, data);
+ RTC_TRACE(("ON_RECEIVED(InPort), "));
+ RTC_TRACE(("callback called in direct mode."));
+ m_listeners.connectorData_[ON_SEND].notify(m_profile, data);
+ RTC_TRACE(("ON_BUFFER_WRITE(InPort), "));
+ RTC_TRACE(("callback called in direct mode."));
+
+
+ return true;
+
+ };
+
protected:
/*!
* @if jp
@@ -281,6 +344,14 @@
* @endif
*/
ConnectorListeners* m_outPortListeners;
+ /*!
+ * @if jp
+ * @brief Ʊ°ì¥×¥í¥»¥¹¾å¤Î¥Ô¥¢OutPort¤Î¥Ý¥¤¥ó¥¿
+ * @else
+ * @brief OutProt pointer to the peer in the same process
+ * @endif
+ */
+ OutPortBase* m_directOutPort;
};
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/Makefile.am
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/Makefile.am 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/Makefile.am 2018-03-28 04:24:46 UTC (rev 3272)
@@ -123,10 +123,12 @@
InPortCorbaCdrConsumer.cpp \
InPortDirectProvider.cpp \
InPortDirectConsumer.cpp \
- InPortSHMConsumer.cpp \
- InPortSHMProvider.cpp \
- OutPortSHMConsumer.cpp \
- OutPortSHMProvider.cpp \
+ InPortSHMConsumer.cpp \
+ InPortSHMProvider.cpp \
+ OutPortSHMConsumer.cpp \
+ OutPortSHMProvider.cpp \
+ OutPortDirectConsumer.cpp \
+ OutPortDirectProvider.cpp \
SharedMemoryPort.cpp
Modified: trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/ManagerConfig.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -33,6 +33,14 @@
{
// The list of default configuration file path.
+#ifdef RTM_OS_WIN32
+ const char* ManagerConfig::config_file_path[] =
+ {
+ "./rtc.conf",
+ "${RTM_ROOT}bin/${RTM_VC_VERSION}/rtc.conf",
+ NULL
+ };
+#else
const char* ManagerConfig::config_file_path[] =
{
"./rtc.conf",
@@ -42,6 +50,7 @@
"/usr/local/etc/rtc/rtc.conf",
NULL
};
+#endif
// Environment value to specify configuration file
const char* ManagerConfig::config_file_env = "RTC_MANAGER_CONFIG";
@@ -213,12 +222,14 @@
int i = 0;
while (config_file_path[i] != NULL)
{
- if (fileExist(config_file_path[i]))
- {
- m_configFile = config_file_path[i];
- return true;
- }
- ++i;
+ std::string cpath = coil::replaceEnv(config_file_path[i]);
+
+ if (fileExist(cpath))
+ {
+ m_configFile = cpath;
+ return true;
+ }
+ ++i;
}
return false;
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/NamingManager.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/NamingManager.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/NamingManager.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -284,7 +284,7 @@
}
else
{
- CORBA::ORB_ptr orb = Manager::instance().getORB();
+ CORBA::ORB_var orb = Manager::instance().getORB();
cns = RTC::CorbaNaming(orb, host.c_str());
}
@@ -429,7 +429,7 @@
rtc_list = (*mgr->get_components_by_name(rtc_name.c_str()));
RTM::ManagerList* slaves = mgr->get_slave_managers();
- for (int i = 0; i < slaves->length(); i++)
+ for (unsigned int i = 0; i < slaves->length(); i++)
{
try
@@ -512,7 +512,7 @@
CORBA::Object_ptr mobj = m_orb->string_to_object(mgrloc.c_str());
RTM::Manager_ptr mgr = RTM::Manager::_narrow(mobj);
- RTC_DEBUG(("corbaloc: %s", mgrloc));
+ RTC_DEBUG(("corbaloc: %s", mgrloc.c_str()));
return mgr;
}
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPort.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPort.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPort.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -34,6 +34,8 @@
#include <rtm/CdrBufferBase.h>
#include <rtm/PortCallback.h>
#include <rtm/OutPortConnector.h>
+#include <rtm/Timestamp.h>
+#include <rtm/DirectOutPortBase.h>
/*!
* @if jp
@@ -104,8 +106,9 @@
*/
template <class DataType>
class OutPort
- : public OutPortBase
+ : public OutPortBase, DirectOutPortBase<DataType>
{
+ typedef coil::Guard<coil::Mutex> Guard;
public:
/*!
* @if jp
@@ -136,7 +139,9 @@
#else
: OutPortBase(name, ::CORBA_Util::toRepositoryId<DataType>()),
#endif
- m_value(value), m_onWrite(0), m_onWriteConvert(0)
+ DirectOutPortBase<DataType>(value),
+ m_value(value), m_onWrite(0), m_onWriteConvert(0),
+ m_directNewData(false), m_directValue(value)
{
this->addConnectorDataListener(ON_BUFFER_WRITE,
@@ -144,6 +149,8 @@
this->addConnectorDataListener(ON_SEND,
new Timestamp<DataType>("on_send"));
+ m_directport = this;
+
}
/*!
@@ -229,19 +236,38 @@
for (size_t i(0), len(conn_size); i < len; ++i)
{
+
ReturnCode ret;
- if (m_onWriteConvert != NULL)
- {
- RTC_DEBUG(("m_connectors.OnWriteConvert called"));
- DataType conv_value = ((*m_onWriteConvert)(value));
- ret = m_connectors[i]->write(conv_value);
- }
- else
- {
- RTC_DEBUG(("m_connectors.write called"));
- ret = m_connectors[i]->write(value);
- }
+ if (!m_connectors[i]->pullDirectMode())
+ {
+ if (m_onWriteConvert != NULL)
+ {
+ RTC_DEBUG(("m_connectors.OnWriteConvert called"));
+ ret = m_connectors[i]->write(((*m_onWriteConvert)(value)));
+ }
+ else
+ {
+ RTC_DEBUG(("m_connectors.write called"));
+ ret = m_connectors[i]->write(value);
+ }
+ }
+ else
+ {
+ Guard guard(m_valueMutex);
+ if (m_onWriteConvert != NULL)
+ {
+ RTC_DEBUG(("m_connectors.OnWriteConvert called"));
+ m_directValue = ((*m_onWriteConvert)(value));
+ }
+ else
+ {
+ m_directValue = value;
+ }
+ m_directNewData = true;
+ ret = PORT_OK;
+ }
m_status[i] = ret;
+
if (ret == PORT_OK) { continue; }
result = false;
@@ -465,6 +491,36 @@
{
m_onWriteConvert = on_wconvert;
}
+
+ /*!
+ * @if jp
+ *
+ * @brief データをダイレクトに読み込む
+ *
+ * @param data 読み込むデータ
+ *
+ * @else
+ *
+ * @brief
+ *
+ * @param data
+ *
+ * @endif
+ */
+ virtual void read(DataType& data)
+ {
+ Guard guard(m_valueMutex);
+ m_directNewData = false;
+ data = m_directValue;
+ }
+ virtual bool isEmpty()
+ {
+ return !m_directNewData;
+ }
+ virtual bool isNew()
+ {
+ return m_directNewData;
+ }
private:
std::string m_typename;
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -29,6 +29,8 @@
#include <rtm/OutPortBase.h>
#include <rtm/PublisherBase.h>
+#include <rtm/InPortBase.h>
+
namespace RTC
{
/*!
@@ -1050,6 +1052,12 @@
}
RTC_TRACE(("OutPortPullConnector created"));
+
+ if (coil::normalize(prop["interface_type"]) == "direct")
+ {
+ connector->setPullDirectMode();
+ }
+
m_connectors.push_back(connector);
RTC_PARANOID(("connector pushback done: size = %d", m_connectors.size()));
return connector;
@@ -1133,4 +1141,9 @@
return PortBase::notify_connect(connector_profile);
}
+ ConnectorListeners& OutPortBase::getListeners()
+ {
+ return m_listeners;
+ }
+
}; // end of namespace RTM
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -781,7 +781,26 @@
connect(ConnectorProfile& connector_profile)
throw (CORBA::SystemException);
+ /*!
+ * @if jp
+ * @brief ¥ê¥¹¥Ê¥Û¥ë¥À¤ò¼èÆÀ¤¹¤ë
+ *
+ * InPortBase¤¬ÊÝ»ý¤¹¤ë¥ê¥¹¥Ê¥Û¥ë¥À¤òÊÖ¤¹¡£
+ *
+ * @return ConnectorListeners
+ *
+ * @else
+ * @brief Getting listeners holder
+ *
+ * This operation returns listeners holder.
+ *
+ * @return ConnectorListeners
+ *
+ * @endif
+ */
+ virtual ConnectorListeners& getListeners();
+
protected:
/*!
* @if jp
@@ -1021,6 +1040,7 @@
virtual ReturnCode_t notify_connect(ConnectorProfile& connector_profile)
throw (CORBA::SystemException);
+
protected:
/*!
* @if jp
@@ -1030,6 +1050,8 @@
* @endif
*/
InPortBase* getLocalInPort(const ConnectorInfo& profile);
+
+
/*!
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -18,6 +18,7 @@
*/
#include <rtm/OutPortConnector.h>
+#include <rtm/InPortBase.h>
namespace RTC
{
@@ -31,7 +32,7 @@
OutPortConnector::OutPortConnector(ConnectorInfo& info,
ConnectorListeners& listeners)
: rtclog("OutPortConnector"), m_profile(info), m_littleEndian(true),
- m_directInPort(NULL), m_listeners(listeners)
+ m_directInPort(NULL), m_listeners(listeners), m_directMode(false)
{
}
@@ -133,4 +134,47 @@
return m_littleEndian;
}
+ /*!
+ * @if jp
+ * @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤ËÀßÄê
+ *
+ *
+ * @else
+ * @brief
+ *
+ *
+ * @endif
+ */
+ void OutPortConnector::setPullDirectMode()
+ {
+ m_directMode = true;
+ }
+
+ /*!
+ * @if jp
+ * @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤«¤ÎȽÄê
+ *
+ * @return True¡§¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É,false¡§¤½¤ì°Ê³°
+ *
+ * @else
+ * @brief
+ *
+ *
+ * @endif
+ */
+ bool OutPortConnector::pullDirectMode()
+ {
+ return m_directMode;
+ }
+
+ bool OutPortConnector::setInPort(InPortBase* directInPort)
+ {
+ if (directInPort == NULL)
+ {
+ return false;
+ }
+ m_directInPort = directInPort;
+ m_inPortListeners = &(m_directInPort->getListeners());
+ return true;
+ }
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortConnector.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -22,12 +22,14 @@
#include <rtm/SystemLogger.h>
#include <rtm/ConnectorBase.h>
-#include <rtm/InPortBase.h>
-#include <rtm/InPort.h>
+#include <rtm/ConnectorListener.h>
+#include <rtm/DirectInPortBase.h>
+
namespace RTC
{
+ class InPortBase;
/*!
* @if jp
* @class OutPortConnector
@@ -213,8 +215,8 @@
{
if (m_directInPort != NULL)
{
- InPort<DataType>* inport;
- inport = static_cast<InPort<DataType>*>(m_directInPort);
+ DirectInPortBase<DataType>* inport = static_cast<DirectInPortBase<DataType>*>(m_directInPort->getDirectPort());
+
if (inport->isNew())
{
// ON_BUFFER_OVERWRITE(In,Out), ON_RECEIVER_FULL(In,Out) callback
@@ -268,16 +270,32 @@
return write(m_cdr);
}
- bool setInPort(InPortBase* directInPort)
- {
- if (directInPort == NULL)
- {
- return false;
- }
- m_directInPort = directInPort;
- m_inPortListeners = &(m_directInPort->getListeners());
- return true;
- }
+ bool setInPort(InPortBase* directInPort);
+ /*!
+ * @if jp
+ * @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤ËÀßÄê
+ *
+ *
+ * @else
+ * @brief
+ *
+ *
+ * @endif
+ */
+ virtual void setPullDirectMode();
+ /*!
+ * @if jp
+ * @brief ¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É¤«¤ÎȽÄê
+ *
+ * @return True¡§¥À¥¤¥ì¥¯¥ÈÀܳ¥â¡¼¥É,false¡§¤½¤ì°Ê³°
+ *
+ * @else
+ * @brief
+ *
+ *
+ * @endif
+ */
+ virtual bool pullDirectMode();
protected:
/*!
* @if jp
@@ -340,6 +358,8 @@
*/
ConnectorListeners* m_inPortListeners;
+ bool m_directMode;
+
};
}; // namespace RTC
Copied: trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.cpp (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.cpp)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.cpp (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,145 @@
+// -*- C++ -*-
+/*!
+ * @file OutPortDirectConsumer.cpp
+ * @brief OutPortDirectConsumer class
+ * @date $Date: 2018-01-17 07:52:40 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * Robot Innovation Research Center,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#include <rtm/OutPortDirectConsumer.h>
+#include <rtm/NVUtil.h>
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @brief コンストラクタ
+ * @else
+ * @brief Constructor
+ * @endif
+ */
+ OutPortDirectConsumer::OutPortDirectConsumer()
+ {
+ rtclog.setName("OutPortDirectConsumer");
+ }
+
+ /*!
+ * @if jp
+ * @brief デストラクタ
+ * @else
+ * @brief Destructor
+ * @endif
+ */
+ OutPortDirectConsumer::~OutPortDirectConsumer(void)
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief 設定初期化
+ * @else
+ * @brief Initializing configuration
+ * @endif
+ */
+ void OutPortDirectConsumer::init(coil::Properties& prop)
+ {
+ RTC_TRACE(("OutPortDirectConsumer::init()"));
+ }
+
+ /*!
+ * @if jp
+ * @brief バッファをセットする
+ * @else
+ * @brief Setting outside buffer's pointer
+ * @endif
+ */
+ void OutPortDirectConsumer::setBuffer(CdrBufferBase* buffer)
+ {
+ RTC_TRACE(("OutPortDirectConsumer::setBuffer()"));
+ }
+
+ /*!
+ * @if jp
+ * @brief リスナを設定する。
+ * @else
+ * @brief Set the listener.
+ * @endif
+ */
+ void OutPortDirectConsumer::setListener(ConnectorInfo& info,
+ ConnectorListeners* listeners)
+ {
+ RTC_TRACE(("OutPortDirectConsumer::setListener()"));
+ }
+
+ /*!
+ * @if jp
+ * @brief データを読み出す
+ * @else
+ * @brief Read data
+ * @endif
+ */
+ OutPortConsumer::ReturnCode
+ OutPortDirectConsumer::get(cdrMemoryStream& data)
+ {
+ RTC_PARANOID(("get(): never called."));
+ return UNKNOWN_ERROR;
+ }
+
+ /*!
+ * @if jp
+ * @brief データ受信通知への登録
+ * @else
+ * @brief Subscribe the data receive notification
+ * @endif
+ */
+ bool OutPortDirectConsumer::
+ subscribeInterface(const SDOPackage::NVList& properties)
+ {
+ RTC_TRACE(("subscribeInterface(): do nothing"));
+ return true;
+ }
+
+ /*!
+ * @if jp
+ * @brief データ受信通知からの登録解除
+ * @else
+ * @brief Unsubscribe the data receive notification
+ * @endif
+ */
+ void OutPortDirectConsumer::
+ unsubscribeInterface(const SDOPackage::NVList& properties)
+ {
+ }
+
+
+}; // namespace RTC
+
+extern "C"
+{
+ /*!
+ * @if jp
+ * @brief モジュール初期化関数
+ * @else
+ * @brief Module initialization
+ * @endif
+ */
+ void OutPortDirectConsumerInit(void)
+ {
+ RTC::OutPortConsumerFactory&
+ factory(RTC::OutPortConsumerFactory::instance());
+ factory.addFactory("direct",
+ ::coil::Creator< ::RTC::OutPortConsumer,
+ ::RTC::OutPortDirectConsumer>,
+ ::coil::Destructor< ::RTC::OutPortConsumer,
+ ::RTC::OutPortDirectConsumer>);
+ }
+};
Copied: trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.h (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.h)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.h (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectConsumer.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,284 @@
+// -*- C++ -*-
+/*!
+ * @file InPortDirectConsumer.cpp
+ * @brief InPortDirectConsumer class
+ * @date $Date: 2008-01-14 07:49:59 $
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2009-2010
+ * Noriaki Ando
+ * Task-intelligence Research Group,
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id: InPortDirectConsumer.cpp 1244 2009-03-13 07:25:42Z n-ando $
+ *
+ */
+
+#ifndef RTC_OUTPORTDIRECTCONSUMER_H
+#define RTC_OUTPORTDIRECTCONSUMER_H
+
+
+#include <rtm/Manager.h>
+#include <rtm/OutPortConsumer.h>
+#include <rtm/ConnectorListener.h>
+#include <rtm/ConnectorBase.h>
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @class OutPortDirectConsumer
+ * @brief OutPortDirectConsumer クラス
+ *
+ * OutPortConsumer
+ *
+ * データ転送に CORBA の OpenRTM::OutPortCdr インターフェースを利用し
+ * た、pull 型データフロー型を実現する OutPort コンシューマクラス。
+ *
+ * @since 1.2.0
+ *
+ * @else
+ * @class OutPortDirectConsumer
+ * @brief OutPortDirectConsumer class
+ *
+ * The OutPort consumer class which uses the OpenRTM::OutPortCdr
+ * interface in CORBA for data transfer and realizes a pull-type
+ * dataflow.
+ *
+ * @since 1.2.0
+ *
+ * @endif
+ */
+ class OutPortDirectConsumer
+ : public OutPortConsumer
+ {
+ public:
+ DATAPORTSTATUS_ENUM
+
+ /*!
+ * @if jp
+ * @brief コンストラクタ
+ *
+ * コンストラクタ
+ *
+ * @else
+ * @brief Constructor
+ *
+ * Constructor
+ *
+ * @endif
+ */
+ OutPortDirectConsumer();
+
+ /*!
+ * @if jp
+ * @brief デストラクタ
+ *
+ * デストラクタ
+ *
+ * @else
+ * @brief Destructor
+ *
+ * Destructor
+ *
+ * @endif
+ */
+ virtual ~OutPortDirectConsumer(void);
+
+ /*!
+ * @if jp
+ * @brief 設定初期化
+ *
+ * OutPortConsumerの各種設定を行う。実装クラスでは、与えられた
+ * Propertiesから必要な情報を取得して各種設定を行う。この init() 関
+ * 数は、OutPortProvider生成直後および、接続時にそれぞれ呼ばれる可
+ * 能性がある。したがって、この関数は複数回呼ばれることを想定して記
+ * 述されるべきである。
+ *
+ * @param prop 設定情報
+ *
+ * @else
+ *
+ * @brief Initializing configuration
+ *
+ * This operation would be called to configure in initialization.
+ * In the concrete class, configuration should be performed
+ * getting appropriate information from the given Properties data.
+ * This function might be called right after instantiation and
+ * connection sequence respectivly. Therefore, this function
+ * should be implemented assuming multiple call.
+ *
+ * @param prop Configuration information
+ *
+ * @endif
+ */
+ virtual void init(coil::Properties& prop);
+
+ /*!
+ * @if jp
+ * @brief バッファをセットする
+ *
+ * OutPortConsumerがデータを取り出すバッファをセットする。
+ * すでにセットされたバッファがある場合、以前のバッファへの
+ * ポインタに対して上書きされる。
+ * OutPortProviderはバッファの所有権を仮定していないので、
+ * バッファの削除はユーザの責任で行わなければならない。
+ *
+ * @param buffer OutPortProviderがデータを取り出すバッファへのポインタ
+ *
+ * @else
+ * @brief Setting outside buffer's pointer
+ *
+ * A pointer to a buffer from which OutPortProvider retrieve data.
+ * If already buffer is set, previous buffer's pointer will be
+ * overwritten by the given pointer to a buffer. Since
+ * OutPortProvider does not assume ownership of the buffer
+ * pointer, destructor of the buffer should be done by user.
+ *
+ * @param buffer A pointer to a data buffer to be used by OutPortProvider
+ *
+ * @endif
+ */
+ virtual void setBuffer(CdrBufferBase* buffer);
+
+ /*!
+ * @if jp
+ * @brief リスナを設定する。
+ *
+ * InPort はデータ送信処理における各種イベントに対して特定のリスナ
+ * オブジェクトをコールするコールバック機構を提供する。詳細は
+ * ConnectorListener.h の ConnectorDataListener, ConnectorListener
+ * 等を参照のこと。OutPortCorbaCdrProvider では、以下のコールバック
+ * が提供される。
+ *
+ * - ON_BUFFER_WRITE
+ * - ON_BUFFER_FULL
+ * - ON_RECEIVED
+ * - ON_RECEIVER_FULL
+ * - ON_SENDER_EMPTY
+ * - ON_SENDER_TIMEOUT
+ * - ON_SENDER_ERROR
+ *
+ * @param info 接続情報
+ * @param listeners リスナオブジェクト
+ *
+ * @else
+ * @brief Set the listener.
+ *
+ * OutPort provides callback functionality that calls specific
+ * listener objects according to the events in the data publishing
+ * process. For details, see documentation of
+ * ConnectorDataListener class and ConnectorListener class in
+ * ConnectorListener.h. In this OutPortCorbaCdrProvider provides
+ * the following callbacks.
+ *
+ * - ON_BUFFER_WRITE
+ * - ON_BUFFER_FULL
+ * - ON_RECEIVED
+ * - ON_RECEIVER_FULL
+ * - ON_SENDER_EMPTY
+ * - ON_SENDER_TIMEOUT
+ * - ON_SENDER_ERROR
+ *
+ * @param info Connector information
+ * @param listeners Listener objects
+ *
+ * @endif
+ */
+ virtual void setListener(ConnectorInfo& info,
+ ConnectorListeners* listeners);
+
+ /*!
+ * @if jp
+ * @brief データを読み出す
+ *
+ * 設定されたデータを読み出す。
+ *
+ * @param data 読み出したデータを受け取るオブジェクト
+ *
+ * @return データ読み出し処理結果(読み出し成功:true、読み出し失敗:false)
+ *
+ * @else
+ * @brief Read data
+ *
+ * Read set data
+ *
+ * @param data Object to receive the read data
+ *
+ * @return Read result (Successful:true, Failed:false)
+ *
+ * @endif
+ */
+ virtual ReturnCode get(cdrMemoryStream& data);
+
+ /*!
+ * @if jp
+ * @brief データ受信通知への登録
+ *
+ * 指定されたプロパティに基づいて、データ受信通知の受け取りに登録する。
+ *
+ * @param properties 登録情報
+ *
+ * @return 登録処理結果(登録成功:true、登録失敗:false)
+ *
+ * @else
+ * @brief Subscribe the data receive notification
+ *
+ * Subscribe the data receive notification based on specified property
+ * information
+ *
+ * @param properties Subscription information
+ *
+ * @return Subscription result (Successful:true, Failed:false)
+ *
+ * @endif
+ */
+ virtual bool subscribeInterface(const SDOPackage::NVList& properties);
+
+ /*!
+ * @if jp
+ * @brief データ受信通知からの登録解除
+ *
+ * データ受信通知の受け取りから登録を解除する。
+ *
+ * @param properties 登録解除情報
+ *
+ * @else
+ * @brief Unsubscribe the data receive notification
+ *
+ * Unsubscribe the data receive notification.
+ *
+ * @param properties Unsubscription information
+ *
+ * @endif
+ */
+ virtual void unsubscribeInterface(const SDOPackage::NVList& properties);
+
+private:
+ mutable Logger rtclog;
+ coil::Properties m_properties;
+ };
+}; // namespace RTC
+
+extern "C"
+{
+ /*!
+ * @if jp
+ * @brief モジュール初期化関数
+ *
+ * OutPortDirectConsumer のファクトリを登録する初期化関数。
+ *
+ * @else
+ * @brief Module initialization
+ *
+ * This initialization function registers OutPortDirectConsumer's factory.
+ *
+ * @endif
+ */
+ void OutPortDirectConsumerInit(void);
+};
+
+#endif // RTC_OUTPORTDIRECTCONSUMER_H
Copied: trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.cpp (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.cpp)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.cpp (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+/*!
+ * @file OutPortDirectProvider.cpp
+ * @brief OutPortDirectProvider class
+ * @date $Date: 2018-01-17 07:52:40 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * Robot Innovation Research Center,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#include <rtm/OutPortDirectProvider.h>
+
+#ifdef WIN32
+#pragma warning( disable : 4290 )
+#endif
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @brief コンストラクタ
+ * @else
+ * @brief Constructor
+ * @endif
+ */
+ OutPortDirectProvider::OutPortDirectProvider(void)
+ : m_buffer(0)
+ {
+ // PortProfile setting
+ setInterfaceType("direct");
+
+ }
+
+ /*!
+ * @if jp
+ * @brief デストラクタ
+ * @else
+ * @brief Destructor
+ * @endif
+ */
+ OutPortDirectProvider::~OutPortDirectProvider(void)
+ {
+
+ }
+
+ /*!
+ * @if jp
+ * @brief 設定初期化
+ * @else
+ * @brief Initializing configuration
+ * @endif
+ */
+ void OutPortDirectProvider::init(coil::Properties& prop)
+ {
+ }
+
+ /*!
+ * @if jp
+ * @brief バッファをセットする
+ * @else
+ * @brief Setting outside buffer's pointer
+ * @endif
+ */
+ void OutPortDirectProvider::setBuffer(CdrBufferBase* buffer)
+ {
+ m_buffer = buffer;
+ }
+
+ /*!
+ * @if jp
+ * @brief リスナを設定する。
+ * @else
+ * @brief Set the listener.
+ * @endif
+ */
+ void OutPortDirectProvider::setListener(ConnectorInfo& info,
+ ConnectorListeners* listeners)
+ {
+ m_profile = info;
+ m_listeners = listeners;
+ }
+
+ /*!
+ * @if jp
+ * @brief コネクタをセットする
+ * @else
+ * @brief Setting outside connector's pointer
+ * @endif
+ */
+ void OutPortDirectProvider::setConnector(OutPortConnector* connector)
+ {
+ m_connector = connector;
+ }
+
+}; // namespace RTC
+
+extern "C"
+{
+ /*!
+ * @if jp
+ * @brief モジュール初期化関数
+ * @else
+ * @brief Module initialization
+ * @endif
+ */
+ void OutPortDirectProviderInit(void)
+ {
+ RTC::OutPortProviderFactory&
+ factory(RTC::OutPortProviderFactory::instance());
+ factory.addFactory("direct",
+ ::coil::Creator< ::RTC::OutPortProvider,
+ ::RTC::OutPortDirectProvider>,
+ ::coil::Destructor< ::RTC::OutPortProvider,
+ ::RTC::OutPortDirectProvider>);
+ }
+};
Copied: trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.h (from rev 3194, branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.h)
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.h (rev 0)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortDirectProvider.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -0,0 +1,348 @@
+// -*- C++ -*-
+/*!
+ * @file OutPortDirectProvider.h
+ * @brief OutPortDirectProvider class
+ * @date $Date: 2018-01-17 07:52:40 $
+ * @author Nobuhiko Miyamoto <n-miyamoto at aist.go.jp>
+ *
+ * Copyright (C) 2018
+ * Nobuhiko Miyamoto
+ * Robot Innovation Research Center,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ *
+ */
+
+#ifndef RTC_OUTPORTDIRECTPROVIDER_H
+#define RTC_OUTPORTDIRECTPROVIDER_H
+
+
+#include <rtm/BufferBase.h>
+#include <rtm/OutPortProvider.h>
+#include <rtm/Manager.h>
+#include <rtm/ConnectorListener.h>
+#include <rtm/ConnectorBase.h>
+
+#ifdef WIN32
+#pragma warning( disable : 4290 )
+#endif
+
+namespace RTC
+{
+ /*!
+ * @if jp
+ * @class OutPortDirectProvider
+ * @brief OutPortDirectProvider クラス
+ *
+ * OutPortProvider
+ *
+ *
+ *
+ *
+ * @since 1.2.0
+ *
+ * @else
+ * @class OutPortDirectProvider
+ * @brief OutPortDirectProvider class
+ *
+ *
+ * @since 1.2.0
+ *
+ * @endif
+ */
+ class OutPortDirectProvider
+ : public OutPortProvider
+ {
+ public:
+ /*!
+ * @if jp
+ * @brief コンストラクタ
+ *
+ * コンストラクタ
+ *
+ * @else
+ * @brief Constructor
+ *
+ * Constructor
+ *
+ * @endif
+ */
+ OutPortDirectProvider(void);
+
+ /*!
+ * @if jp
+ * @brief デストラクタ
+ *
+ * デストラクタ
+ *
+ * @else
+ * @brief Destructor
+ *
+ * Destructor
+ *
+ * @endif
+ */
+ virtual ~OutPortDirectProvider(void);
+
+ /*!
+ * @if jp
+ * @brief 設定初期化
+ *
+ * OutPortDirectProvider の各種設定を行う。与えられた
+ * Propertiesから必要な情報を取得して各種設定を行う。この init() 関
+ * 数は、OutPortProvider生成直後および、接続時にそれぞれ呼ばれる可
+ * 能性がある。したがって、この関数は複数回呼ばれることを想定して記
+ * 述されるべきである。
+ *
+ * @param prop 設定情報
+ *
+ * @else
+ *
+ * @brief Initializing configuration
+ *
+ * This operation would be called to configure in initialization.
+ * In the concrete class, configuration should be performed
+ * getting appropriate information from the given Properties data.
+ * This function might be called right after instantiation and
+ * connection sequence respectivly. Therefore, this function
+ * should be implemented assuming multiple call.
+ *
+ * @param prop Configuration information
+ *
+ * @endif
+ */
+ virtual void init(coil::Properties& prop);
+
+ /*!
+ * @if jp
+ * @brief バッファをセットする
+ *
+ * OutPortProvider がデータを取り出すバッファをセットする。
+ * すでにセットされたバッファがある場合、以前のバッファへの
+ * ポインタに対して上書きされる。
+ * OutPortProviderはバッファの所有権を仮定していないので、
+ * バッファの削除はユーザの責任で行わなければならない。
+ *
+ * @param buffer OutPortProviderがデータを取り出すバッファへのポインタ
+ *
+ * @else
+ * @brief Setting outside buffer's pointer
+ *
+ * A pointer to a buffer from which OutPortProvider retrieve data.
+ * If already buffer is set, previous buffer's pointer will be
+ * overwritten by the given pointer to a buffer. Since
+ * OutPortProvider does not assume ownership of the buffer
+ * pointer, destructor of the buffer should be done by user.
+ *
+ * @param buffer A pointer to a data buffer to be used by OutPortProvider
+ *
+ * @endif
+ */
+ virtual void setBuffer(CdrBufferBase* buffer);
+
+ /*!
+ * @if jp
+ * @brief リスナを設定する。
+ *
+ * OutPort はデータ送信処理における各種イベントに対して特定のリスナ
+ * オブジェクトをコールするコールバック機構を提供する。詳細は
+ * ConnectorListener.h の ConnectorDataListener, ConnectorListener
+ * 等を参照のこと。OutPortDirectProvider では、以下のコールバック
+ * が提供される。
+ *
+ * - ON_BUFFER_READ
+ * - ON_SEND
+ * - ON_BUFFER_EMPTY
+ * - ON_BUFFER_READ_TIMEOUT
+ * - ON_SENDER_EMPTY
+ * - ON_SENDER_TIMEOUT
+ * - ON_SENDER_ERROR
+ *
+ * @param info 接続情報
+ * @param listeners リスナオブジェクト
+ *
+ * @else
+ * @brief Set the listener.
+ *
+ * OutPort provides callback functionality that calls specific
+ * listener objects according to the events in the data publishing
+ * process. For details, see documentation of
+ * ConnectorDataListener class and ConnectorListener class in
+ * ConnectorListener.h. In this OutPortDirectProvider provides
+ * the following callbacks.
+ *
+ * - ON_BUFFER_READ
+ * - ON_SEND
+ * - ON_BUFFER_EMPTY
+ * - ON_BUFFER_READ_TIMEOUT
+ * - ON_SENDER_EMPTY
+ * - ON_SENDER_TIMEOUT
+ * - ON_SENDER_ERROR
+ *
+ * @param info Connector information
+ * @param listeners Listener objects
+ *
+ * @endif
+ */
+ virtual void setListener(ConnectorInfo& info,
+ ConnectorListeners* listeners);
+
+ /*!
+ * @if jp
+ * @brief Connectorを設定する。
+ *
+ * OutPort は接続確立時に OutPortConnector オブジェクトを生成し、生
+ * 成したオブジェクトのポインタと共にこの関数を呼び出す。所有権は
+ * OutPort が保持するので OutPortProvider は OutPortConnector を削
+ * 除してはいけない。
+ *
+ * @param connector OutPortConnector
+ *
+ * @else
+ * @brief set Connector
+ *
+ * OutPort creates OutPortConnector object when it establishes
+ * connection between OutPort and InPort, and it calls this
+ * function with a pointer to the connector object. Since the
+ * OutPort has the ownership of this connector, OutPortProvider
+ * should not delete it.
+ *
+ * @param connector OutPortConnector
+ *
+ * @endif
+ */
+ virtual void setConnector(OutPortConnector* connector);
+
+
+ private:
+
+
+
+ /*!
+ * @if jp
+ * @brief ON_BUFFER_READ のリスナへ通知する。
+ * @param data cdrMemoryStream
+ * @else
+ * @brief Notify an ON_BUFFER_READ event to listeners
+ * @param data cdrMemoryStream
+ * @endif
+ */
+ inline void onBufferRead(cdrMemoryStream& data)
+ {
+ m_listeners->
+ connectorData_[ON_BUFFER_READ].notify(m_profile, data);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_SEND のリスナへ通知する。
+ * @param data cdrMemoryStream
+ * @else
+ * @brief Notify an ON_SEND event to listeners
+ * @param data cdrMemoryStream
+ * @endif
+ */
+ inline void onSend(cdrMemoryStream& data)
+ {
+ m_listeners->
+ connectorData_[ON_SEND].notify(m_profile, data);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_BUFFER_EMPTYのリスナへ通知する。
+ * @else
+ * @brief Notify an ON_BUFFER_EMPTY event to listeners
+ * @endif
+ */
+ inline void onBufferEmpty()
+ {
+ m_listeners->
+ connector_[ON_BUFFER_EMPTY].notify(m_profile);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_BUFFER_READ_TIMEOUT のリスナへ通知する。
+ * @else
+ * @brief Notify an ON_BUFFER_READ_TIMEOUT event to listeners
+ * @endif
+ */
+ inline void onBufferReadTimeout()
+ {
+ m_listeners->
+ connector_[ON_BUFFER_READ_TIMEOUT].notify(m_profile);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_SENDER_EMPTYのリスナへ通知する。
+ * @else
+ * @brief Notify an ON_SENDER_EMPTY event to listeners
+ * @endif
+ */
+ inline void onSenderEmpty()
+ {
+ m_listeners->
+ connector_[ON_SENDER_EMPTY].notify(m_profile);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_SENDER_TIMEOUT のリスナへ通知する。
+ * @else
+ * @brief Notify an ON_SENDER_TIMEOUT event to listeners
+ * @endif
+ */
+ inline void onSenderTimeout()
+ {
+ m_listeners->
+ connector_[ON_SENDER_TIMEOUT].notify(m_profile);
+ }
+
+ /*!
+ * @if jp
+ * @brief ON_SENDER_ERRORのリスナへ通知する。
+ * @else
+ * @brief Notify an ON_SENDER_ERROR event to listeners
+ * @endif
+ */
+ inline void onSenderError()
+ {
+ m_listeners->
+ connector_[ON_SENDER_ERROR].notify(m_profile);
+ }
+
+ private:
+ CdrBufferBase* m_buffer;
+ ConnectorListeners* m_listeners;
+ ConnectorInfo m_profile;
+ OutPortConnector* m_connector;
+ }; // class OutPortDirectProvider
+}; // namespace RTC
+
+extern "C"
+{
+ /*!
+ * @if jp
+ * @brief モジュール初期化関数
+ *
+ * OutPortDirectProvider のファクトリを登録する初期化関数。
+ *
+ * @else
+ * @brief Module initialization
+ *
+ * This initialization function registers OutPortDirectProvider's factory.
+ *
+ * @endif
+ */
+ void OutPortDirectProviderInit(void);
+};
+
+#ifdef WIN32
+#pragma warning( default : 4290 )
+#endif
+
+#endif // RTC_OUTPORTDIRECTPROVIDER_H
Modified: trunk/OpenRTM-aist/src/lib/rtm/PortBase.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/PortBase.cpp 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/PortBase.cpp 2018-03-28 04:24:46 UTC (rev 3272)
@@ -46,7 +46,8 @@
m_onUnsubscribeInterfaces(0),
m_onDisconnected(0),
m_onConnectionLost(0),
- m_portconnListeners(NULL)
+ m_portconnListeners(NULL),
+ m_directport(NULL)
{
m_objref = this->_this();
// Now Port name is <instance_name>.<port_name>. r1648
@@ -249,7 +250,7 @@
if (!coil::toBool(prop.getProperty("dataport.allow_dup_connection"), "YES", "NO", default_value))
{
- for (int i = 0; i < connector_profile.ports.length(); i++)
+ for (unsigned int i = 0; i < connector_profile.ports.length(); i++)
{
if (!getPortRef()->_is_equivalent(connector_profile.ports[i]))
{
@@ -1002,4 +1003,26 @@
return true;
}
+
+
+
+
+ /*!
+ * @if jp
+ * @brief directÄÌ¿®Íѥݡ¼¥È¥ª¥Ö¥¸¥§¥¯¥È¼èÆÀ
+ *
+ * @return ¥Ý¡¼¥È¤Î¥Ý¥¤¥ó¥¿
+ *
+ * @else
+ * @brief
+ *
+ * @return
+ *
+ * @endif
+ */
+ DirectPortBase* PortBase::getDirectPort()
+ {
+ return m_directport;
+ }
+
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/PortBase.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/PortBase.h 2018-03-28 04:02:00 UTC (rev 3271)
+++ trunk/OpenRTM-aist/src/lib/rtm/PortBase.h 2018-03-28 04:24:46 UTC (rev 3272)
@@ -32,6 +32,7 @@
#include <rtm/SystemLogger.h>
#include <rtm/PortConnectListener.h>
#include <iostream>
+#include <rtm/DirectPortBase.h>
#ifdef WIN32
#pragma warning( disable : 4290 )
@@ -1272,6 +1273,20 @@
*/
void setPortConnectListenerHolder(PortConnectListeners* portconnListeners);
+ /*!
+ * @if jp
+ * @brief directÄÌ¿®Íѥݡ¼¥È¥ª¥Ö¥¸¥§¥¯¥È¼èÆÀ
+ *
+ * @return ¥Ý¡¼¥È¤Î¥Ý¥¤¥ó¥¿
+ *
+ * @else
+ * @brief
+ *
+ * @return
+ *
+ * @endif
+ */
+ virtual DirectPortBase* getDirectPort();
//============================================================
// protected operations
//============================================================
@@ -2217,6 +2232,8 @@
*/
PortConnectListeners* m_portconnListeners;
+ DirectPortBase *m_directport;
+
//============================================================
// Functor
//============================================================
openrtm-commit メーリングリストの案内