[openrtm-commit:02966] r3102 - in branches/RELENG_1_2/OpenRTM-aist: packages/deb packages/deb/debian packages/rpm src/lib/coil/posix/coil src/lib/rtm src/lib/rtm/idl

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 12月 10日 (日) 09:14:39 JST


Author: n-ando
Date: 2017-12-10 09:14:39 +0900 (Sun, 10 Dec 2017)
New Revision: 3102

Added:
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.h
Modified:
   branches/RELENG_1_2/OpenRTM-aist/packages/deb/control.1
   branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control
   branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control.not-multiarch
   branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ModuleManager.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/idl/Manager.idl
Log:
merged chages from trunk/OpenRTM-aist r2978-2990 during 2017-04:
[incompat,newfunc,->RELENG_1_2] CPU affinity functionality in coil implemented.
[incompt,newfunc,->RELENG_1_2] getManagerServant() and getNamingManager() have been added. refs #3273
[incompat,newfunc,->RELENG_1_2] A new operation added to the ManagerServant interface. refs #3273
[incompat,newfunc,->RELENG_1_2] A new operation implemented to the ManagerServant. refs #3273
[compat,bugfix,->RELENG_1_2] A bug that INSManager created only in master manager has been fixed.
[incompat,newfunc,->RELENG_1_2] A new operation implemented to the ManagerServant. refs #3273
[incompat,newfunc,->RELENG_1_2] To extend the RTC numbering policy, base class has been introduced. refs #3273
[incompat,newfunc,->RELENG_1_2] To extend the RTC numbering policy, base class has been introduced. refs #3273
[compat,package,->RELENG_1_2] Description of deb package in control files have been updateded. refs #4022
[compat,package,->RELENG_1_2] Description of rpm package in control files have been updateded. refs #4022
[compat,bugfix,->RELENG_1_2] Unused header include has been removed.
[incompat,return,->RELENG_1_2] Now Manager::load() function returns error code. refs #4028


Modified: branches/RELENG_1_2/OpenRTM-aist/packages/deb/control.1
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/packages/deb/control.1	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/packages/deb/control.1	2017-12-10 00:14:39 UTC (rev 3102)
@@ -2,7 +2,7 @@
 Section: main
 Priority: extra
 Maintainer: Noriaki Ando <n-ando at aist.go.jp>
-Build-Depends: debhelper, libomniorb4-dev, omniidl, omniorb-nameserver, python, uuid-dev
+Build-Depends:  debhelper (>= 9), libomniorb4-dev, omniidl4 | omniidl,  omniorb4-nameserver | omniorb-nameserver, python, uuid-dev
 Standards-Version: 3.8.4
 Homepage: http://www.openrtm.org
 
@@ -11,29 +11,29 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: OpenRTM-aist, RT-Middleware distributed by AIST
  OpenRTM-aist is a reference implementation of RTC (Robotic Technology
- Component) specification which is OMG standard. OpenRTM-aist includes
+ Component Version 1.1, formal/12-09-01) specification which is OMG
+ standard (http://www.omg.org/spec/RTC/). OpenRTM-aist includes
  RT-Middleware runtime environment and RTC framework. The OMG standard
  defines a component model and certain important infrastructure
- services applicable to the domain of robotics software development.
- OpenRTM-aist is being developed and distributed by Intelligent
- Systems Research Institute, National Institute of Advanced Industrial
- Science and Technology (AIST), Japan.
- Please see http://www.openrtm.org/ for more detail.
+ services applicable to the domain of robotics software
+ development. OpenRTM-aist is being developed and distributed by
+ National Institute of Advanced Industrial Science and Technology
+ (AIST), Japan. Please see http://www.openrtm.org/ for more detail.
 
 Package: openrtm-aist-dev
 Architecture: any
 Depends: openrtm-aist
 Description: OpenRTM-aist headers for development
- The header files and libraries needed for developing programs using
- OpenRTM-aist.
+ The header files and libraries needed for developing RT-Components
+ using OpenRTM-aist.
 
 Package: openrtm-aist-example
 Architecture: any
 Depends: openrtm-aist
 Description: OpenRTM-aist examples
- Example components and sources
+ Example components and sources of OpenRTM-aist
 
 Package: openrtm-aist-doc
 Architecture: all
 Description: Documentation for openrtm-aist
- Developer documentation.
+ Class reference manual of OpenRTM-aist.

Modified: branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control	2017-12-10 00:14:39 UTC (rev 3102)
@@ -2,7 +2,7 @@
 Section: science
 Priority: extra
 Maintainer: Noriaki Ando <n-ando at aist.go.jp>
-Build-Depends: debhelper (>= 9), libomniorb4-dev, omniidl, omniorb-nameserver, python, uuid-dev
+Build-Depends: debhelper (>= 9), libomniorb4-dev, omniidl4 | omniidl,  omniorb4-nameserver | omniorb-nameserver, python, uuid-dev
 Standards-Version: 3.8.4
 Homepage: http://www.openrtm.org
 
@@ -13,14 +13,14 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}, omniorb-nameserver
 Description: OpenRTM-aist, RT-Middleware distributed by AIST
  OpenRTM-aist is a reference implementation of RTC (Robotic Technology
- Component) specification which is OMG standard. OpenRTM-aist includes
+ Component Version 1.1, formal/12-09-01) specification which is OMG
+ standard (http://www.omg.org/spec/RTC/). OpenRTM-aist includes
  RT-Middleware runtime environment and RTC framework. The OMG standard
  defines a component model and certain important infrastructure
- services applicable to the domain of robotics software development.
- OpenRTM-aist is being developed and distributed by Intelligent
- Systems Research Institute, National Institute of Advanced Industrial
- Science and Technology (AIST), Japan.
- Please see http://www.openrtm.org/ for more detail.
+ services applicable to the domain of robotics software
+ development. OpenRTM-aist is being developed and distributed by
+ National Institute of Advanced Industrial Science and Technology
+ (AIST), Japan. Please see http://www.openrtm.org/ for more detail.
 
 Package: openrtm-aist-dev
 Architecture: any
@@ -27,8 +27,8 @@
 Multi-Arch: same
 Depends: openrtm-aist
 Description: OpenRTM-aist headers for development
- The header files and libraries needed for developing programs using
- OpenRTM-aist.
+ The header files and libraries needed for developing RT-Components
+ using OpenRTM-aist.
 
 Package: openrtm-aist-example
 Architecture: any
@@ -35,9 +35,9 @@
 Multi-Arch: same
 Depends: openrtm-aist
 Description: OpenRTM-aist examples
- Example components and sources
+ Example components and sources of OpenRTM-aist
 
 Package: openrtm-aist-doc
 Architecture: all
 Description: Documentation for openrtm-aist
- Developer documentation.
+ Class reference manual of OpenRTM-aist.

Modified: branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control.not-multiarch
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control.not-multiarch	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/packages/deb/debian/control.not-multiarch	2017-12-10 00:14:39 UTC (rev 3102)
@@ -11,29 +11,29 @@
 Depends: ${shlibs:Depends}, ${misc:Depends}, omniorb-nameserver
 Description: OpenRTM-aist, RT-Middleware distributed by AIST
  OpenRTM-aist is a reference implementation of RTC (Robotic Technology
- Component) specification which is OMG standard. OpenRTM-aist includes
+ Component Version 1.1, formal/12-09-01) specification which is OMG
+ standard (http://www.omg.org/spec/RTC/). OpenRTM-aist includes
  RT-Middleware runtime environment and RTC framework. The OMG standard
  defines a component model and certain important infrastructure
- services applicable to the domain of robotics software development.
- OpenRTM-aist is being developed and distributed by Intelligent
- Systems Research Institute, National Institute of Advanced Industrial
- Science and Technology (AIST), Japan.
- Please see http://www.openrtm.org/ for more detail.
+ services applicable to the domain of robotics software
+ development. OpenRTM-aist is being developed and distributed by
+ National Institute of Advanced Industrial Science and Technology
+ (AIST), Japan. Please see http://www.openrtm.org/ for more detail.
 
 Package: openrtm-aist-dev
 Architecture: any
 Depends: openrtm-aist
 Description: OpenRTM-aist headers for development
- The header files and libraries needed for developing programs using
- OpenRTM-aist.
+ The header files and libraries needed for developing RT-Components
+ using OpenRTM-aist.
 
 Package: openrtm-aist-example
 Architecture: any
 Depends: openrtm-aist
 Description: OpenRTM-aist examples
- Example components and sources
+ Example components and sources of OpenRTM-aist
 
 Package: openrtm-aist-doc
 Architecture: all
 Description: Documentation for openrtm-aist
- Developer documentation.
+ Class reference manual of OpenRTM-aist.

Modified: branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in	2017-12-10 00:14:39 UTC (rev 3102)
@@ -35,15 +35,15 @@
 BuildRequires: python
 
 %description
-OpenRTM-aist is a reference implementation of RTC (Robotic Technology 
-Component) specification which is OMG standard. OpenRTM-aist includes
+OpenRTM-aist is a reference implementation of RTC (Robotic Technology
+Component Version 1.1, formal/12-09-01) specification which is OMG
+standard (http://www.omg.org/spec/RTC/). OpenRTM-aist includes
 RT-Middleware runtime environment and RTC framework. The OMG standard
-defines a component model and certain important infrastructure services
-applicable to the domain of robotics software development.
-OpenRTM-aist is being developed and distributed by 
-Task Intelligence Research Group, Intelligent Systems Research Institute, 
-National Institute of Advanced Industrial Science and Technology (AIST), Japan. 
-Please see http://www.is.aist.go.jp/rt/OpenRTM-aist/html/ for more detail. 
+defines a component model and certain important infrastructure
+services applicable to the domain of robotics software
+development. OpenRTM-aist is being developed and distributed by
+National Institute of Advanced Industrial Science and Technology
+(AIST), Japan. Please see http://www.openrtm.org/ for more detail.
 
 #------------------------------------------------------------
 # devel package
@@ -51,8 +51,8 @@
 Summary: Header files
 Group: Development/Libraries
 %description devel
-The header files and libraries needed for developing programs using
-OpenRTM-aist.
+The header files and libraries needed for developing RT-Components
+using OpenRTM-aist.
 
 #------------------------------------------------------------
 # doc package
@@ -60,7 +60,7 @@
 Summary: Documentation
 Group: Development/Libraries
 %description doc
-Developer documentation.
+Class reference manual of OpenRTM-aist.
 
 #------------------------------------------------------------
 # example package
@@ -68,7 +68,7 @@
 Summary: Example
 Group: Development/Libraries
 %description example
-Example components and sources
+Example components and sources of OpenRTM-aist.
 
 #------------------------------------------------------------
 # prep section

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp (from rev 2990, trunk/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -0,0 +1,127 @@
+// -*- C++ -*-
+/*!
+ * @file Affinity.cpp
+ * @brief Processor affinity operation class
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2016
+ *     Noriaki Ando
+ *     National Institute of
+ *         Advanced Industrial Science and Technology (AIST), Japan
+ *     All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+#include <unistd.h>
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#include <pthread.h>
+#endif // _GNU_SOURCE
+#include <coil/stringutil.h>
+#include <coil/Affinity.h>
+
+namespace coil
+{
+  bool getProcCpuAffinity(CpuMask& cpu_mask)
+  {
+    pid_t pid(getpid());
+    cpu_set_t cpu_set;
+    CPU_ZERO(&cpu_set);
+
+    int result = sched_getaffinity(pid, sizeof(cpu_set_t), &cpu_set);
+    if (result != 0) { return false; }
+
+    for (size_t i(0); i < CPU_SETSIZE; ++i)
+      {
+        if (CPU_ISSET(i, &cpu_set))
+          {
+            cpu_mask.push_back((unsigned int)i);
+          }
+      }
+    return true;
+  }
+
+  bool setProcCpuAffinity(std::vector<unsigned int> mask)
+  {
+    pid_t pid(getpid());
+    cpu_set_t cpu_set;
+    CPU_ZERO(&cpu_set);
+
+    for (size_t i(0); i < mask.size(); ++i)
+      {
+        CPU_SET(i, &cpu_set);
+      }
+
+    int result = sched_setaffinity(pid, sizeof(cpu_set_t), &cpu_set);
+    if (result != 0) { return false; }
+    return true;
+  }
+
+  bool setProcCpuAffinity(std::string cpu_mask)
+  {
+    coil::vstring tmp = coil::split(cpu_mask, ",", true);
+    CpuMask mask;
+    for (size_t i(0); i < tmp.size(); ++i)
+      {
+        int num;
+        if (coil::stringTo(num, tmp[i].c_str()))
+          {
+            mask.push_back(num);
+          }
+      }
+    return setProcCpuAffinity(mask);
+  }
+
+  bool getThreadCpuAffinity(CpuMask& cpu_mask)
+  {
+    pthread_t tid(pthread_self());
+    cpu_set_t cpu_set;
+    CPU_ZERO(&cpu_set);
+
+    int result = pthread_getaffinity_np(tid, sizeof(cpu_set_t), &cpu_set);
+    if (result != 0) { return false; }
+
+    for (size_t i(0); i < CPU_SETSIZE; ++i)
+      {
+        if (CPU_ISSET(i, &cpu_set))
+          {
+            cpu_mask.push_back((unsigned int)i);
+          }
+      }
+    return true;
+  }
+
+  bool setThreadCpuAffinity(std::vector<unsigned int> mask)
+  {
+    pthread_t tid(pthread_self());
+    cpu_set_t cpu_set;
+    CPU_ZERO(&cpu_set);
+
+    for (size_t i(0); i < mask.size(); ++i)
+      {
+        CPU_SET(i, &cpu_set);
+      }
+
+    int result = pthread_setaffinity_np(tid, sizeof(cpu_set_t), &cpu_set);
+    if (result != 0) { return false; }
+    return true;
+  }
+
+  bool setThreadCpuAffinity(std::string cpu_mask)
+  {
+    coil::vstring tmp = coil::split(cpu_mask, ",", true);
+    CpuMask mask;
+    for (size_t i(0); i < tmp.size(); ++i)
+      {
+        int num;
+        if (coil::stringTo(num, tmp[i].c_str()))
+          {
+            mask.push_back(num);
+          }
+      }
+    return setThreadCpuAffinity(mask);
+  }
+}; // namespace coil

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.h (from rev 2990, trunk/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.h)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.h	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -0,0 +1,121 @@
+// -*- C++ -*-
+/*!
+ * @file Affinity.h
+ * @brief  Processor affinity operation class
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2016
+ *     Noriaki Ando
+ *     National Institute of
+ *         Advanced Industrial Science and Technology (AIST), Japan
+ *     All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef COIL_AFFINITY_H
+#define COIL_AFFINITY_H
+
+#include <string>
+#include <coil/Singleton.h>
+#include <coil/TimeValue.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+
+namespace coil
+{
+  typedef std::vector<unsigned int> CpuMask;
+  /*!
+   * @if jp
+   * @brief ¥×¥í¥»¥¹¤ÎCPU affinity¤ò¼èÆÀ¤¹¤ë
+   * @prop cpu_mask ¸½ºßÀßÄꤵ¤ì¤Æ¤¤¤ë affinity ¤¬ CPU ID¤Î
+   *                std::vector<unsigned int> ¤ÇÊÖ¤µ¤ì¤ë¡£
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Getting current process CPU affinity
+   * @prop cpu_mask Current CPU affinity mask is returned as CPU ID in
+   *                std::vector<unsigned int>.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool getProcCpuAffinity(CpuMask& cpu_mask);
+
+  /*!
+   * @if jp
+   * @brief ¥×¥í¥»¥¹¤ÎCPU affinity¤òÀßÄꤹ¤ë
+   * @prop cpu_mask ÀßÄꤹ¤ë CPU affinity ¤ò CPU ID ¤Î
+   *                std::vector<unsigned int> ¥ê¥¹¥È¤ÇÍ¿¤¨¤ë
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Setting process CPU affinity
+   * @prop cpu_mask CPU affinity mask to be set is given with CPU ID in
+   *                std::vector<unsigned int> list.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool setProcCpuAffinity(const CpuMask cpu_mask);
+
+  /*!
+   * @if jp
+   * @brief ¥×¥í¥»¥¹¤ÎCPU affinity¤òʸ»úÎó¤ÇÀßÄꤹ¤ë
+   * @prop cpu_mask ÀßÄꤹ¤ë CPU affinity ¤ò CPU ID ¤Î¥«¥ó¥Þ¶èÀÚ¤êʸ»ú
+   *                Îó¤Î¥ê¥¹¥È¤ÇÍ¿¤¨¤ë
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Setting process CPU affinity with string
+   * @prop cpu_mask CPU affinity mask to be set is given with comma
+   *                separated CPU ID string.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool setProcCpuAffinity(std::string cpu_mask);
+
+  /*!
+   * @if jp
+   * @brief ¥¹¥ì¥Ã¥É¤ÎCPU affinity¤ò¼èÆÀ¤¹¤ë
+   * @prop cpu_mask ¸½ºßÀßÄꤵ¤ì¤Æ¤¤¤ë affinity ¤¬ CPU ID¤Î
+   *                std::vector<unsigned int> ¤ÇÊÖ¤µ¤ì¤ë¡£
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Getting current process CPU affinity
+   * @prop cpu_mask Current CPU affinity mask is returned as CPU ID in
+   *                std::vector<unsigned int>.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool getThreadCpuAffinity(CpuMask& cpu_mask);
+
+  /*!
+   * @if jp
+   * @brief ¥¹¥ì¥Ã¥É¤ÎCPU affinity¤òÀßÄꤹ¤ë
+   * @prop cpu_mask ÀßÄꤹ¤ë CPU affinity ¤ò CPU ID ¤Î
+   *                std::vector<unsigned int> ¥ê¥¹¥È¤ÇÍ¿¤¨¤ë
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Setting process CPU affinity
+   * @prop cpu_mask CPU affinity mask to be set is given with CPU ID in
+   *                std::vector<unsigned int> list.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool setThreadCpuAffinity(const CpuMask cpu_mask);
+
+  /*!
+   * @if jp
+   * @brief ¥¹¥ì¥Ã¥É¤ÎCPU affinity¤òʸ»úÎó¤ÇÀßÄꤹ¤ë
+   * @prop cpu_mask ÀßÄꤹ¤ë CPU affinity ¤ò CPU ID ¤Î¥«¥ó¥Þ¶èÀÚ¤êʸ»ú
+   *                Îó¤Î¥ê¥¹¥È¤ÇÍ¿¤¨¤ë
+   * @return True: À®¸ù¡¢False: ¼ºÇÔ
+   * @else
+   * @brief Setting process CPU affinity with string
+   * @prop cpu_mask CPU affinity mask to be set is given with comma
+   *                separated CPU ID string.
+   * @return True: success, False: fail
+   * @endif
+   */
+  bool setThreadCpuAffinity(std::string mask);
+
+}; // namespace coil
+#endif // COIL_AFFINITY_H

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Makefile.am	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Makefile.am	2017-12-10 00:14:39 UTC (rev 3102)
@@ -10,6 +10,7 @@
 
 # posix API dependent sources
 COIL_PLATFORM_SRC =    \
+	Affinity.cpp   \
 	Condition.cpp  \
 	DynamicLib.cpp \
 	Mutex.cpp      \

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -84,6 +84,7 @@
     "manager.shutdown_auto",                 "YES",
     "manager.auto_shutdown_duration",        "10.0",
     "manager.name",                          "manager",
+    "manager.components.naming_policy",      "process_unique",
     "manager.command",                       "rtcd",
     "manager.supported_languages",           "C++, Python, Java",
     "manager.modules.C++.manager_cmd",       "rtcd",

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.cpp	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -79,7 +79,7 @@
   FactoryCXX::FactoryCXX(const coil::Properties& profile,
 			 RtcNewFunc new_func,
 			 RtcDeleteFunc delete_func,
-			 NumberingPolicy* policy)
+                         RTM::NumberingPolicyBase* policy)
     : FactoryBase(profile),
       m_New(new_func),
       m_Delete(delete_func),

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Factory.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -21,7 +21,7 @@
 #define RTC_FACTORY_H
 
 #include <coil/Properties.h>
-//#include <rtm/RTObject.h>
+#include <rtm/NumberingPolicyBase.h>
 #include <rtm/NumberingPolicy.h>
 
 
@@ -321,9 +321,9 @@
      * @endif
      */
     FactoryCXX(const coil::Properties& profile,
-	       RtcNewFunc new_func,
-	       RtcDeleteFunc delete_func,
-	       NumberingPolicy* policy = new DefaultNumberingPolicy());
+               RtcNewFunc new_func,
+               RtcDeleteFunc delete_func,
+               RTM::NumberingPolicyBase* policy = new RTM::ProcessUniquePolicy());
     
     virtual ~FactoryCXX()
     {
@@ -402,7 +402,7 @@
      * @brief The naming policy on creating the components
      * @endif
      */
-    NumberingPolicy* m_policy;
+    RTM::NumberingPolicyBase* m_policy;
   };
 };
 #endif // RTC_FACTORY_H

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -38,6 +38,9 @@
 #include <rtm/InPortDirectProvider.h>
 #include <rtm/InPortDirectConsumer.h>
 
+// RTC name numbering policy
+#include <rtm/NumberingPolicy.h>
+
 void FactoryInit()
 {
     // Logstream
@@ -61,4 +64,9 @@
     OutPortCorbaCdrProviderInit();
     InPortDirectProviderInit();
     InPortDirectConsumerInit();
+
+    // Naming Policy
+    ProcessUniquePolicyInit();
+    //    NodeUniquePolicyInit();
+    //    NamingServiceUniquePolicyInit();
 }

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Makefile.am	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Makefile.am	2017-12-10 00:14:39 UTC (rev 3102)
@@ -156,6 +156,7 @@
 	ExecutionContextBase.h 	 \
 	InPort.h 		 \
 	InPortConsumer.h 	 \
+	NumberingPolicyBase.h \
 	ObjectManager.h 	 \
 	OutPort.h 		 \
 	OutPortConsumer.h 	 \

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -43,6 +43,7 @@
 #include <rtm/LocalServiceAdmin.h>
 #include <rtm/SystemLogger.h>
 #include <rtm/LogstreamBase.h>
+#include <rtm/NumberingPolicyBase.h>
 
 #ifdef RTM_OS_LINUX
 #ifndef _GNU_SOURCE
@@ -542,10 +543,12 @@
    * @brief Load module
    * @endif
    */
-  void Manager::load(const char* fname, const char* initfunc)
+  ReturnCode_t Manager::load(const std::string& fname,
+                             const std::string& initfunc)
   {
     RTC_TRACE(("Manager::load(fname = %s, initfunc = %s)",
-               fname, initfunc));
+               fname.c_str(), initfunc.c_str()));
+
     std::string file_name(fname);
     std::string init_func(initfunc);
     m_listeners.module_.preLoad(file_name, init_func);
@@ -553,7 +556,7 @@
       {
         if (init_func.empty())
           {
-            coil::vstring mod(coil::split(fname, "."));
+            coil::vstring mod(coil::split(file_name, "."));
             init_func = mod[0] + "Init";
           }
         std::string path(m_module->load(file_name, init_func));
@@ -560,11 +563,35 @@
         RTC_DEBUG(("module path: %s", path.c_str()));
         m_listeners.module_.postLoad(path, init_func);
       }
+    catch(RTC::ModuleManager::NotAllowedOperation& e)
+      {
+        RTC_ERROR(("Operation not allowed: %s",
+                   e.reason.c_str()));
+        return RTC::PRECONDITION_NOT_MET;
+      }
+    catch(RTC::ModuleManager::NotFound& e)
+      {
+        RTC_ERROR(("Not found: %s",
+                   e.name.c_str()));
+        return RTC::RTC_ERROR;
+      }
+    catch(RTC::ModuleManager::InvalidArguments& e)
+      {
+        RTC_ERROR(("Invalid argument: %s",
+                   e.reason.c_str()));
+        return RTC::BAD_PARAMETER;
+      }
+    catch(RTC::ModuleManager::Error& e)
+      {
+        RTC_ERROR(("Error: %s", e.reason.c_str()));
+        return RTC::RTC_ERROR;
+      }
     catch (...)
       {
-        RTC_ERROR(("module load error."));
+        RTC_ERROR(("Unknown error."));
+        return RTC::RTC_ERROR;
       }
-    return;
+    return RTC::RTC_OK;
   }
   
   /*!
@@ -635,25 +662,37 @@
    * @endif
    */
   bool Manager::registerFactory(coil::Properties& profile,
-				RtcNewFunc new_func,
-				RtcDeleteFunc delete_func)
+                                RtcNewFunc new_func,
+                                RtcDeleteFunc delete_func)
   {
     RTC_TRACE(("Manager::registerFactory(%s)", profile["type_name"].c_str()));
+
+    std::string policy_name =
+      m_config.getProperty("manager.components.naming_policy", "default");
+    RTM::NumberingPolicyBase* policy =
+      RTM::NumberingPolicyFactory::instance().createObject(policy_name);
     FactoryBase* factory;
-    factory = new FactoryCXX(profile, new_func, delete_func);
+    if (policy == NULL)
+      {
+        factory = new FactoryCXX(profile, new_func, delete_func);
+      }
+    else
+      {
+        factory = new FactoryCXX(profile, new_func, delete_func, policy);
+      }
     try
-      {    
-	bool ret = m_factory.registerObject(factory);
-	if (!ret) {
-	  delete factory;
-	  return false;
-	}
-	return true;
+      {
+        bool ret = m_factory.registerObject(factory);
+        if (!ret) {
+          delete factory;
+          return false;
+        }
+        return true;
       }
     catch (...)
       {
-	delete factory;
-	return false;
+        delete factory;
+        return false;
       }
   }
   
@@ -1791,7 +1830,19 @@
     m_namingManager->unbindAll();
     delete m_namingManager;
   }
-  
+
+  /*!
+   * @if jp
+   * @brief NamingManager¤ò¼èÆÀ¤¹¤ë
+   * @else
+   * @brief Getting NamingManager
+   * @endif
+   */
+  NamingManager& Manager::getNamingManager()
+  {
+    return *m_namingManager;
+  }
+
   //============================================================
   // Naming initialization and finalization
   //============================================================
@@ -1937,7 +1988,19 @@
 
     return true;
   }
-  
+
+  /*!
+   * @if jp
+   * @brief ManagerServant¤ò¼èÆÀ¤¹¤ë
+   * @else
+   * @brief Getting ManagerServant
+   * @endif
+   */
+  RTM::ManagerServant& Manager::getManagerServant()
+  {
+    return *m_mgrservant;
+  }
+
   bool Manager::initLocalService()
   {
     RTC_TRACE(("Manager::initLocalService()"));

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -396,7 +396,7 @@
      * @endif
      */
     void runManager(bool no_block = false);
-    
+
     //============================================================
     // Module management
     //============================================================
@@ -409,6 +409,11 @@
      *
      * @param fname   ¥â¥¸¥å¡¼¥ë¥Õ¥¡¥¤¥ë̾
      * @param initfunc ½é´ü²½´Ø¿ô̾
+     * @return ½ªÎ»¥³¡¼¥É
+     *         RTC::RTC_OK Àµ¾ï½ªÎ»
+     *         RTC::RTC_ERROR ¥í¡¼¥É¼ºÇÔ¡¦ÉÔÌÀ¤Ê¥¨¥é¡¼
+     *         RTC::PRECONDITION_NOT_MET ÀßÄê¤Ë¤êµö²Ä¤µ¤ì¤Ê¤¤Áàºî
+     *         RTC::BAD_PARAMETER ÉÔÀµ¤Ê¥Ñ¥é¥á¡¼¥¿
      * 
      * @else
      *
@@ -419,10 +424,15 @@
      *
      * @param fname    The module file name
      * @param initfunc The initialize function name
+     * @return Return code
+     *         RTC::RTC_OK Normal return
+     *         RTC::RTC_ERROR Load failed, or unknown error
+     *         RTC::PRECONDITION_NOT_MET Not allowed operation by conf
+     *         RTC::BAD_PARAMETER Invalid parameter
      *
      * @endif
      */  
-    void load(const char* fname, const char* initfunc);
+    ReturnCode_t load(const std::string& fname, const std::string& initfunc);
     
     /*!
      * @if jp
@@ -1381,6 +1391,18 @@
      * @endif
      */
     void shutdownNaming();
+
+    /*!
+     * @if jp
+     * @brief NamingManager¤ò¼èÆÀ¤¹¤ë
+     *
+     * @else
+     *
+     * @brief Getting NamingManager
+     *
+     * @endif
+     */
+     NamingManager& getNamingManager();
     
     //============================================================
     // Component management
@@ -1624,6 +1646,18 @@
 
     /*!
      * @if jp
+     * @brief ManagerServant¤ò¼èÆÀ¤¹¤ë
+     *
+     * @else
+     *
+     * @brief Getting ManagerServant
+     *
+     * @endif
+     */
+    RTM::ManagerServant& getManagerServant();
+
+    /*!
+     * @if jp
      * @brief LocalService ¤Î½é´ü²½
      *
      * @return Timer ½é´ü²½½èÍý¼Â¹Ô·ë²Ì(½é´ü²½À®¸ù:true¡¢½é´ü²½¼ºÇÔ:false)

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -17,6 +17,8 @@
  *
  */
 #include <coil/Process.h>
+#include <coil/Properties.h>
+#include <coil/stringutil.h>
 #include <rtm/Manager.h>
 #include <rtm/ManagerServant.h>
 #include <rtm/NVUtil.h>
@@ -38,19 +40,19 @@
   {
     rtclog.setName("ManagerServant");
     coil::Properties config(m_mgr.getConfig());    
-    
+
+    if (!createINSManager())
+      {
+        RTC_WARN(("Manager CORBA servant creation failed."));
+        return;
+      }
+    RTC_INFO(("Named manager reference (INS) was successfully created."));
+
     if (coil::toBool(config["manager.is_master"], "YES", "NO", true))
       { // this is master manager
         RTC_TRACE(("This manager is master."));
-
-        if (!createINSManager())
-          {
-            RTC_WARN(("Manager CORBA servant creation failed."));
-            return;
-            
-          }
         m_isMaster = true;
-        RTC_WARN(("Manager CORBA servant was successfully created."));
+        RTC_INFO(("Master manager servant was successfully created."));
         return;
       }
     else
@@ -62,16 +64,16 @@
             owner = findManager(config["corba.master_manager"].c_str());
             if (CORBA::is_nil(owner))
               {
-                RTC_INFO(("Master manager not found"));
+                RTC_WARN(("Master manager not found"));
                 return;
               }
-            if (!createINSManager())
-              {
-                RTC_WARN(("Manager CORBA servant creation failed."));
-                return;
-              }
+            RTC_INFO(("Master manager found: %s",
+                      config["corba.master_manager"].c_str()));
+            RTC_INFO(("Adding this manager to this manager."))
             add_master_manager(owner);
+            RTC_INFO(("Register this manager to master manager."))
             owner->add_slave_manager(m_objref.in());
+            RTC_INFO(("Slave manager servant was successfully created."));
             return;
           }
         catch (...)
@@ -322,101 +324,56 @@
   RTC::RTObject_ptr ManagerServant::create_component(const char* module_name)
   {
     RTC_TRACE(("create_component(%s)", module_name));
-    
-    std::string arg(module_name);
-    std::string::size_type pos0(arg.find("&manager="));
-    std::string::size_type pos1(arg.find("?manager="));
-
-    if (pos0 == std::string::npos && pos1 == std::string::npos)
+    RTC_TRACE(("This manager is master: %s", m_isMaster ? "YES" : "NO"));
+    std::string create_arg(module_name);
+    if (create_arg.empty()) // invalid arg
       {
-        if (false) //is_master())
-          {
-            RTC_ERROR(("Master manager cannot create component: %s",
-                       module_name));
-            return RTC::RTObject::_nil();
-          }
-        // create on this manager
-        RTC::RTObject_impl* rtc = m_mgr.createComponent(module_name);
-        if (rtc == NULL)
-          {
-            return RTC::RTObject::_nil();
-          }
-        return RTC::RTObject::_duplicate(rtc->getObjRef());
-      }
-    // create other manager
-
-    // extract manager's location
-    std::string::size_type pos;
-    pos = (pos0 != std::string::npos) ? pos0 : pos1;
-    
-    std::string::size_type endpos;
-    endpos = arg.find('&', pos + 1);
-    std::string mgrstr(arg.substr(pos + 1, endpos - 1 - pos));
-    RTC_VERBOSE(("Manager arg: %s", mgrstr.c_str()));
-    coil::vstring mgrvstr(coil::split(mgrstr, ":"));
-    if (mgrvstr.size() != 2)
-      {
-        RTC_WARN(("Invalid manager name: %s", mgrstr.c_str()));
         return RTC::RTObject::_nil();
       }
-    std::string::size_type eqpos(mgrstr.find("="));
-    if (eqpos == std::string::npos)
-      {
-        RTC_WARN(("Invalid argument: %s", module_name));
-        return RTC::RTObject::_nil();
-      }
-    mgrstr.erase(0, eqpos + 1);
-    RTC_DEBUG(("Manager is %s", mgrstr.c_str()))
 
-    // find manager
-    RTM::Manager_var mgrobj = findManager(mgrstr.c_str());
-    if (CORBA::is_nil(mgrobj))
-      {
-        std::string cmd("rtcd -p ");
-        cmd += mgrvstr[1]; // port number
+    RTC::RTObject_var rtobj;
+    // create component by address
+    rtobj = createComponentByAddress(create_arg);
+    if (!CORBA::is_nil(rtobj)) { return rtobj._retn(); }
 
-        RTC_DEBUG(("Invoking command: %s.", cmd.c_str()));
-        int ret(coil::launch_shell(cmd.c_str()));
-        if (ret == -1)
-          {
-            RTC_DEBUG(("%s: failed", cmd.c_str()));
-            return RTC::RTObject::_nil();
-          }
+    // create component by manager's name
+    rtobj = createComponentByManagerName(create_arg);
+    if (!CORBA::is_nil(rtobj)) { return rtobj._retn(); }
 
-        // find manager
-        coil::usleep(10000);
-        int count(0);
-        while (CORBA::is_nil(mgrobj))
+    // === Master ===
+    // The aster manager never hosts RT-Components and it request to
+    // create to slave components.
+    if (m_isMaster)
+      {
+        Guard guard(m_slaveMutex);
+        for (size_t i(0); i < m_slaves.length(); ++i)
           {
-            mgrobj = findManager(mgrstr.c_str());
-            ++count;
-            if (count > 1000) { break; }
-            coil::usleep(10000);
+            try
+              {
+                RTC::RTObject_var rtobj;
+                rtobj = m_slaves[i]->create_component(create_arg.c_str());
+                RTC_DEBUG(("Component created %s",  create_arg.c_str()));
+                if (!CORBA::is_nil(rtobj)) { return rtobj._retn(); }
+              }
+            catch (CORBA::SystemException& e)
+              {
+                RTC_DEBUG(("Exception was caught while creating component."));
+              }
           }
+        return RTC::RTObject::_nil();
       }
 
-    if (CORBA::is_nil(mgrobj))
-      {
-        RTC_WARN(("Manager cannot be found."));
-        return RTC::RTObject::_nil();
-      }
-    
+    // === Slave ===
     // create component on the manager    
-    arg.erase(pos + 1, endpos - pos);
-    RTC_DEBUG(("Creating component on %s",  mgrstr.c_str()));
-    RTC_DEBUG(("arg: %s", arg.c_str()));
-    try
+    RTC_DEBUG(("Creating component on this manager"));
+    RTC_DEBUG(("arg: %s", create_arg.c_str()));
+    RTC::RTObject_impl* rtc = m_mgr.createComponent(create_arg.c_str());
+    if (rtc != NULL)
       {
-        RTC::RTObject_var rtobj;
-        rtobj = mgrobj->create_component(arg.c_str());
-        RTC_DEBUG(("Component created %s",  arg.c_str()));
-        return rtobj._retn();
+        return RTC::RTObject::_duplicate(rtc->getObjRef());
       }
-    catch (CORBA::SystemException& e)
-      {
-        RTC_DEBUG(("Exception was caught while creating component."));
-        return RTC::RTObject::_nil();
-      }
+
+    // no RTObject created.
     return RTC::RTObject::_nil();
   }
   
@@ -471,6 +428,7 @@
       }
 
     // get slaves' component references
+    Guard guard(m_slaveMutex);
     RTC_DEBUG(("%d slave managers exists.", m_slaves.length()));
     for (int i(0), len(m_slaves.length()); i < len; ++i)
       {
@@ -746,37 +704,134 @@
     return RTC::RTC_OK;
   }
   
-  
-  
+  /*!
+   * @if jp
+   * @brief ¥×¥í¥»¥¹¤Î¥³¥Ô¡¼¤òÀ¸À®¤¹¤ë
+   * @else
+   * @brief The copy of the process is generated.
+   * @endif
+   */
   RTC::ReturnCode_t ManagerServant::fork()
   {
     //    m_mgr.fork();
+    
     return ::RTC::RTC_OK;
   }
-  
+
+  /*!
+   * @if jp
+   * @brief shutdown¤¹¤ë
+   * @else
+   * @brief This method shutdowns RTC.
+   * @endif
+   */
   RTC::ReturnCode_t ManagerServant::shutdown()
   {
     m_mgr.terminate();
     return ::RTC::RTC_OK;
   }
-  
+
+  /*!
+   * @if jp
+   * @brief ºÆµ¯Æ°¤¹¤ë¡£
+   * @else
+   * @brief This method restarts RTC.
+   * @endif
+   */
   RTC::ReturnCode_t ManagerServant::restart()
   {
     //    m_mgr.restart();
     return ::RTC::RTC_OK;
   }
-  
+
+  /*!
+   * @if jp
+   * @brief »ØÄê̾¤ÎRTC¥ª¥Ö¥¸¥§¥¯¥È¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ
+   * @else
+   * @brief Obtain specific RTObject reference by name
+   * @endig
+   */
+  RTC::RTCList* ManagerServant::get_components_by_name(const char* name)
+  {
+    RTC_TRACE(("get_components_by_name()"));
+    ::RTC::RTCList_var crtcs = new ::RTC::RTCList();
+
+    // check argument
+    std::string tmp(name);
+    coil::eraseHeadBlank(tmp);
+    if (tmp.empty()) { return crtcs._retn(); }
+
+    std::vector<RTC::RTObject_impl*> rtcs = m_mgr.getComponents();
+    coil::vstring rtc_name = coil::split(tmp, "/");
+    for (size_t i(0); i < rtcs.size(); ++i)
+      {
+        // name = ConsoleIn0, instancename = ConsoleIn0
+        if (rtc_name.size() == 1 &&
+            rtc_name[0] == rtcs[i]->getInstanceName())
+          {
+            RTC::RTObject_var rtcref =
+              RTC::RTObject::_duplicate(rtcs[i]->getObjRef());
+#ifndef ORB_IS_RTORB
+            CORBA_SeqUtil::push_back(crtcs.inout(), rtcref.in());
+#else // ORB_IS_RTORB
+            CORBA_SeqUtil::push_back(crtcs, rtcref);
+#endif // ORB_IS_RTORB
+            continue;
+          }
+        if (rtc_name.size() < 2) { continue; } // size != 0
+
+        // name = */ConsoleIn0 instancename = ConsoleIn0   OR
+        // naem = sample/ConsoleIn0 category = sample && instance == ConsoleIn0
+        if ((rtc_name[0] == "*" &&
+             rtc_name[1] == rtcs[i]->getInstanceName()) ||
+            (rtc_name[0] == rtcs[i]->getCategory() &&
+             rtc_name[1] == rtcs[i]->getInstanceName()))
+          {
+            RTC::RTObject_var rtcref =
+              RTC::RTObject::_duplicate(rtcs[i]->getObjRef());
+#ifndef ORB_IS_RTORB
+            CORBA_SeqUtil::push_back(crtcs.inout(), rtcref.in());
+#else // ORB_IS_RTORB
+            CORBA_SeqUtil::push_back(crtcs, rtcref);
+#endif // ORB_IS_RTORB
+          }
+      }
+    return crtcs._retn();
+  }
+
+  /*!
+   * @if jp
+   * @brief RTC¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ¤¹¤ë¡£
+   * @else
+   * @brief Get the reference of RTC.
+   * @endif
+   */
   CORBA::Object_ptr ManagerServant::get_service(const char* name)
   {
     return ::CORBA::Object::_nil();
   }
-  
+
+  //======================================================================
+  // Local functions
+  /*!
+   * @if jp
+   * @brief Manager¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ¤¹¤ë¡£
+   * @else
+   * @brief Get the reference of Manager. 
+   * @endif
+   */  
   RTM::Manager_ptr ManagerServant::getObjRef() const
   {
     return m_objref;
   }
 
-
+  /*!
+   * @if jp
+   * @brief INSManager¤ÎÀ¸À®
+   * @else
+   * @brief Generate INSManager. 
+   * @endif
+   */
   bool ManagerServant::createINSManager()
   {
     try
@@ -793,7 +848,9 @@
 
         // Create readable object ID
         coil::Properties config(m_mgr.getConfig());
-        PortableServer::ObjectId_var id; 
+        PortableServer::ObjectId_var id;
+        RTC_DEBUG(("Creating named manager: %s",
+                   config["manager.name"].c_str()));
 #ifndef ORB_IS_RTORB
         id = PortableServer::string_to_ObjectId(config["manager.name"].c_str());
 #else // ORB_IS_RTORB
@@ -802,6 +859,7 @@
 #endif // ORB_IS_RTORB
 
         // Object activation
+        RTC_DEBUG(("Activating manager with id(%s)", config["manager.name"]));
         poa->activate_object_with_id(id.in(), this);
         CORBA::Object_var mgrobj = poa->id_to_reference(id);
 
@@ -822,11 +880,16 @@
     return true;
   }
 
-
-
-  RTM::Manager_ptr ManagerServant::findManager(const char* host_port)
+  /*!
+   * @if jp
+   * @brief Manager¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¸¡º÷¤¹¤ë¡£
+   * @else
+   * @brief Find the reference of Manager. 
+   * @endif
+   */
+  RTM::Manager_ptr ManagerServant::findManager(const std::string& host_port)
   {
-    RTC_TRACE(("findManager(host_port = %s)", host_port));
+    RTC_TRACE(("findManager(host_port = %s)", host_port.c_str()));
     try
       {
         coil::Properties config(m_mgr.getConfig());
@@ -875,6 +938,272 @@
     return RTM::Manager::_nil();
   }
 
+  /*!
+   * @if jp
+   * @brief »ØÄê̾¤Î¥Þ¥Í¡¼¥¸¥ã¤ò¼èÆÀ
+   * @else
+   * @brief Obtain Manager's reference by name
+   * @endif
+   */
+  RTM::Manager_ptr ManagerServant::findManagerByName(const std::string mgr_name)
+  {
+    RTC_TRACE(("findManagerByName(%s)", mgr_name.c_str()));
+
+    coil::Properties prop = m_mgr.getConfig();
+    if (mgr_name == prop["manager.instance_name"])
+      {
+        return RTM::Manager::_duplicate(getObjRef());
+      }
+    if (m_isMaster)
+      {
+        Guard guard(m_slaveMutex);
+        return findManagerFromList(mgr_name, m_slaves);
+      }
+    Guard guard(m_masterMutex);
+    return findManagerFromList(mgr_name, m_masters);
+  }
   
+  /*!
+   * @if jp
+   * @brief ¥Þ¥Í¡¼¥¸¥ã¤Î¥ê¥¹¥È¤«¤é»ØÄê̾¤ò»ý¤Ä¥Þ¥Í¡¼¥¸¥ã¤ò¼èÆÀ
+   * @else
+   * @brief Obtain Manager's reference by name
+   * @endif
+   */
+  RTM::Manager_ptr ManagerServant::findManagerFromList(const std::string name,
+                                                       RTM::ManagerList& mlist)
+  {
+    for (CORBA::ULong i(0); i < mlist.length(); ++i)
+      {
+        try
+          {
+            if (CORBA::is_nil(mlist[i])) { continue; }
+            RTM::NVList_var nvlist = mlist[i]->get_configuration();
+            if (NVUtil::isStringValue(nvlist.in(),
+                                      "manager.instance_name",
+                                      name.c_str()))
+              {
+                return RTM::Manager::_duplicate(mlist[i]); // end condition
+              }
+            RTM::ManagerList_var slist = mlist[i]->get_slave_managers();
+            if (slist->length() == 0) { continue; }
+            RTM::Manager_var mgr = findManagerFromList(name, slist.inout());
+            if (CORBA::is_nil(mgr)) { continue; }
+            return mgr._retn(); // backtrack
+          }
+        catch (...)
+          {
+            RTC_ERROR(("A slave manager thrown exception."));
+            mlist[i] = RTM::Manager::_nil();
+            CORBA_SeqUtil::erase(mlist, i);
+            --i; // list length is shortened
+            RTC_ERROR(("This slave manager is removed from slave list."));
+          }
+      }
+    return RTM::Manager::_nil();
+  }
 
+  /*!
+   * @if jp
+   * @brief »ØÄê¤Î¥Þ¥Í¡¼¥¸¥ã¤ÇRTC¤òµ¯Æ°¤¹¤ë
+   * @else
+   * @brief Launch RTC on specified manager
+   * @endif
+   */
+  RTC::RTObject_ptr
+  ManagerServant::createComponentByManagerName(const std::string create_arg)
+  {
+    RTC_TRACE(("createComponentByManagerName(%s)",create_arg.c_str()));
+    coil::mapstring param = coil::urlparam2map(create_arg);
+    for (coil::mapstring::iterator it(param.begin()); it != param.end(); ++it)
+      {
+        RTC_DEBUG(("create_arg[%s] = %s",
+                   it->first.c_str(), it->second.c_str()));
+      }
+
+    std::string mgrstr = param["manager_name"];
+    if (mgrstr.empty())
+      {
+        RTC_WARN(("No manager_name found: %s", mgrstr.c_str()));
+        return RTC::RTObject::_nil();
+      }
+
+    // detect languange
+    std::string lang = param["language"];
+    if (lang.empty()) { lang = "C++"; }
+    RTC_INFO(("Specified manager's language: %s", lang));
+
+    RTM::Manager_var mgrobj = findManagerByName(mgrstr);
+    if (CORBA::is_nil(mgrobj))
+      {
+        RTC_INFO(("Manager: %s not found.", mgrstr.c_str()));
+        RTC_INFO(("Creating new manager named %s", mgrstr.c_str()));
+
+        std::string rtcd_cmd_key("manager.modules.");
+        rtcd_cmd_key += lang + "manager_cmd";
+        coil::Properties& prop = m_mgr.getConfig();
+        std::string rtcd_cmd = prop[rtcd_cmd_key];
+
+        if (rtcd_cmd.empty())
+          {
+            RTC_WARN(("rtcd command name not found. Default rtcd is used"));
+            rtcd_cmd = "rtcd";
+          }
+        rtcd_cmd += " -o manager.is_master:NO";
+        rtcd_cmd += " -o manager.corba_servant:YES";
+        rtcd_cmd += " -o corba.master_manager:" + prop["corba.master_manager"];
+        rtcd_cmd += " -o manager.name:" + prop["manger.name"];
+        rtcd_cmd += " -o manager.instance_name:" + mgrstr;
+
+        RTC_DEBUG(("Invoking command: %s.", rtcd_cmd.c_str()));
+        int ret(coil::launch_shell(rtcd_cmd.c_str()));
+        if (ret == -1)
+          {
+            RTC_DEBUG(("%s: failed", rtcd_cmd.c_str()));
+            return RTC::RTObject::_nil();
+          }
+        coil::sleep(0.01);
+        for (size_t i(0); i < 1000; ++i)
+          {
+            RTC_DEBUG(("Detecting new slave manager (%s).", mgrstr.c_str()))
+            mgrobj = findManagerByName(mgrstr);
+            if (!CORBA::is_nil(mgrobj))
+              {
+                RTC_INFO(("New slave manager (%s) launched.", mgrstr.c_str()));
+                break;
+              }
+            RTC_DEBUG(("Waiting for slave manager started."));
+            coil::sleep(0.01);
+          }
+
+        if (CORBA::is_nil(mgrobj))
+          {
+            RTC_ERROR(("Launch failed: manager (%s)", mgrstr.c_str()));
+            return RTC::RTObject::_nil();
+          }
+        RTC_DEBUG(("Creating component on %s",  mgrstr.c_str()));
+        RTC_DEBUG(("arg: %s", create_arg.c_str()));
+        try
+          {
+            return mgrobj->create_component(create_arg.c_str());
+          }
+        catch (CORBA::SystemException& e)
+          {
+            RTC_ERROR(("Exception was caught while creating component."));
+            return RTC::RTObject::_nil();
+          }
+        catch (...)
+          {
+            RTC_ERROR(("Unknown non-CORBA exception cought."));
+            return RTC::RTObject::_nil();
+          }
+      }
+    return RTC::RTObject::_nil();
+  }
+  
+  /*
+   * @if jp
+   * @brief »ØÄꥢ¥É¥ì¥¹¤Î¥Þ¥Í¡¼¥¸¥ã¤ÇRTC¤òµ¯Æ°¤¹¤ë
+   * @else
+   * @brief Launch a RTC on the specified IP/Port address manager
+   * @endif
+   */
+  RTC::RTObject_ptr
+  ManagerServant::createComponentByAddress(const std::string create_arg)
+  {
+    RTC_TRACE(("createComponentByAddress(%s)",create_arg.c_str()));
+    coil::mapstring param = coil::urlparam2map(create_arg);
+    for (coil::mapstring::iterator it(param.begin()); it != param.end(); ++it)
+      {
+        RTC_DEBUG(("create_arg[%s] = %s",
+                   it->first.c_str(), it->second.c_str()));
+      }
+
+    std::string mgrstr = param["manager_name"];
+    if (mgrstr.empty())
+      {
+        RTC_WARN(("No manager_name found: %s", mgrstr.c_str()));
+        return RTC::RTObject::_nil();
+      }
+    
+    coil::vstring mgrvstr = coil::split(mgrstr, ":", true);
+    if (mgrvstr.size() != 2)
+      {
+        RTC_WARN(("Invalid manager name: %s", mgrstr.c_str()));
+        return RTC::RTObject::_nil();
+      }
+
+    // detect languange
+    std::string lang = param["language"];
+    if (lang.empty()) { lang = "C++"; }
+    RTC_INFO(("Specified manager's language: %s", lang));
+
+    // find manager
+    RTM::Manager_var mgrobj = findManager(mgrstr);
+
+    if (CORBA::is_nil(mgrobj))
+      {
+        RTC_INFO(("Manager: %s not found.", mgrstr.c_str()));
+        RTC_INFO(("Creating new manager named %s", mgrstr.c_str()));
+
+        std::string rtcd_cmd_key("manager.modules.");
+        rtcd_cmd_key += lang + "manager_cmd";
+        coil::Properties& prop = m_mgr.getConfig();
+        std::string rtcd_cmd = prop[rtcd_cmd_key];
+
+        if (rtcd_cmd.empty())
+          {
+            RTC_WARN(("rtcd command name not found. Default rtcd is used."));
+            rtcd_cmd = "rtcd";
+          }
+        rtcd_cmd += " -o corba.master_manager:" + mgrstr;
+        rtcd_cmd += " -d ";
+
+        RTC_DEBUG(("Invoking command: %s.", rtcd_cmd.c_str()));
+        int ret(coil::launch_shell(rtcd_cmd.c_str()));
+        if (ret == -1)
+          {
+            RTC_DEBUG(("%s: failed", rtcd_cmd.c_str()));
+            return RTC::RTObject::_nil();
+          }
+
+        coil::sleep(0.01);
+        for (size_t i(0); i < 1000; ++i)
+          {
+            RTC_DEBUG(("Detecting new slave manager (%s).", mgrstr.c_str()))
+            mgrobj = findManagerByName(mgrstr);
+            if (!CORBA::is_nil(mgrobj))
+              {
+                RTC_INFO(("New slave manager (%s) launched.", mgrstr.c_str()));
+                break;
+              }
+            RTC_DEBUG(("Waiting for slave manager started."));
+            coil::sleep(0.01);
+          }
+
+        if (CORBA::is_nil(mgrobj))
+          {
+            RTC_ERROR(("Launch failed: manager (%s)", mgrstr.c_str()));
+            return RTC::RTObject::_nil();
+          }
+
+        RTC_DEBUG(("Creating component on %s",  mgrstr.c_str()));
+        RTC_DEBUG(("arg: %s", create_arg.c_str()));
+        try
+          {
+            return mgrobj->create_component(create_arg.c_str());
+          }
+        catch (CORBA::SystemException& e)
+          {
+            RTC_ERROR(("Exception was caught while creating component."));
+            return RTC::RTObject::_nil();
+          }
+        catch (...)
+          {
+            RTC_ERROR(("Unknown non-CORBA exception cought."));
+            return RTC::RTObject::_nil();
+          }
+      }
+    return RTC::RTObject::_nil();
+  }
 };

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ManagerServant.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -498,8 +498,6 @@
      */
     RTC::ReturnCode_t remove_slave_manager(RTM::Manager_ptr mgr);
 
-
-
     /*!
      * @if jp
      * @brief ¥×¥í¥»¥¹¤Î¥³¥Ô¡¼¤òÀ¸À®¤¹¤ë
@@ -531,6 +529,23 @@
      */
     RTC::ReturnCode_t restart();
 
+     /*!
+     * @if jp
+     * @brief »ØÄê̾¤ÎRTC¥ª¥Ö¥¸¥§¥¯¥È¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ
+     *
+     * @param name RTC̾
+     * @return RTC¥ê¥¹¥È
+     *
+     * @else
+     * @brief 
+     *
+     * @param name name
+     * @return list of RTC
+     *
+     * @endig
+     */
+    RTC::RTCList* get_components_by_name(const char* name);
+
     /*!
      * @if jp
      * @brief RTC¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ¤¹¤ë¡£
@@ -573,8 +588,108 @@
      * @return Manager reference
      * @endif
      */
-    RTM::Manager_ptr findManager(const char* host_port);
+    RTM::Manager_ptr findManager(const std::string& host_port);
 
+    /*!
+      * @if jp
+      * @brief »ØÄê̾¤Î¥Þ¥Í¡¼¥¸¥ã¤ò¼èÆÀ
+      *
+      * ¥Þ¥Í¡¼¥¸¥ã¤¬¥Þ¥¹¥¿¡¼¤Î¾ì¹ç¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¹¥ì¡¼¥Ö¥Þ¥Í¡¼¥¸¥ã¤«
+      * ¤é¸¡º÷¤¹¤ë¡£¥Þ¥Í¡¼¥¸¥ã¤¬¥¹¥ì¡¼¥Ö¤Î¾ì¹ç¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥Þ¥¹¥¿¡¼
+      * ¥Þ¥Í¡¼¥¸¥ã¤«¤é¥¹¥ì¡¼¥Ö¥Þ¥Í¡¼¥¸¥ã¤ò¸¡º÷¤¹¤ë
+      *
+      * @param manager_name ¥Þ¥Í¡¼¥¸¥ã̾
+      * @return ¥Þ¥Í¡¼¥¸¥ã¤Î»²¾È
+      *
+      * @else
+      * @brief Obtain Manager's reference by name
+      *
+      * If this is master manager, find it from the registered slave managers.
+      * If this is slave manager, request it to its master manager.
+      *
+      * @param manager_name Manager's name
+      * @return Manager's object reference 
+      * @endif
+      */
+    RTM::Manager_ptr findManagerByName(const std::string mgr_name);
+
+    /*!
+      * @if jp
+      * @brief ¥Þ¥Í¡¼¥¸¥ã¤Î¥ê¥¹¥È¤«¤é»ØÄê̾¤ò»ý¤Ä¥Þ¥Í¡¼¥¸¥ã¤ò¼èÆÀ
+      *
+      * °ú¿ô¤ËÍ¿¤¨¤é¤ì¤¿¥Þ¥Í¡¼¥¸¥ã¤ËÂФ·¤Æ¡¢»ØÄꤵ¤ì¤¿¥Þ¥Í¡¼¥¸¥ã̾¤ò»ý
+      * ¤Ä¥Þ¥Í¡¼¥¸¥ã¤Î»²¾È¤òÊÖ¤¹¤È¤È¤â¤Ë¡¢¤â¤·¤Ê¤±¤ì¤Ð¡¢ºÆµ¢Åª¤Ë¥¹¥ì¡¼
+      * ¥Ö¥Þ¥Í¡¼¥¸¥ã¤òõº÷¤·¤Æ¡¢»ØÄꤵ¤ì¤¿Ì¾¾Î¤ò»ý¤Ä¥Þ¥Í¡¼¥¸¥ã¤Î»²¾È¤ò
+      * ÊÖ¤¹¡£¤³¤Î´Ø¿ô¤Ï¥¯¥é¥¹Æ⤫¤é¸Æ¤Ö¤¿¤á¤ÎÆâÉô´Ø¿ô¤Ç¤¢¤ë¡£°ú¿ô¤ËÍ¿
+      * ¤¨¤ë¥Þ¥Í¡¼¥¸¥ã¥ê¥¹¥È¤ÏɬÍפ˱þ¤¸¤ÆMutex¤ÇÊݸ¤ë¤³¤È¡£
+      *
+      * @param manager_name ¥Þ¥Í¡¼¥¸¥ã̾
+      * @param mlist ¥Þ¥Í¡¼¥¸¥ã¤Î¥ê¥¹¥È
+      * @return ¥Þ¥Í¡¼¥¸¥ã¤Î»²¾È
+      *
+      * @else
+      * @brief Obtain Manager's reference by name
+      *
+      * This function search a specified name manager from the given
+      * manager list. And if it is not found, this function also
+      * search from its slave managers recursively. This function is
+      * internal function. The given manager list must be guarded by
+      * mutex.
+      *
+      * @param manager_name Manager's name
+      * @param mlist Manager list
+      * @return Manager's object reference 
+      * @endif
+      */
+    RTM::Manager_ptr findManagerFromList(const std::string name,
+                                         RTM::ManagerList& mlist);
+
+    /*!
+     * @if jp
+     * @brief »ØÄê¤Î¥Þ¥Í¡¼¥¸¥ã¤ÇRTC¤òµ¯Æ°¤¹¤ë
+     *
+     * comp&manager_name=mgr ¤Î¤è¤¦¤ËRTC̾&manager_name=¥Þ¥Í¡¼¥¸¥ã̾¤È
+     * »ØÄꤹ¤ë
+     *
+     * @param module_name µ¯Æ°¤¹¤ëRTC¡¢¥Þ¥Í¡¼¥¸¥ã̾
+     * @return À¸À®¤µ¤ì¤¿RTC¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È
+     *
+     * @else
+     *
+     * @brief Launch RTC on specified manager
+     *
+     * Manager is specified with "manager_name" key such as
+     * "comp&manager_name=mgr" in the RTC launch parameter.
+     *
+     * @param module_name Given parameter to create RTC
+     * @return created RTObject object reference
+     *
+     * @endif
+     */
+    RTC::RTObject_ptr
+    createComponentByManagerName(const std::string module_name);
+
+    /*
+     * @if jp
+     * @brief »ØÄꥢ¥É¥ì¥¹¤Î¥Þ¥Í¡¼¥¸¥ã¤ÇRTC¤òµ¯Æ°¤¹¤ë
+     *
+     * comp&manager_address=localhost:2810 ¤Î¤è¤¦¤ËRTC̾
+     * &manager_address=¥Þ¥Í¡¼¥¸¥ã¤Î¥Û¥¹¥È̾¡¢¥Ý¡¼¥ÈÈÖ¹æ¤ò»ØÄꤹ¤ë
+     *
+     * @param module_name µ¯Æ°¤¹¤ëRTC¡¢¥Þ¥Í¡¼¥¸¥ã¤Î¥Û¥¹¥È¥¢¥É¥ì¥¹
+     * @return À¸À®¤µ¤ì¤¿RTC¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È
+     *
+     * @else
+     * @brief Launch a RTC on the specified IP/Port address manager
+     *
+     * @param module_name Given parameter to create RTC
+     * @return created RTObject object reference
+     *
+     * @endif
+     */
+    RTC::RTObject_ptr
+    createComponentByAddress(const std::string module_name);
+
   private:
     typedef coil::Guard<coil::Mutex> Guard;
     /*!

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ModuleManager.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ModuleManager.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ModuleManager.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -5,7 +5,7 @@
  * @date $Date: 2007-12-31 03:08:04 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2017
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -20,70 +20,92 @@
 #include <rtm/NumberingPolicy.h>
 #include <coil/stringutil.h>
 
-//============================================================
-// DefaultNumberingPolicy
-//============================================================
-/*!
- * @if jp
- * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
- * @else
- * @brief Create the name when creating objects
- * @endif
- */
-std::string DefaultNumberingPolicy::onCreate(void* obj)
+namespace RTM
 {
-  std::vector<void*>::size_type pos;
+  //============================================================
+  // DefaultNumberingPolicy
+  //============================================================
+  /*!
+   * @if jp
+   * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
+   * @else
+   * @brief Create the name when creating objects
+   * @endif
+   */
+  std::string ProcessUniquePolicy::onCreate(void* obj)
+  {
+    std::vector<void*>::size_type pos;
+    
+    ++m_num;
+    
+    try
+      {
+        pos = find(NULL);
+        m_objects[pos] = obj;
+        return coil::otos(pos);
+      }
+    catch (ObjectNotFound& e)
+      {
+        (void)(e);
+        m_objects.push_back(obj);
+        return coil::otos((int)(m_objects.size() - 1));
+      }
+  }
   
-  ++m_num;
+  /*!
+   * @if jp
+   * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
+   * @else
+   * @brief Delete the name when deleting objects
+   * @endif
+   */
+  void ProcessUniquePolicy::onDelete(void* obj)
+  {
+    std::vector<void*>::size_type pos;
+    pos = find(obj);
+    if (pos < m_objects.size())
+      {
+        m_objects[pos] = NULL;
+      }
+    --m_num;
+  }
   
-  try
-    {
-      pos = find(NULL);
-      m_objects[pos] = obj;
-      return coil::otos(pos);
-    }
-  catch (ObjectNotFound& e)
-    {
-      (void)(e);
-      m_objects.push_back(obj);
-      return coil::otos((int)(m_objects.size() - 1));
-    }
-}
+  /*!
+   * @if jp
+   * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷
+   * @else
+   * @brief Find the object
+   * @endif
+   */
+  long int ProcessUniquePolicy::find(void* obj)
+  {
+    std::vector<void*>::size_type len(m_objects.size());
+    std::vector<void*>::size_type i(0);
+    for (i = 0; i < len; ++i)
+      {
+        if (m_objects[i] == obj) return i;
+      }
+    throw ObjectNotFound();
+    return i;
+  }
+}; //namespace RTM  
 
-/*!
- * @if jp
- * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
- * @else
- * @brief Delete the name when deleting objects
- * @endif
- */
-void DefaultNumberingPolicy::onDelete(void* obj)
+extern "C"
 {
-  std::vector<void*>::size_type pos;
-  pos = find(obj);
-  if (pos < m_objects.size())
-    {
-      m_objects[pos] = NULL;
-    }
-  --m_num;
-}
+  void ProcessUniquePolicyInit()
+  {
+    ::RTM::NumberingPolicyFactory::
+      instance().addFactory("default",
+                            ::coil::Creator< ::RTM::NumberingPolicyBase,
+                                             ::RTM::ProcessUniquePolicy>,
+                            ::coil::Destructor< ::RTM::NumberingPolicyBase,
+                                                ::RTM::ProcessUniquePolicy>);
+    ::RTM::NumberingPolicyFactory::
+      instance().addFactory("process_unique",
+                            ::coil::Creator< ::RTM::NumberingPolicyBase,
+                                             ::RTM::ProcessUniquePolicy>,
+                            ::coil::Destructor< ::RTM::NumberingPolicyBase,
+                                                ::RTM::ProcessUniquePolicy>);
+  }
+};
 
-/*!
- * @if jp
- * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷
- * @else
- * @brief Find the object
- * @endif
- */
-long int DefaultNumberingPolicy::find(void* obj)
-{
-  std::vector<void*>::size_type len(m_objects.size());
-  std::vector<void*>::size_type i(0);
-  for (i = 0; i < len; ++i)
-    {
-      if (m_objects[i] == obj) return i;
-    }
-  throw ObjectNotFound();
-  return i;
-}
-

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.h	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicy.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /*!
- * @file NumberingPolicy.h
+ * @file ProcessUniquePolicy.h
  * @brief Object numbering policy class
  * @date $Date: 2007-12-31 03:08:04 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
@@ -22,244 +22,154 @@
 
 #include <string>
 #include <vector>
+#include <rtm/RTC.h>
+#include <rtm/NumberingPolicyBase.h>
 
-/*!
- * @if jp
- *
- * @class NumberingPolicy
- * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)´ÉÍýÍÑÃê¾Ý¥¯¥é¥¹
- *
- * ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ëºÝ¤Î¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î
- * Ãê¾Ý¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥¯¥é¥¹¡£
- * ¶ñ¾Ý¥¯¥é¥¹¤Ï¡¢°Ê²¼¤Î½ã¿è²¾ÁÛ´Ø¿ô¤Î¼ÂÁõ¤òÄ󶡤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
- * - onCreate() : ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
- * - onDelete() : ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
- *
- * @since 0.4.0
- *
- * @else
- * @class NumberingPolicy
- * @brief Abstruct class for naming policy management when creating objects
- *
- * This is the abstract interface class to manage the naming policy when
- * creating objects.
- * Concrete classes must implement the following pure virtual functions.
- * - onCreate() : Create the name when creating objects.
- * - onDelete() : Delete the name when deleting objects.
- *
- * @since 0.4.0
- *
- * @endif
- */
-class NumberingPolicy
+namespace RTM
 {
-public:
   /*!
    * @if jp
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥È̤ȯ¸«Îã³°½èÍýÍѹ½Â¤ÂÎ
-   * @else
-   * @brief The structures for exception handling when object was not
-   *        found.
-   * @endif
-   */
-  struct ObjectNotFound {};
-  
-  /*!
-   * @if jp
    *
-   * @brief ²¾Áۥǥ¹¥È¥é¥¯¥¿
-   * 
-   * @else
+   * @class DefaultNumberingPolicy
+   * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)´ÉÍýÍÑ¥¯¥é¥¹
    *
-   * @brief Virtual destractor
+   * ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ëºÝ¤Î¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î
+   * ¥¯¥é¥¹¡£
    *
-   * @endif
-   */
-  virtual ~NumberingPolicy(void){};
-  
-  /*!
-   * @if jp
+   * @since 0.4.0
    *
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
-   *
-   * ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾Î¤òÀ¸À®¤¹¤ë¤¿¤á¤Î½ã¿è²¾ÁÛ´Ø¿ô
-   * 
-   * @param obj ̾¾ÎÀ¸À®Âоݥª¥Ö¥¸¥§¥¯¥È
-   *
-   * @return À¸À®¤·¤¿¥ª¥Ö¥¸¥§¥¯¥È̾¾Î
-   *
    * @else
    *
-   * @brief Create the name when creating objects
+   * @class DefaultNumberingPolicy
+   * @brief Class for naming policy management when creating objects
    *
-   * Pure virtual function to create the name when creating objects.
-   * 
-   * @param obj The target object for the creation
+   * This is a class to manage the naming policy when creating objects.
    *
-   * @return Name of the created object
+   * @since 0.4.0
    *
    * @endif
    */
-  virtual std::string onCreate(void* obj) = 0;
-  
-  /*!
-   * @if jp
-   *
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
-   *
-   * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Ë̾¾Î¤ò²òÊü¤¹¤ë¤¿¤á¤Î½ã¿è²¾ÁÛ´Ø¿ô
-   * 
-   * @param obj ̾¾Î²òÊüÂоݥª¥Ö¥¸¥§¥¯¥È
-   *
-   * @else
-   *
-   * @brief Delete the name when deleting objects
-   *
-   * Pure virtual function to delete the name when deleting object.
-   * 
-   * @param obj The target object of the delete
-   *
-   * @endif
-   */
-  virtual void onDelete(void* obj) = 0;
-};
+  class ProcessUniquePolicy
+    : public NumberingPolicyBase
+  {
+  public:
+    /*!
+     * @if jp
+     *
+     * @brief ¥³¥ó¥¹¥È¥é¥¯¥¿
+     *
+     * ¥³¥ó¥¹¥È¥é¥¯¥¿
+     *
+     * @else
+     *
+     * @brief Constructor
+     *
+     * Constructor
+     *
+     * @endif
+     */
+    ProcessUniquePolicy() : m_num(0) {};
+    
+    /*!
+     * @if jp
+     *
+     * @brief ¥Ç¥¹¥È¥é¥¯¥¿
+     * 
+     * @else
+     *
+     * @brief Destractor
+     *
+     * @endif
+     */
+    virtual ~ProcessUniquePolicy(void){};
+    
+    /*!
+     * @if jp
+     *
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
+     *
+     * ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾Î¤òÀ¸À®¤¹¤ë¡£
+     * À¸À®ºÑ¤ß¥¤¥ó¥¹¥¿¥ó¥¹¤Î¿ô¤Ë±þ¤¸¤¿Ì¾¾Î¤òÀ¸À®¤¹¤ë¡£
+     * 
+     * @param obj ̾¾ÎÀ¸À®Âоݥª¥Ö¥¸¥§¥¯¥È
+     *
+     * @return À¸À®¤·¤¿¥ª¥Ö¥¸¥§¥¯¥È̾¾Î
+     *
+     * @else
+     *
+     * @brief Create the name when creating object
+     *
+     * Create the name when creating object.
+     * Create the name corresponding to the number of generated instances.
+     * 
+     * @param obj The target object for the name creation
+     *
+     * @return Names of the created object
+     *
+     * @endif
+     */
+    virtual std::string onCreate(void* obj);
+    
+    /*!
+     * @if jp
+     *
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
+     *
+     * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Ë̾¾Î¤ò²òÊü¤¹¤ë¡£
+     * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤ËÀ¸À®ºÑ¤ß¥¤¥ó¥¹¥¿¥ó¥¹¿ô¤ò¸º»»¤¹¤ë¡£
+     * 
+     * @param obj ̾¾Î²òÊüÂоݥª¥Ö¥¸¥§¥¯¥È
+     *
+     * @else
+     *
+     * @brief Delete the name when deleting object
+     *
+     * Delete the name when deleting object.
+     * Substract the generated number of instances when deleting the object.
+     * 
+     * @param obj The target object for the name delete
+     *
+     * @endif
+     */
+    virtual void onDelete(void* obj);
+    
+  protected:
+    /*!
+     * @if jp
+     *
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷
+     *
+     * ¥ª¥Ö¥¸¥§¥¯¥È¥ê¥¹¥È¤«¤é»ØÄꤵ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤ò¸¡º÷¤·¡¢
+     * ³ºÅö¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤¬³ÊǼ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÖ¤¹¡£
+     * 
+     * @param obj ¸¡º÷Âоݥª¥Ö¥¸¥§¥¯¥È
+     *
+     * @return ¥ª¥Ö¥¸¥§¥¯¥È³ÊǼ¥¤¥ó¥Ç¥Ã¥¯¥¹
+     *
+     * @else
+     *
+     * @brief Find the object
+     *
+     * Find the specified object in the object list and return its index
+     * when it is stored.
+     * 
+     * @param obj The target object for the find
+     *
+     * @return Object index for storage
+     *
+     * @endif
+     */
+    long int find(void* obj);
+    
+  private:
+    int m_num;
+    std::vector<void*> m_objects;
+  };
+}; // namespace RTM
 
-/*!
- * @if jp
- *
- * @class DefaultNumberingPolicy
- * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)´ÉÍýÍÑ¥¯¥é¥¹
- *
- * ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ëºÝ¤Î¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î
- * ¥¯¥é¥¹¡£
- *
- * @since 0.4.0
- *
- * @else
- *
- * @class DefaultNumberingPolicy
- * @brief Class for naming policy management when creating objects
- *
- * This is a class to manage the naming policy when creating objects.
- *
- * @since 0.4.0
- *
- * @endif
- */
-class DefaultNumberingPolicy
-  : public NumberingPolicy 
+extern "C"
 {
-public:
-  /*!
-   * @if jp
-   *
-   * @brief ¥³¥ó¥¹¥È¥é¥¯¥¿
-   * 
-   * ¥³¥ó¥¹¥È¥é¥¯¥¿
-   * 
-   * @else
-   *
-   * @brief Constructor
-   * 
-   * Constructor
-   * 
-   * @endif
-   */
-  DefaultNumberingPolicy() : m_num(0) {};
-  
-  /*!
-   * @if jp
-   *
-   * @brief ¥Ç¥¹¥È¥é¥¯¥¿
-   * 
-   * @else
-   *
-   * @brief Destractor
-   *
-   * @endif
-   */
-  virtual ~DefaultNumberingPolicy(void){};
-  
-  /*!
-   * @if jp
-   *
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
-   *
-   * ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾Î¤òÀ¸À®¤¹¤ë¡£
-   * À¸À®ºÑ¤ß¥¤¥ó¥¹¥¿¥ó¥¹¤Î¿ô¤Ë±þ¤¸¤¿Ì¾¾Î¤òÀ¸À®¤¹¤ë¡£
-   * 
-   * @param obj ̾¾ÎÀ¸À®Âоݥª¥Ö¥¸¥§¥¯¥È
-   *
-   * @return À¸À®¤·¤¿¥ª¥Ö¥¸¥§¥¯¥È̾¾Î
-   *
-   * @else
-   *
-   * @brief Create the name when creating object
-   *
-   * Create the name when creating object.
-   * Create the name corresponding to the number of generated instances.
-   * 
-   * @param obj The target object for the name creation
-   *
-   * @return Names of the created object
-   *
-   * @endif
-   */
-  virtual std::string onCreate(void* obj);
-  
-  /*!
-   * @if jp
-   *
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
-   *
-   * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Ë̾¾Î¤ò²òÊü¤¹¤ë¡£
-   * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤ËÀ¸À®ºÑ¤ß¥¤¥ó¥¹¥¿¥ó¥¹¿ô¤ò¸º»»¤¹¤ë¡£
-   * 
-   * @param obj ̾¾Î²òÊüÂоݥª¥Ö¥¸¥§¥¯¥È
-   *
-   * @else
-   *
-   * @brief Delete the name when deleting object
-   *
-   * Delete the name when deleting object.
-   * Substract the generated number of instances when deleting the object.
-   * 
-   * @param obj The target object for the name delete
-   *
-   * @endif
-   */
-  virtual void onDelete(void* obj);
-  
-protected:
-  /*!
-   * @if jp
-   *
-   * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷
-   *
-   * ¥ª¥Ö¥¸¥§¥¯¥È¥ê¥¹¥È¤«¤é»ØÄꤵ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤ò¸¡º÷¤·¡¢
-   * ³ºÅö¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤¬³ÊǼ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÊÖ¤¹¡£
-   * 
-   * @param obj ¸¡º÷Âоݥª¥Ö¥¸¥§¥¯¥È
-   *
-   * @return ¥ª¥Ö¥¸¥§¥¯¥È³ÊǼ¥¤¥ó¥Ç¥Ã¥¯¥¹
-   *
-   * @else
-   *
-   * @brief Find the object
-   *
-   * Find the specified object in the object list and return its index
-   * when it is stored.
-   * 
-   * @param obj The target object for the find
-   *
-   * @return Object index for storage
-   *
-   * @endif
-   */
-  long int find(void* obj);
-  
-private:
-  int m_num;
-  std::vector<void*> m_objects;
+  void DLL_EXPORT ProcessUniquePolicyInit();
 };
+
 #endif // RTC_NUMBERINGPOLICY_H

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.cpp (from rev 2990, trunk/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.cpp)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.cpp	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.cpp	2017-12-10 00:14:39 UTC (rev 3102)
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+/*!
+ * @file NumberingPolicy.cpp
+ * @brief Object numbering policy class
+ * @date $Date: 2007-12-31 03:08:04 $
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2006-2008
+ *     Noriaki Ando
+ *     Task-intelligence Research Group,
+ *     Intelligent Systems Research Institute,
+ *     National Institute of
+ *         Advanced Industrial Science and Technology (AIST), Japan
+ *     All rights reserved.
+ *
+ * $Id: NumberingPolicy.cpp 1370 2009-05-22 08:17:09Z n-ando $
+ *
+ */
+
+#include <rtm/NumberingPolicy.h>
+#include <coil/stringutil.h>
+
+//============================================================
+// DefaultNumberingPolicy
+//============================================================
+/*!
+ * @if jp
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
+ * @else
+ * @brief Create the name when creating objects
+ * @endif
+ */
+std::string DefaultNumberingPolicy::onCreate(void* obj)
+{
+  std::vector<void*>::size_type pos;
+  
+  ++m_num;
+  
+  try
+    {
+      pos = find(NULL);
+      m_objects[pos] = obj;
+      return coil::otos(pos);
+    }
+  catch (ObjectNotFound& e)
+    {
+      (void)(e);
+      m_objects.push_back(obj);
+      return coil::otos((int)(m_objects.size() - 1));
+    }
+}
+
+/*!
+ * @if jp
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
+ * @else
+ * @brief Delete the name when deleting objects
+ * @endif
+ */
+void DefaultNumberingPolicy::onDelete(void* obj)
+{
+  std::vector<void*>::size_type pos;
+  pos = find(obj);
+  if (pos < m_objects.size())
+    {
+      m_objects[pos] = NULL;
+    }
+  --m_num;
+}
+
+/*!
+ * @if jp
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤Î¸¡º÷
+ * @else
+ * @brief Find the object
+ * @endif
+ */
+long int DefaultNumberingPolicy::find(void* obj)
+{
+  std::vector<void*>::size_type len(m_objects.size());
+  std::vector<void*>::size_type i(0);
+  for (i = 0; i < len; ++i)
+    {
+      if (m_objects[i] == obj) return i;
+    }
+  throw ObjectNotFound();
+  return i;
+}
+

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.h (from rev 2990, trunk/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.h)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.h	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/NumberingPolicyBase.h	2017-12-10 00:14:39 UTC (rev 3102)
@@ -0,0 +1,135 @@
+// -*- C++ -*-
+/*!
+ * @file NumberingPolicyBase.h
+ * @brief Object numbering policy base class
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2017
+ *     Noriaki Ando
+ *     National Institute of
+ *         Advanced Industrial Science and Technology (AIST), Japan
+ *     All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef RTC_NUMBERINGPOLICYBASE_H
+#define RTC_NUMBERINGPOLICYBASE_H
+
+#include <string>
+#include <vector>
+#include <coil/Factory.h>
+
+namespace RTM
+{
+  /*!
+   * @if jp
+   *
+   * @class NumberingPolicyBase
+   * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)´ÉÍýÍÑÃê¾Ý¥¯¥é¥¹
+   *
+   * ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ëºÝ¤Î¥Í¡¼¥ß¥ó¥°¡¦¥Ý¥ê¥·¡¼(̿̾µ¬Â§)¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î
+   * Ãê¾Ý¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥¯¥é¥¹¡£
+   * ¶ñ¾Ý¥¯¥é¥¹¤Ï¡¢°Ê²¼¤Î½ã¿è²¾ÁÛ´Ø¿ô¤Î¼ÂÁõ¤òÄ󶡤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+   * - onCreate() : ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
+   * - onDelete() : ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
+   *
+   * @since 1.2
+   *
+   * @else
+   * @class NumberingPolicy
+   * @brief Abstruct class for naming policy management when creating objects
+   *
+   * This is the abstract interface class to manage the naming policy when
+   * creating objects.
+   * Concrete classes must implement the following pure virtual functions.
+   * - onCreate() : Create the name when creating objects.
+   * - onDelete() : Delete the name when deleting objects.
+   *
+   * @since 0.4.0
+   *
+   * @endif
+   */
+  class NumberingPolicyBase
+  {
+  public:
+    /*!
+     * @if jp
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥È̤ȯ¸«Îã³°½èÍýÍѹ½Â¤ÂÎ
+     * @else
+     * @brief The structures for exception handling when object was not
+     *        found.
+     * @endif
+     */
+    struct ObjectNotFound {};
+    
+    /*!
+     * @if jp
+     *
+     * @brief ²¾Áۥǥ¹¥È¥é¥¯¥¿
+     * 
+     * @else
+     *
+     * @brief Virtual destractor
+     *
+     * @endif
+     */
+    virtual ~NumberingPolicyBase(void) {};
+    
+    /*!
+     * @if jp
+     *
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾ÎºîÀ®
+     *
+     * ¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®»þ¤Î̾¾Î¤òÀ¸À®¤¹¤ë¤¿¤á¤Î½ã¿è²¾ÁÛ´Ø¿ô
+     * 
+     * @param obj ̾¾ÎÀ¸À®Âоݥª¥Ö¥¸¥§¥¯¥È
+     *
+     * @return À¸À®¤·¤¿¥ª¥Ö¥¸¥§¥¯¥È̾¾Î
+     *
+     * @else
+     *
+     * @brief Create the name when creating objects
+     *
+     * Pure virtual function to create the name when creating objects.
+     * 
+     * @param obj The target object for the creation
+     *
+     * @return Name of the created object
+     *
+     * @endif
+     */
+    virtual std::string onCreate(void* obj) = 0;
+    
+    /*!
+     * @if jp
+     *
+     * @brief ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Î̾¾Î²òÊü
+     *
+     * ¥ª¥Ö¥¸¥§¥¯¥Èºï½ü»þ¤Ë̾¾Î¤ò²òÊü¤¹¤ë¤¿¤á¤Î½ã¿è²¾ÁÛ´Ø¿ô
+     * 
+     * @param obj ̾¾Î²òÊüÂоݥª¥Ö¥¸¥§¥¯¥È
+     *
+     * @else
+     *
+     * @brief Delete the name when deleting objects
+     *
+     * Pure virtual function to delete the name when deleting object.
+     * 
+     * @param obj The target object of the delete
+     *
+     * @endif
+     */
+    virtual void onDelete(void* obj) = 0;
+  };
+  
+  typedef coil::GlobalFactory<NumberingPolicyBase> NumberingPolicyFactory;
+  
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
+  EXTERN template class DLL_PLUGIN coil::GlobalFactory<NumberingPolicyBase>;
+#endif
+  
+};
+#endif // RTC_NUMBERINGPOLICYBASE_H

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/idl/Manager.idl
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/idl/Manager.idl	2017-12-10 00:12:42 UTC (rev 3101)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/idl/Manager.idl	2017-12-10 00:14:39 UTC (rev 3102)
@@ -450,6 +450,28 @@
     RTC::ReturnCode_t shutdown();
     RTC::ReturnCode_t restart();
 
+
+     /*!
+     * @if jp
+     * @brief »ØÄê̾¤ÎRTC¥ª¥Ö¥¸¥§¥¯¥È¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¼èÆÀ
+     *
+     * 
+     *
+     * @param name RTC̾
+     * @return RTC¥ê¥¹¥È
+     *
+     * @else
+     * @brief 
+     *
+     *
+     * 
+     * @param name name
+     * @return list of RTC
+     *
+     * @endig
+     */
+    RTC::RTCList get_components_by_name(in string name);
+
     Object get_service(in string name);
     //    ServiceProfileList get_service_profiles();
   };



More information about the openrtm-commit mailing list