[openrtm-commit:00122] r2147 - in branches/RELENG_1_1/OpenRTM-aist: etc src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2011年 5月 28日 (土) 00:40:30 JST


Author: n-ando
Date: 2011-05-28 00:40:30 +0900 (Sat, 28 May 2011)
New Revision: 2147

Modified:
   branches/RELENG_1_1/OpenRTM-aist/etc/rtc.conf.sample
   branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/Manager.cpp
   branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/SdoServiceAdmin.cpp
Log:
sdo.service properties have been added.
Now available sdo.service.(consumer/provider) can be found in
sdo.service.(consumer/provider).available_services.
And allowed services can be specified in 
sdo.service.(consumer/provider).allowed_services.


Modified: branches/RELENG_1_1/OpenRTM-aist/etc/rtc.conf.sample
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/etc/rtc.conf.sample	2011-05-27 09:56:11 UTC (rev 2146)
+++ branches/RELENG_1_1/OpenRTM-aist/etc/rtc.conf.sample	2011-05-27 15:40:30 UTC (rev 2147)
@@ -345,3 +345,18 @@
 # The execution cycle of ExecutionContext
 #
 exec_cxt.periodic.rate: 1000
+
+#============================================================
+# SDO service settings
+#============================================================
+#
+# SDO service consumer settings
+#
+sdo.service.consumer.available_services: [read only]
+sdo.service.consumer.allowed_services: ALL
+#
+# SDO service provider settings
+#
+sdo.service.provider.available_services: [read only]
+sdo.service.provider.allowed_services: ALL
+sdo.service.provider.providing_services: [read only]

Modified: branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/Manager.cpp	2011-05-27 09:56:11 UTC (rev 2146)
+++ branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/Manager.cpp	2011-05-27 15:40:30 UTC (rev 2147)
@@ -38,6 +38,7 @@
 #include <coil/OS.h>
 #include <rtm/FactoryInit.h>
 #include <rtm/CORBA_IORUtil.h>
+#include <rtm/SdoServiceConsumerBase.h>
 
 #if defined(minor)
 #undef minor
@@ -289,6 +290,9 @@
 	  }
       }
 
+    m_config["sdo.service.consumer.available_services"]
+      = coil::flatten(SdoServiceConsumerFactory::instance().getIdentifiers());
+
     if (m_initProc != NULL)
       {
         m_initProc(this);

Modified: branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/SdoServiceAdmin.cpp
===================================================================
--- branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/SdoServiceAdmin.cpp	2011-05-27 09:56:11 UTC (rev 2146)
+++ branches/RELENG_1_1/OpenRTM-aist/src/lib/rtm/SdoServiceAdmin.cpp	2011-05-27 15:40:30 UTC (rev 2147)
@@ -64,11 +64,16 @@
 
     // getting consumer types from RTC's properties
     ::coil::Properties& prop(m_rtobj.getProperties());
-    ::std::string constypes = prop["sdo_service.consumer_types"];
+    ::std::string constypes = prop["sdo.service.consumer.allowed_services"];
     m_consumerTypes = ::coil::split(constypes, ",", true);
-    RTC_DEBUG(("sdo_service.consumer_types: %s",
+    RTC_DEBUG(("sdo.service.consumer.allowed_services: %s",
                coil::flatten(m_consumerTypes).c_str()));
 
+    prop["sdo.service.consumer.available_services"]
+      = coil::flatten(SdoServiceConsumerFactory::instance().getIdentifiers());
+    RTC_DEBUG(("sdo.service.consumer.allowed_services: %s",
+               prop["sdo.service.consumer.available_services"].c_str()));
+
     // If types include '[Aa][Ll][Ll]', all types allowed in this RTC
     for (size_t i(0); i < m_consumerTypes.size(); ++i)
       {
@@ -77,7 +82,7 @@
         if (tmp == "all")
           {
             m_allConsumerAllowed = true;
-            RTC_DEBUG(("sdo_service.consumer_types: ALL"));
+            RTC_DEBUG(("sdo.service.consumer.allowed_services: ALL"));
           }
       }
   }



openrtm-commit メーリングリストの案内