[openrtm-commit:02798] r3037 - in trunk/OpenRTM-aist: . src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 4日 (月) 16:47:54 JST
Author: miyamoto
Date: 2017-09-04 16:47:54 +0900 (Mon, 04 Sep 2017)
New Revision: 3037
Modified:
trunk/OpenRTM-aist/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
trunk/OpenRTM-aist/src/lib/rtm/Manager.h
trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
Log:
[incompat] refs #4176
Modified: trunk/OpenRTM-aist/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/CMakeLists.txt 2017-09-01 11:08:59 UTC (rev 3036)
+++ trunk/OpenRTM-aist/CMakeLists.txt 2017-09-04 07:47:54 UTC (rev 3037)
@@ -47,7 +47,8 @@
set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/x86_win32/omniidl)
endif(VXWORKS)
endif()
- SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
+ SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf -Wbshortcut)
+ #SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
endif()
if(UNIX)
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp 2017-09-01 11:08:59 UTC (rev 3036)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrProvider.cpp 2017-09-04 07:47:54 UTC (rev 3037)
@@ -39,6 +39,10 @@
setInterfaceType("corba_cdr");
// ConnectorProfile setting
+
+#ifdef ORB_IS_OMNIORB
+ ::RTC::Manager::instance().theShortCutPOA()->activate_object(this);
+#endif
m_objref = this->_this();
// set InPort's reference
@@ -64,8 +68,13 @@
try
{
PortableServer::ObjectId_var oid;
+#ifdef ORB_IS_OMNIORB
+ oid = ::RTC::Manager::instance().theShortCutPOA()->servant_to_id(this);
+ ::RTC::Manager::instance().theShortCutPOA()->deactivate_object(oid);
+#else
oid = _default_POA()->servant_to_id(this);
_default_POA()->deactivate_object(oid);
+#endif
}
catch (PortableServer::POA::ServantNotActive &e)
{
Modified: trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp 2017-09-01 11:08:59 UTC (rev 3036)
+++ trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp 2017-09-04 07:47:54 UTC (rev 3037)
@@ -1205,6 +1205,13 @@
RTC_TRACE(("Manager::thePOA()"));
return m_pPOA.in();
}
+#ifdef ORB_IS_OMNIORB
+ PortableServer::POA_ptr Manager::theShortCutPOA()
+ {
+ RTC_TRACE(("Manager::theShortCutPOA()"));
+ return m_pShortCutPOA.in();
+ }
+#endif
/*!
* @if jp
* @brief Manager ¤¬»ý¤Ä RootPOA ¤Î¥Ý¥¤¥ó¥¿¤ò¼èÆÀ¤¹¤ë (½ê͸¢Ê£À½)
@@ -1217,6 +1224,13 @@
RTC_TRACE(("Manager::getPOA()"));
return PortableServer::POA::_duplicate(m_pPOA);
}
+#ifdef ORB_IS_OMNIORB
+ PortableServer::POA_ptr Manager::getShortCutPOA()
+ {
+ RTC_TRACE(("Manager::getPOA()"));
+ return PortableServer::POA::_duplicate(m_pShortCutPOA);
+ }
+#endif
/*!
* @if jp
@@ -1540,6 +1554,16 @@
}
// Get the POAManager
m_pPOAManager = m_pPOA->the_POAManager();
+#ifdef ORB_IS_OMNIORB
+#ifdef RTM_OMNIORB_42
+ CORBA::PolicyList pl;
+ pl.length(1);
+ pl[0] = omniPolicy::create_local_shortcut_policy(omniPolicy::LOCAL_CALLS_SHORTCUT);
+ m_pShortCutPOA = m_pPOA->create_POA("shortcut", m_pPOAManager, pl);
+#else
+ m_pShortCutPOA = m_pPOA;
+#endif
+#endif
#ifdef ORB_IS_OMNIORB
const char* conf = "corba.alternate_iiop_addresses";
Modified: trunk/OpenRTM-aist/src/lib/rtm/Manager.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/Manager.h 2017-09-01 11:08:59 UTC (rev 3036)
+++ trunk/OpenRTM-aist/src/lib/rtm/Manager.h 2017-09-04 07:47:54 UTC (rev 3037)
@@ -1015,6 +1015,9 @@
*/
PortableServer::POA_ptr thePOA();
+#ifdef ORB_IS_OMNIORB
+ PortableServer::POA_ptr theShortCutPOA();
+#endif
/*!
* @if jp
* @brief Manager ¤¬»ý¤Ä RootPOA ¤Î¥Ý¥¤¥ó¥¿¤ò¼èÆÀ¤¹¤ë (½ê͸¢Ê£À½)
@@ -1052,6 +1055,9 @@
* @endif
*/
PortableServer::POA_ptr getPOA();
+#ifdef ORB_IS_OMNIORB
+ PortableServer::POA_ptr getShortCutPOA();
+#endif
/*!
* @if jp
@@ -1805,6 +1811,9 @@
* @endif
*/
PortableServer::POA_var m_pPOA;
+#ifdef ORB_IS_OMNIORB
+ PortableServer::POA_var m_pShortCutPOA;
+#endif
/*!
* @if jp
Modified: trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp 2017-09-01 11:08:59 UTC (rev 3036)
+++ trunk/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp 2017-09-04 07:47:54 UTC (rev 3037)
@@ -39,6 +39,9 @@
setInterfaceType("corba_cdr");
// ConnectorProfile setting
+#ifdef ORB_IS_OMNIORB
+ ::RTC::Manager::instance().theShortCutPOA()->activate_object(this);
+#endif
m_objref = this->_this();
// set outPort's reference
@@ -70,8 +73,13 @@
try
{
PortableServer::ObjectId_var oid;
+#ifdef ORB_IS_OMNIORB
+ oid = ::RTC::Manager::instance().theShortCutPOA()->servant_to_id(this);
+ ::RTC::Manager::instance().theShortCutPOA()->deactivate_object(oid);
+#else
oid = _default_POA()->servant_to_id(this);
_default_POA()->deactivate_object(oid);
+#endif
}
catch (PortableServer::POA::ServantNotActive &e)
{
More information about the openrtm-commit
mailing list