[openrtm-commit:03143] r3202 - in trunk/OpenRTM-aist: etc etc/tao_udp src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 24日 (水) 23:54:28 JST
Author: miyamoto
Date: 2018-01-24 23:54:28 +0900 (Wed, 24 Jan 2018)
New Revision: 3202
Added:
trunk/OpenRTM-aist/etc/tao_udp/
trunk/OpenRTM-aist/etc/tao_udp/svc.conf
Modified:
trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPConsumer.cpp
Log:
[compat, TAO] UDP data port implementation.
Added: trunk/OpenRTM-aist/etc/tao_udp/svc.conf
===================================================================
--- trunk/OpenRTM-aist/etc/tao_udp/svc.conf (rev 0)
+++ trunk/OpenRTM-aist/etc/tao_udp/svc.conf 2018-01-24 14:54:28 UTC (rev 3202)
@@ -0,0 +1,2 @@
+static Advanced_Resource_Factory "-ORBProtocolFactory DIOP_Factory -ORBProtocolFactory IIOP_Factory -ORBReactorType select_st"
+
Modified: trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp 2018-01-24 03:20:38 UTC (rev 3201)
+++ trunk/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp 2018-01-24 14:54:28 UTC (rev 3202)
@@ -41,6 +41,10 @@
#include <rtm/InPortSHMConsumer.h>
#include <rtm/OutPortSHMProvider.h>
#include <rtm/OutPortSHMConsumer.h>
+#ifdef ORB_IS_TAO
+#include <rtm/InPortCorbaCdrUDPProvider.h>
+#include <rtm/InPortCorbaCdrUDPConsumer.h>
+#endif
// RTC name numbering policy
#include <rtm/NumberingPolicy.h>
@@ -72,6 +76,10 @@
InPortSHMConsumerInit();
OutPortSHMProviderInit();
OutPortSHMConsumerInit();
+#ifdef ORB_IS_TAO
+ InPortCorbaCdrUDPProviderInit();
+ InPortCorbaCdrUDPConsumerInit();
+#endif
// Naming Policy
ProcessUniquePolicyInit();
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPConsumer.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPConsumer.cpp 2018-01-24 03:20:38 UTC (rev 3201)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPConsumer.cpp 2018-01-24 14:54:28 UTC (rev 3202)
@@ -20,6 +20,13 @@
#include <rtm/InPortCorbaCdrUDPConsumer.h>
#include <rtm/CORBA_IORUtil.h>
+#ifdef ORB_IS_TAO
+#include <tao/Endpoint.h>
+#include <tao/Profile.h>
+#include <tao/Stub.h>
+#endif
+
+
namespace RTC
{
/*!
@@ -201,9 +208,31 @@
CORBA::ORB_var orb = ::RTC::Manager::instance().getORB();
+
CORBA::Object_var obj = orb->string_to_object(ior);
+
+#ifdef ORB_IS_TAO
+ TAO_Stub *stub = obj->_stubobj();
+
+ TAO_MProfile profiles = stub->base_profiles();
+
+ while (profiles.profile_count() > 1)
+ {
+ if (profiles.get_profile(0)->tag() != TAO_TAG_DIOP_PROFILE)
+ {
+ profiles.remove_profile(profiles.get_profile(0));
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ TAO_Profile* profile = stub->profile_in_use();
+ stub->base_profiles(profiles);
+#endif
if (CORBA::is_nil(obj))
{
More information about the openrtm-commit
mailing list