[openrtm-commit:02964] r3100 - in branches/RELENG_1_2/OpenRTM-aist: . etc packages/rpm src/ext src/ext/local_service src/lib/coil/common src/lib/rtm utils/cmake utils/rtm-config win32/OpenRTM-aist

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


Author: n-ando
Date: 2017-12-10 09:10:04 +0900 (Sun, 10 Dec 2017)
New Revision: 3100

Added:
   branches/RELENG_1_2/OpenRTM-aist/src/ext/logger/
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamBase.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.h
Modified:
   branches/RELENG_1_2/OpenRTM-aist/configure.ac
   branches/RELENG_1_2/OpenRTM-aist/etc/rtc.conf.sample
   branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in
   branches/RELENG_1_2/OpenRTM-aist/src/ext/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/src/ext/local_service/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Factory.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Logger.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ConfigAdmin.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/InPortBase.h
   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/OpenHRPExecutionContext.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.h
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortBase.h
   branches/RELENG_1_2/OpenRTM-aist/utils/cmake/Makefile.am
   branches/RELENG_1_2/OpenRTM-aist/utils/rtm-config/openrtm-aist.pc.in
   branches/RELENG_1_2/OpenRTM-aist/win32/OpenRTM-aist/rtm_config.vsprops
Log:
merged chages from trunk/OpenRTM-aist r2913-2955 during 2017-02:
[compat,->RELENG_1_2] The installation of the rpm package of openrtm-aist-example and openrtm-aist-doc has been changed. refs #3893
[compat,->RELENG_1_2] Links of rtmCamera and rtmManipulator have been added to OpenRTMConfig.cmake. refs #3889
[compat,bugfix,->RELENG_1_2] Fixed r2914. refs #3889
[compat,format,->RELENG_1_2] Indent modified.
[incompat,new func,->RELENG_1_2] Logging system now supports logstream loadable modules. refs #3567
[incompat,new func,->RELENG_1_2] A function to convert from URL parameter to map has been added.
[compat,format,->RELENG_1_2] Newline added.
[incompat,new func,->RELENG_1_2] fluent-bit logger stream has been added. refs #3567
[incompat,new func,->RELENG_1_2] fluent-bit logger stream has been added. refs #3567
[compat,->RELENG_1_2] Types have been changed because of compilation warning. refs #3902
[compat,->RELENG_1_2] Some pragmas have been added to suppress warnings. refs #3901
[compat,->RELENG_1_2] Some pragmas have been added to suppress warnings. refs #3900
[build,->RELENG_1_2] Monky include path has been added.
[prop,->RELENG_1_2] ignore Makefile.in Makefile.
[compat,->RELENG_1_2] C style cast convrted to static_cast. refs #3902
[comapt,conf_file,->RELENG_1_2] fluent-bit log stream configuration example has been added rtc.conf.sample
[compat,build,->RELENG_1_2] CXXFLAGS incuding -Wall -fPIC -O2 has been removed in openrtm-aist.pc. refs #3714
[compat,build,dist,->RELENG_1_2] ClockManager.cpp was not properly included dist package.
[comapt,build,dist,->RELENG_1_2] logger ext lib is now included in dist package.
[compat,->RELENG_1_2] refs #3881
[incompat,bugfix,EC,->RELENG_1_2]Modified for OpenHRPExecutionContext. #3579


Modified: branches/RELENG_1_2/OpenRTM-aist/configure.ac
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/configure.ac	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/configure.ac	2017-12-10 00:10:04 UTC (rev 3100)
@@ -243,8 +243,6 @@
 	LDFLAGS="-L$lpath $LDFLAGS"
 done
 
-
-
 dnl this is needed for creating libraries using libtool
 dnl AC_LIBTOOL_WIN32_DLL
 dnl AC_LIBLTDL_CONVENIENCE
@@ -1512,6 +1510,7 @@
 dnl under lib/openrtm-x.y directories
 rtm_rtcdir=$rtm_libdir"/rtc"
 rtm_ecdir=$rtm_libdir"/ec"
+rtm_loggerdir=$rtm_libdir"/logger"
 rtm_rtmdir=$rtm_libdir"/rtm"
 rtm_svcdir=$rtm_libdir"/svc"
 rtm_sdodir=$rtm_libdir"/sdo"
@@ -1526,6 +1525,7 @@
 AC_SUBST(coil_includedir)
 AC_SUBST(rtm_rtcdir)
 AC_SUBST(rtm_ecdir)
+AC_SUBST(rtm_loggerdir)
 AC_SUBST(rtm_rtmdir)
 AC_SUBST(rtm_svcdir)
 AC_SUBST(rtm_sdodir)
@@ -1662,6 +1662,8 @@
 	src/ext/sdo/observer/Makefile
 	src/ext/local_service/Makefile
 	src/ext/local_service/nameservice_file/Makefile
+	src/ext/logger/Makefile
+	src/ext/logger/fluentbit_stream/Makefile
 	utils/Makefile
 	utils/rtm-config/Makefile
 	utils/cmake/Makefile

Modified: branches/RELENG_1_2/OpenRTM-aist/etc/rtc.conf.sample
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/etc/rtc.conf.sample	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/etc/rtc.conf.sample	2017-12-10 00:10:04 UTC (rev 3100)
@@ -537,3 +537,34 @@
 #
 sdo.service.consumer.available_services: [read only]
 sdo.service.consumer.enabled_services: ALL
+
+
+#============================================================
+# Fluent-bit logger plugin setting
+#============================================================
+#
+# This is fluentbit logger plugin example in rtc.conf
+#
+logger.enable: YES
+logger.log_level: PARANOID
+logger.file_name: rtc%p.log, stderr
+
+# fluentbit specific configurations
+logger.plugins: FluentBit.so
+
+# Output example (forward)
+logger.logstream.fluentd.output0.plugin: forward
+logger.logstream.fluentd.output0.tag: fluent_forward
+logger.logstream.fluentd.output0.match: *
+#logger.logstream.fluentd.output0.host: 127.0.0.1 (default)
+#logger.logstream.fluentd.output0.port: 24224 (default)
+
+# Output example (stdout)
+logger.logstream.fluentd.output1.plugin: stdout
+logger.logstream.fluentd.output1.tag: fluent_stdout
+logger.logstream.fluentd.output1.match: *
+
+# Input example (CPU)
+logger.logstream.fluentd.input0.plugin: cpu
+logger.logstream.fluentd.input0.tag: fluent_cpu
+

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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/packages/rpm/OpenRTM-aist.spec.in	2017-12-10 00:10:04 UTC (rev 3100)
@@ -127,7 +127,8 @@
 # doc package file list
 %files doc
 %defattr(-,root,root,-)
-%{rtm_datadir}/doc/*
+%{rtm_datadir}/doc/c++/*
+%{rtm_datadir}/doc/idl/*
 
 
 #------------------------------------------------------------
@@ -134,11 +135,11 @@
 # example package file list
 %files example
 %defattr(-,root,root,-)
-%attr(755,root,root) %{rtm_datadir}/example/*Comp*
-%{rtm_datadir}/example/*.conf
-%{rtm_datadir}/example/src/*
-%{rtm_datadir}/example/rtc/*
-%{rtm_datadir}/example/templates/*
+%attr(755,root,root) %{rtm_datadir}/components/c++/examples/*Comp*
+%{rtm_datadir}/components/c++/examples/*.conf
+%{rtm_datadir}/components/c++/examples/src/*
+%{rtm_datadir}/components/c++/examples/rtc/*
+%{rtm_datadir}/components/c++/examples/templates/*
 
 
 #------------------------------------------------------------

Modified: branches/RELENG_1_2/OpenRTM-aist/src/ext/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/ext/Makefile.am	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/ext/Makefile.am	2017-12-10 00:10:04 UTC (rev 3100)
@@ -8,5 +8,5 @@
 AUTOMAKE_OPTIONS = 1.4
 
 SUBDIRS = local_service ec sdo 
+DIST_SUBDIRS = local_service ec sdo logger
 
-

Modified: branches/RELENG_1_2/OpenRTM-aist/src/ext/local_service/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/ext/local_service/Makefile.am	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/ext/local_service/Makefile.am	2017-12-10 00:10:04 UTC (rev 3100)
@@ -7,4 +7,4 @@
 
 AUTOMAKE_OPTIONS = 1.4
 
-SUBDIRS = nameservice_file
\ No newline at end of file
+SUBDIRS = nameservice_file

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Factory.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Factory.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Factory.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -41,6 +41,10 @@
 #   define EXTERN
 #endif /* Windows */
 
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
+#pragma warning( push )
+#pragma warning( disable : 4251 )
+#endif
 
 namespace coil
 {
@@ -623,4 +627,10 @@
   };
 
 }; // namespace coil
+
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
+#pragma warning( pop )
+#endif
+
 #endif // COIL_FACTORY_H

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Logger.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Logger.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Logger.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -226,7 +226,7 @@
     virtual std::streamsize xsputn(const char_type* s, std::streamsize n)
     {
       stream_sputn();
-      for (int i(0), len(m_streams.size()); i < len; ++i)
+      for (size_t i(0), len(m_streams.size()); i < len; ++i)
         {
           Guard gaurd(m_streams[i].mutex_);
           m_streams[i].stream_->sputn(s, n);
@@ -251,20 +251,20 @@
      */
     virtual std::streamsize stream_sputn()
     {
-      int bytes_to_write;
+      size_t bytes_to_write;
       bytes_to_write = this->pptr() - this->gptr();
       if (bytes_to_write > 0)
         {
-          for (int i(0), len(m_streams.size()); i < len; ++i)
+          for (size_t i(0), len(m_streams.size()); i < len; ++i)
             {
               Guard gaurd(m_streams[i].mutex_);
               m_streams[i].stream_->sputn(this->gptr(), bytes_to_write);
             }
-          this->gbump(bytes_to_write);
+          this->gbump(static_cast<int>(bytes_to_write));
           if (this->gptr() >= this->pptr())
             {
-              this->pbump(this->pbase() - this->pptr());
-              this->gbump(this->pbase() - this->gptr());
+              this->pbump(static_cast<int>(this->pbase() - this->pptr()));
+              this->gbump(static_cast<int>(this->pbase() - this->gptr()));
             }
         }
       return bytes_to_write;
@@ -293,7 +293,7 @@
     virtual std::streamsize stream_sputn(const char_type* s, std::streamsize n)
     {
       
-      for (int i(0), len(m_streams.size()); i < len; ++i)
+      for (size_t i(0), len(m_streams.size()); i < len; ++i)
         {
           Guard gaurd(m_streams[i].mutex_);
           m_streams[i].stream_->sputn(s, n);
@@ -343,7 +343,7 @@
               this->pbump(1);
             }
           // Number of characters to write to file
-          int bytes_to_write = this->pptr() - this->gptr();
+          size_t bytes_to_write = this->pptr() - this->gptr();
           // Overflow doesn't fail if nothing is to be written
           if (bytes_to_write > 0)
             {
@@ -350,8 +350,8 @@
               if (stream_sputn(this->gptr(), bytes_to_write) != bytes_to_write)
                 return traits_type::eof();
               // Reset next pointer to point to pbase on success
-              this->pbump(this->pbase() - this->pptr());
-              this->gbump(this->pbase() - this->gptr());
+              this->pbump(static_cast<int>(this->pbase() - this->pptr()));
+              this->gbump(static_cast<int>(this->pbase() - this->gptr()));
             }
         }
       // Write extra character to file if not EOF
@@ -394,7 +394,7 @@
           if (this->pptr() > this->epptr() || this->pptr() < this->pbase())
             return -1;
 
-          int bytes_to_write;
+          size_t bytes_to_write;
           bytes_to_write = this->pptr() - this->gptr();
           if (bytes_to_write > 0)
             {
@@ -402,11 +402,11 @@
                 {
                   return -1;
                 }
-              this->gbump(bytes_to_write);
+              this->gbump(static_cast<int>(bytes_to_write));
               if (this->gptr() >= this->pptr())
                 {
-                  this->pbump(this->pbase() - this->pptr());
-                  this->gbump(this->pbase() - this->gptr());
+                  this->pbump(static_cast<int>(this->pbase() - this->pptr()));
+                  this->gbump(static_cast<int>(this->pbase() - this->gptr()));
                 }
             }
         }

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Makefile.am	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/Makefile.am	2017-12-10 00:10:04 UTC (rev 3100)
@@ -12,7 +12,7 @@
 	TimeValue.cpp   \
 	TimeMeasure.cpp \
 	Timer.cpp       \
-	ClockManager.h  \
+	ClockManager.cpp\
 	crc.cpp         \
 	stringutil.cpp
 

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.cpp	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -502,6 +502,59 @@
   
   /*!
    * @if jp
+   * @brief URL¥Ñ¥é¥á¡¼¥¿¤òmapstring¤Ëʬ²ò¤·¤ÆÊÖ¤¹
+   *
+   * URL¥Ñ¥é¥á¡¼¥¿É½¸½ something?key0=value0&key1=value1.... ¤Î¤¦¤Á
+   * '?' °Ê¹ß¤ÎÉôʬ¤òʬ²ò¤·¤Æ¡¢std::map<std::string, std::string> ·Á¼°
+   * ¤ËÊÑ´¹¤¹¤ë¡£Í¿¤¨¤é¤ì¤¿Ê¸»úÎó¤òº¸¤«¤é¥µ¡¼¥Á¤·¡¢'?' ¤è¤ê±¦Â¦¤ÎÉôʬ¤Ë
+   * ¤Ä¤¤¤Æ²òÀϤò¹Ô¤¦¡£'&'¤Çʬ³ä¤·¡¢º¸¤«¤é '=' ¤ò¸¡º÷¤·¡¢ºÇ½é¤Î '=' ¤Î
+   * ±¦ÊդȺ¸ÊÕ¤ò¤½¤ì¤¾¤ì¡¢key ¤È value ¤È¤·¤Æ map ¤Ë³ÊǼ¤¹¤ë¡£
+   *
+   * @param str ʬ²òÂоÝʸ»úÎó
+   * @return mapstring ·¿¤Î key/value¥Ç¡¼¥¿
+   *
+   * @else
+   * @brief Investigate whether the given string is URL or not
+   *
+   * URL parameter description such as
+   * something?key0=value0&key1=value1.... is analyzed. Right hand
+   * side string of '?' character is decomposed and it is converted
+   * into std::map<std::string, std::string> type.The following string
+   * are devided by '&' and then '=' character is
+   * searched. Right-hand-side value and left-hand-side value of '='
+   * are stored as key and value in the map.
+   *
+   * @param str The target string for decomposed
+   *
+   * @return decomposed key-values in map
+   *
+   * @endif
+   */
+  coil::mapstring urlparam2map(const std::string& str)
+  {
+    std::string::size_type qpos = str.find('?');
+    if (qpos == std::string::npos) { qpos = 0; }
+    else { ++qpos; }
+    coil::vstring tmp = coil::split(str.substr(qpos), "&");
+
+    std::map<std::string, std::string> retmap;
+    for (size_t i(0); i < tmp.size(); ++i)
+      {
+        std::string::size_type pos = tmp[i].find("=");
+        if (pos != std::string::npos)
+          {
+            retmap[tmp[i].substr(0, pos)] = tmp[i].substr(pos + 1);
+          }
+        else
+          {
+            retmap[tmp[i]] = std::string("");
+          }
+      }
+    return retmap;
+  }
+
+  /*!
+   * @if jp
    * @brief ¥ê¥¹¥ÈÆâ¤Îʸ»úÎó¤ò¸¡º÷¤¹¤ë Functor
    * @else
    * @brief Functor to find string in a list

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/common/stringutil.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -22,6 +22,7 @@
 
 #include <string>
 #include <vector>
+#include <map>
 #include <sstream>
 
 #if defined (_MSC_VER) && (_MSC_VER <=1500) // VC2008(VC9.0) or before
@@ -39,7 +40,7 @@
 namespace coil
 {
   typedef std::vector<std::string> vstring;
-
+  typedef std::map<std::string, std::string> mapstring;
   /*!
    * @if jp
    * @brief string ¤«¤é wstring ¤Ø¤ÎÊÑ´¹
@@ -544,9 +545,41 @@
    * @endif
    */
   bool isURL(const std::string& str);
-  
+
   /*!
    * @if jp
+   * @brief URL¥Ñ¥é¥á¡¼¥¿¤òmapstring¤Ëʬ²ò¤·¤ÆÊÖ¤¹
+   *
+   * URL¥Ñ¥é¥á¡¼¥¿É½¸½ something?key0=value0&key1=value1.... ¤Î¤¦¤Á
+   * '?' °Ê¹ß¤ÎÉôʬ¤òʬ²ò¤·¤Æ¡¢std::map<std::string, std::string> ·Á¼°
+   * ¤ËÊÑ´¹¤¹¤ë¡£Í¿¤¨¤é¤ì¤¿Ê¸»úÎó¤òº¸¤«¤é¥µ¡¼¥Á¤·¡¢'?' ¤è¤ê±¦Â¦¤ÎÉôʬ¤Ë
+   * ¤Ä¤¤¤Æ²òÀϤò¹Ô¤¦¡£'&'¤Çʬ³ä¤·¡¢º¸¤«¤é '=' ¤ò¸¡º÷¤·¡¢ºÇ½é¤Î '=' ¤Î
+   * ±¦ÊդȺ¸ÊÕ¤ò¤½¤ì¤¾¤ì¡¢key ¤È value ¤È¤·¤Æ map ¤Ë³ÊǼ¤¹¤ë¡£
+   *
+   * @param str ʬ²òÂоÝʸ»úÎó
+   * @return mapstring ·¿¤Î key/value¥Ç¡¼¥¿
+   *
+   * @else
+   * @brief Investigate whether the given string is URL or not
+   *
+   * URL parameter description such as
+   * something?key0=value0&key1=value1.... is analyzed. Right hand
+   * side string of '?' character is decomposed and it is converted
+   * into std::map<std::string, std::string> type.The following string
+   * are devided by '&' and then '=' character is
+   * searched. Right-hand-side value and left-hand-side value of '='
+   * are stored as key and value in the map.
+   *
+   * @param str The target string for decomposed
+   *
+   * @return decomposed key-values in map
+   *
+   * @endif
+   */
+  coil::mapstring urlparam2map(const std::string& str);
+
+  /*!
+   * @if jp
    * @brief Í¿¤¨¤é¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤òstd::string¤ËÊÑ´¹
    *
    * °ú¿ô¤Ç»ØÄꤵ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤òʸ»úÎó¤ËÊÑ´¹¤¹¤ë¡£

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ConfigAdmin.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ConfigAdmin.cpp	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/ConfigAdmin.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -31,10 +31,10 @@
    * @endif
    */
   void ConfigBase::setCallback(ConfigAdmin* cadmin, CallbackFunc cbf)
-    {
-      m_admin = cadmin;
-      m_callback = cbf;
-    }
+  {
+    m_admin = cadmin;
+    m_callback = cbf;
+  }
 
   /*!
    * @if jp

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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -106,6 +106,7 @@
     "manager.modules.Java.profile_cmd",      "rtcprof_java",
     "manager.modules.Java.suffixes",         "class",
     "manager.modules.Java.load_paths",       "./",
+    "manager.modules.search_auto",       "YES",
     "manager.local_service.enabled_services","ALL",
     "sdo.service.provider.enabled_service",  "ALL",
     "sdo.service.consumer.enabled_service",  "ALL",

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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/FactoryInit.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -5,7 +5,7 @@
  * @date $Date: 2008-03-06 06:58:40 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2009
+ * Copyright (C) 2009-2017
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
  *     National Institute of
@@ -16,6 +16,9 @@
  *
  */
 
+// Logstream
+#include <rtm/LogstreamFile.h>
+
 // Buffers
 #include <rtm/CdrRingBuffer.h>
 
@@ -37,6 +40,9 @@
 
 void FactoryInit()
 {
+    // Logstream
+    LogstreamFileInit();
+
     // Buffers
     CdrRingBufferInit();
 

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/InPortBase.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/InPortBase.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/InPortBase.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -25,6 +25,12 @@
 #include <rtm/CdrBufferBase.h>
 #include <rtm/ConnectorListener.h>
 
+#ifdef WIN32
+#pragma warning( push ) 
+#pragma warning( disable : 4290 )
+#endif
+
+
 /*!
  * @if jp
  * @namespace RTC
@@ -889,4 +895,8 @@
   };
 }; // namespace RTC
 
+#ifdef WIN32
+#pragma warning( pop )
+#endif
+
 #endif // RTC_INPORTBASE_H

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamBase.h (from rev 2955, trunk/OpenRTM-aist/src/lib/rtm/LogstreamBase.h)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamBase.h	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamBase.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -0,0 +1,105 @@
+// -*- C++ -*-
+/*!
+ * @file LogstreamBase.h
+ * @brief Logger stream buffer 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_LOGSTREAMBASE_H
+#define RTC_LOGSTREAMBASE_H
+
+#include <coil/Properties.h>
+#include <coil/Factory.h>
+#include <coil/Logger.h>
+
+#include <rtm/RTC.h>
+#include <rtm/CdrBufferBase.h>
+#include <rtm/DataPortStatus.h>
+
+namespace RTC
+{
+  /*!
+   * @if jp
+   *
+   * @class PublisherBase
+   *
+   * @brief Publisher ´ðÄ쥯¥é¥¹
+   * 
+   * ¥Ç¡¼¥¿Á÷½Ð¥¿¥¤¥ß¥ó¥°¤ò´ÉÍý¤·¤ÆÁ÷½Ð¤ò¶îÆ°¤¹¤ëPublisher* ¤Î´ðÄ쥯¥é¥¹¡£
+   * ³Æ¼ï Publisher ¤Ï¤³¤Î¥¯¥é¥¹¤ò·Ñ¾µ¤·¤Æ¾ÜºÙ¤ò¼ÂÁõ¤¹¤ë¡£
+   *
+   * @since 0.4.0
+   *
+   * @else
+   *
+   * @class PublisherBase
+   *
+   * @brief Base class of Publisher.
+   *
+   * This is a base class of Publisher*. This class manages data send timing.
+   * Variation of Publisher* which implements details of Publisher inherits
+   * this PublisherBase class.
+   *
+   * @endif
+   */
+  typedef std::basic_streambuf<char> StreambufType;
+  class LogstreamBase
+  {
+  public:
+    /*!
+     * @if jp
+     *
+     * @brief ¥Ç¥¹¥È¥é¥¯¥¿
+     *
+     * @else
+     *
+     * @brief Destructor
+     *
+     * @endif
+     */
+    virtual ~LogstreamBase(void){};
+
+    /*!
+     * @if jp
+     * @brief ÀßÄê½é´ü²½
+     *
+     * Logstream¥¯¥é¥¹¤Î³Æ¼ïÀßÄê¤ò¹Ô¤¦¡£¼ÂÁõ¥¯¥é¥¹¤Ç¤Ï¡¢Í¿¤¨¤é¤ì¤¿
+     * Properties¤«¤éɬÍפʾðÊó¤ò¼èÆÀ¤·¤Æ³Æ¼ïÀßÄê¤ò¹Ô¤¦¡£
+     * 
+     * @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.
+     *
+     * @param prop Configuration information
+     *
+     * @endif
+     */
+    virtual bool init(const coil::Properties& prop) = 0;
+    
+    virtual StreambufType* getStreamBuffer() = 0;
+
+  };
+
+  typedef coil::GlobalFactory<LogstreamBase> LogstreamFactory;
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
+  EXTERN template class DLL_PLUGIN coil::GlobalFactory<LogstreamBase>;
+#endif
+};
+#endif // RTC_LOGSTREAMBASE_H

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.cpp (from rev 2955, trunk/OpenRTM-aist/src/lib/rtm/LogstreamFile.cpp)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.cpp	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -0,0 +1,105 @@
+// -*- C++ -*-
+/*!
+ * @file LogstreamBase.h
+ * @brief Logger stream buffer 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$
+ *
+ */
+#include <algorithm>
+
+#include <rtm/LogstreamBase.h>
+#include <rtm/LogstreamFile.h>
+#include <coil/stringutil.h>
+
+namespace RTC
+{
+  coil::vstring LogstreamFile::s_files;
+  
+  LogstreamFile::LogstreamFile()
+    : m_stdout(NULL), m_fileout(NULL)
+  {
+  }
+
+  LogstreamFile::~LogstreamFile()
+  {
+    s_files.erase(std::remove(s_files.begin(), s_files.end(), m_fileName),
+                  s_files.end());
+    if (m_fileout != NULL)
+      {
+        m_fileout->close();
+      }
+  }
+
+  bool LogstreamFile::init(const coil::Properties& prop)
+  {
+    coil::vstring files = coil::split(prop["file_name"], ",");
+
+    for (size_t i(0); i < files.size(); ++i)
+      {
+        std::cout << "#### file: " << files[i] << std::endl;
+        if (std::count(s_files.begin(), s_files.end(), files[i]) > 0) { continue; }
+        m_fileName = files[i];
+        s_files.push_back(files[i]);
+
+        std::string fname(files[i]);
+        coil::normalize(fname);
+        if (fname == "stdout")
+          {
+            std::cout << "##### STDOUT!! #####" << std::endl;
+            m_stdout = std::cout.rdbuf();
+            return true;
+          }
+        else if (fname == "stderr")
+          {
+            std::cout << "##### STDOUT!! #####" << std::endl;
+            m_stdout = std::cerr.rdbuf();
+            return true;
+          }
+        else
+          {
+            std::cout << "##### file #####" << std::endl;
+            m_fileout = new std::filebuf();
+            m_fileout->open(files[i].c_str(), std::ios::out | std::ios::app);
+            if (m_fileout->is_open()) { return true; }
+          }
+      }
+    return false;
+  }
+
+  StreambufType* LogstreamFile::getStreamBuffer()
+  {
+    if (m_stdout != NULL)
+      {
+        return m_stdout;
+      }
+    else if (m_fileout != NULL)
+      {
+        return m_fileout;
+      }
+    return std::cout.rdbuf();
+  }
+
+};
+
+extern "C"
+{
+  void LogstreamFileInit()
+  {
+    ::RTC::LogstreamFactory::
+      instance().addFactory("file",
+                            ::coil::Creator< ::RTC::LogstreamBase,
+                                             ::RTC::LogstreamFile>,
+                            ::coil::Destructor< ::RTC::LogstreamBase,
+                                                ::RTC::LogstreamFile>);
+  }
+};
+

Copied: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.h (from rev 2955, trunk/OpenRTM-aist/src/lib/rtm/LogstreamFile.h)
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.h	                        (rev 0)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/LogstreamFile.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -0,0 +1,140 @@
+// -*- C++ -*-
+/*!
+ * @file LogstreamFile.h
+ * @brief File logger stream 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_LOGSTREAMFILE_H
+#define RTC_LOGSTREAMFILE_H
+
+#include <string>
+#include <fstream>
+#include <iostream>
+#include <coil/stringutil.h>
+#include <rtm/LogstreamBase.h>
+
+namespace RTC
+{
+  /*!
+   * @if jp
+   *
+   * @class PublisherBase
+   *
+   * @brief Publisher ´ðÄ쥯¥é¥¹
+   * 
+   * ¥Ç¡¼¥¿Á÷½Ð¥¿¥¤¥ß¥ó¥°¤ò´ÉÍý¤·¤ÆÁ÷½Ð¤ò¶îÆ°¤¹¤ëPublisher* ¤Î´ðÄ쥯¥é¥¹¡£
+   * ³Æ¼ï Publisher ¤Ï¤³¤Î¥¯¥é¥¹¤ò·Ñ¾µ¤·¤Æ¾ÜºÙ¤ò¼ÂÁõ¤¹¤ë¡£
+   *
+   * @since 0.4.0
+   *
+   * @else
+   *
+   * @class PublisherBase
+   *
+   * @brief Base class of Publisher.
+   *
+   * This is a base class of Publisher*. This class manages data send timing.
+   * Variation of Publisher* which implements details of Publisher inherits
+   * this PublisherBase class.
+   *
+   * @endif
+   */
+  class LogstreamFile
+    : public LogstreamBase
+  {
+  public:
+    /*!
+     * @if jp
+     *
+     * @brief ¥³¥ó¥¹¥È¥é¥¯¥¿
+     *
+     * @else
+     *
+     * @brief Constructor
+     *
+     * @endif
+     */
+    LogstreamFile();
+
+    /*!
+     * @if jp
+     *
+     * @brief ¥Ç¥¹¥È¥é¥¯¥¿
+     *
+     * @else
+     *
+     * @brief Destructor
+     *
+     * @endif
+     */
+    virtual ~LogstreamFile(void);
+
+    /*!
+     * @if jp
+     * @brief ÀßÄê½é´ü²½
+     *
+     * Logstream¥¯¥é¥¹¤Î³Æ¼ïÀßÄê¤ò¹Ô¤¦¡£¼ÂÁõ¥¯¥é¥¹¤Ç¤Ï¡¢Í¿¤¨¤é¤ì¤¿
+     * Properties¤«¤éɬÍפʾðÊó¤ò¼èÆÀ¤·¤Æ³Æ¼ïÀßÄê¤ò¹Ô¤¦¡£
+     *
+     * @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.
+     *
+     * @param prop Configuration information
+     *
+     * @endif
+     */
+    virtual bool init(const coil::Properties& prop);
+
+    /*!
+     * @if jp
+     * @brief basic_strembuf ¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹
+     *
+     * Logger¤Ç»ÈÍѤ¹¤ë basic_streambuf ¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
+     *
+     * @return basic_streambuf (coil::LogStreambuf) ¤Ø¤Î¥Ý¥¤¥ó¥¿
+     *
+     * @else
+     *
+     * @brief Returns a pointer to the basic_streambuf 
+     *
+     * This operation would returns a pointer to the basic_streambuf
+     * or its subclass that is kept in this class.
+     *
+     * @return pointer to the basic_streambuf (coil::LogStreambuf)
+     *
+     * @endif
+     */
+    virtual StreambufType* getStreamBuffer();
+
+  protected:
+    static coil::vstring s_files;
+    std::string m_fileName;
+    StreambufType* m_stdout;
+    std::filebuf* m_fileout;
+  };
+}; // namespace RTC
+
+extern "C"
+{
+  void DLL_EXPORT LogstreamFileInit();
+};
+
+#endif // RTC_LOGSTREAMFILE_H

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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Makefile.am	2017-12-10 00:10:04 UTC (rev 3100)
@@ -68,6 +68,7 @@
 	NumberingPolicy.cpp          \
 	ManagerServant.cpp           \
 	SystemLogger.cpp             \
+	LogstreamFile.cpp               \
 	LocalServiceAdmin.cpp        \
 	ManagerActionListener.cpp
 
@@ -168,6 +169,7 @@
 	StateMachine.h 		 \
 	Typename.h               \
 	LocalServiceBase.h	 \
+	LogstreamBase.h      \
 	ListenerHolder.h         \
 	config_rtc.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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -42,6 +42,7 @@
 #include <rtm/SdoServiceConsumerBase.h>
 #include <rtm/LocalServiceAdmin.h>
 #include <rtm/SystemLogger.h>
+#include <rtm/LogstreamBase.h>
 
 #ifdef RTM_OS_LINUX
 #ifndef _GNU_SOURCE
@@ -127,10 +128,10 @@
           {
             manager = new Manager();
             manager->initManager(argc, argv);
+            manager->initFactories();
             manager->initLogger();
             manager->initORB();
             manager->initNaming();
-            manager->initFactories();
             manager->initExecContext();
             manager->initComposite();
             manager->initTimer();
@@ -157,10 +158,10 @@
           {
             manager = new Manager();
             manager->initManager(0, NULL);
+            manager->initFactories();
             manager->initLogger();
             manager->initORB();
             manager->initNaming();
-            manager->initFactories();
             manager->initExecContext();
             manager->initComposite();
             manager->initTimer();
@@ -773,6 +774,10 @@
         RTC_ERROR(("Factory not found: %s",
                    comp_id["implementation_id"].c_str()));
         
+        if (!coil::toBool(m_config["manager.modules.search_auto"], "YES", "NO", true))
+          {
+            return 0;
+          }
         // automatic module loading
         std::vector<coil::Properties> mp(m_module->getLoadableModules());
         RTC_INFO(("%d loadable modules found", mp.size()));
@@ -1209,8 +1214,6 @@
     // load configurations
     ManagerConfig config(argc, argv);
     config.configure(m_config);
-    m_config["logger.file_name"] = 
-      formatString(m_config["logger.file_name"].c_str(), m_config);
     
     // initialize ModuleManager
     m_module = new ModuleManager(m_config);
@@ -1298,73 +1301,137 @@
   //============================================================
   /*!
    * @if jp
-   * @brief System logger ¤Î½é´ü²½
+   * @brief File logger ½é´ü²½
+   * initLogger¤«¤é¸Æ¤Ð¤ì¤ë
    * @else
-   * @brief System logger initialization
+   * @brief File logger initialization
+   * This function is called from initLogger.
    * @endif
    */
-  bool Manager::initLogger()
+  void Manager::initLogstreamFile()
   {
-    rtclog.setLevel("SILENT");
-    rtclog.setName("manager");
-    
-    if (!coil::toBool(m_config["logger.enable"], "YES", "NO", true))
-      {
-        return true;
-      }
+    // format logger file name
+    m_config["logger.file_name"] = 
+      formatString(m_config["logger.file_name"].c_str(), m_config);
 
-    std::vector<std::string> logouts;
-    logouts = coil::split(m_config["logger.file_name"], ",");
+    std::vector<std::string> logouts =
+      coil::split(m_config["logger.file_name"], ",");
+    coil::Properties& logprop = m_config.getNode("logger");
 
     for (int i(0), len(logouts.size()); i < len; ++i)
       {
-        std::string logfile(logouts[i]);
-        if (logfile == "") continue;
-	
-        // Open logfile
-        if (logfile == "STDOUT" || logfile == "stdout")
+        if (logouts[i].empty()) { continue; }
+
+        LogstreamBase* logstream =
+          LogstreamFactory::instance().createObject("file");
+        if (logstream == NULL)
           {
-            m_logStreamBuf.addStream(std::cout.rdbuf());
+            std::cerr << "\"file\" logger creation failed" << std::endl;
             continue;
           }
-        
-        std::filebuf* of = new std::filebuf();
-        of->open(logfile.c_str(), std::ios::out | std::ios::app);
+        if (!logstream->init(logprop))
+          {
+            std::cerr << "\"file\" logger initialization failed" << std::endl;
+            LogstreamFactory::instance().deleteObject("file", logstream);
+            continue;
+          }
+        m_logStreamBuf.addStream(logstream->getStreamBuffer());
+      }
+  }
 
-        if (!of->is_open())
+  void Manager::initLogstreamPlugins()
+  {
+    // loading logstream module
+    // create logstream object and attach to the logger
+    coil::vstring mods = coil::split(m_config["logger.plugins"], ",");
+    for (size_t i(0); i < mods.size(); ++i)
+      {
+        std::string basename = mods[i].substr(0, mods[i].find('.'));
+        basename += "Init";
+        try
           {
-            std::cerr << "Error: cannot open logfile: "
-                      << logfile << std::endl;
-            delete of;
+            m_module->load(mods[i], basename);
+          }
+        catch (...)
+          {
+            RTC_WARN(("Logstream plugin module load failed: %s",
+                      mods[i].c_str()));
             continue;
           }
-        m_logStreamBuf.addStream(of, true);
-        m_logfiles.push_back(of);
       }
-	
+  }
 
+  void Manager::initLogstreamOthers()
+  {
+    LogstreamFactory& factory(LogstreamFactory::instance());
+
+    coil::Properties pp(m_config.getNode("logger.logstream"));
+
+    const std::vector<Properties*>& leaf0 = pp.getLeaf();
+    for (size_t i(0); i < leaf0.size(); ++i)
+      {
+        std::string lstype = leaf0[i]->getName();
+        LogstreamBase* logstream = factory.createObject(lstype);
+        if (logstream == NULL)
+          {
+            RTC_WARN(("Logstream %s creation failed.", lstype.c_str()));
+            continue;
+          }
+        RTC_INFO(("Logstream %s created.", lstype.c_str()));
+        if (!logstream->init(*leaf0[i]))
+          {
+            RTC_WARN(("Logstream %s init failed.", lstype.c_str()));
+            factory.deleteObject(lstype.c_str(), logstream);
+            RTC_WARN(("Logstream %s deleted.", lstype.c_str()));
+          }
+        RTC_INFO(("Logstream %s added.", lstype.c_str()));
+        m_logStreamBuf.addStream(logstream->getStreamBuffer());
+      }
+  }
+
+  /*!
+   * @if jp
+   * @brief System logger ¤Î½é´ü²½
+   * @else
+   * @brief System logger initialization
+   * @endif
+   */
+  bool Manager::initLogger()
+  {
+    // Enable logger or not
+    rtclog.setLevel("SILENT");
+    rtclog.setName("manager");
+    if (!coil::toBool(m_config["logger.enable"], "YES", "NO", true))
+      {
+        return true;
+      }
+
     // Set date format for log entry header
     rtclog.setDateFormat(m_config["logger.date_format"].c_str());
     rtclog.setClockType(m_config["logger.clock_type"]);
     // Loglevel was set from configuration file.
     rtclog.setLevel(m_config["logger.log_level"].c_str());
-	
     // Log stream mutex locking mode
-    coil::toBool(m_config["logger.stream_lock"],
-                 "enable", "disable", false) ? 
+    coil::toBool(m_config["logger.stream_lock"], "enable", "disable", false) ?
       rtclog.enableLock() : rtclog.disableLock();
-                 
-	
+
+    // File Logstream init
+    initLogstreamFile();
+    // Load logstream plugin
+    initLogstreamPlugins();
+    // Initialize other logstreams
+    initLogstreamOthers();
+
     RTC_INFO(("%s", m_config["openrtm.version"].c_str()));
-    RTC_INFO(("Copyright (C) 2003-2012"));
+    RTC_INFO(("Copyright (C) 2003-2017"));
     RTC_INFO(("  Noriaki Ando"));
     RTC_INFO(("  Intelligent Systems Research Institute, AIST"));
     RTC_INFO(("Manager starting."));
     RTC_INFO(("Starting local logging."));
 
-    return true;;
+    return true;
   }
-  
+
   /*!
    * @if jp
    * @brief System Logger ¤Î½ªÎ»½èÍý

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:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/Manager.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -1187,6 +1187,9 @@
     //============================================================
     // Logger initialize and terminator
     //============================================================
+    void initLogstreamFile();
+    void initLogstreamPlugins();
+    void initLogstreamOthers();
     /*!
      * @if jp
      * @brief System logger ¤Î½é´ü²½

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.cpp	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.cpp	2017-12-10 00:10:04 UTC (rev 3100)
@@ -289,6 +289,33 @@
   {
     return ExecutionContextBase::getProfile();
   }
+
+
+  // template virtual functions adding/removing component
+  /*!
+  * @brief onAddedComponent() template function
+  */
+  RTC::ReturnCode_t OpenHRPExecutionContext::
+	  onAddedComponent(RTC::LightweightRTObject_ptr rtobj)
+  {
+	  Guard guard(m_tickmutex);
+
+	  ExecutionContextBase::m_worker.updateComponentList();
+
+	  return RTC::RTC_OK;
+  }
+  /*!
+  * @brief onRemovedComponent() template function
+  */
+  RTC::ReturnCode_t OpenHRPExecutionContext::
+	  onRemovedComponent(RTC::LightweightRTObject_ptr rtobj)
+  {
+	  Guard guard(m_tickmutex);
+
+	  ExecutionContextBase::m_worker.updateComponentList();
+
+	  return RTC::RTC_OK;
+  }
 };
 
 

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OpenHRPExecutionContext.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -487,7 +487,18 @@
      */
     virtual RTC::ExecutionContextProfile* get_profile(void)
       throw (CORBA::SystemException);
-
+  protected:
+	// template virtual functions adding/removing component	
+	/*!
+	* @brief onAddedComponent() template function
+	*/
+	virtual RTC::ReturnCode_t
+		onAddedComponent(RTC::LightweightRTObject_ptr rtobj);
+	/*!
+	* @brief onRemovedComponent() template function
+	*/
+	virtual RTC::ReturnCode_t
+		onRemovedComponent(RTC::LightweightRTObject_ptr rtobj);
   private:
     /*!
      * @if jp

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortBase.h
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortBase.h	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/OutPortBase.h	2017-12-10 00:10:04 UTC (rev 3100)
@@ -34,6 +34,11 @@
 #include <rtm/SystemLogger.h>
 #include <rtm/ConnectorListener.h>
 
+#ifdef WIN32
+#pragma warning( push ) 
+#pragma warning( disable : 4290 )
+#endif
+
 namespace RTC
 {
   class PublisherBase;
@@ -1091,4 +1096,9 @@
     struct connector_cleanup;
   };
 }; // End of namespace RTC
+
+#ifdef WIN32
+#pragma warning( pop )
+#endif
+
 #endif // RTC_RTCOUTPORTBASE_H

Modified: branches/RELENG_1_2/OpenRTM-aist/utils/cmake/Makefile.am
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/utils/cmake/Makefile.am	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/utils/cmake/Makefile.am	2017-12-10 00:10:04 UTC (rev 3100)
@@ -85,7 +85,7 @@
 	${rtm_includedir}/rtm/idl
 OPENRTM_LDFLAGS_=`echo "${LDFLAGS}" | sed -e 's/\-L[^ ]*//g'`
 OPENRTM_LIBRARY_DIRS=${prefix}/lib
-OPENRTM_LIBRARIES_=`echo ${LIBS} RTC coil | sed -e 's/\-l\([^ ]*\)/\1/g'`
+OPENRTM_LIBRARIES_=`echo ${LIBS} RTC coil rtmCamera rtmManipulator | sed -e 's/\-l\([^ ]*\)/\1/g'`
 
 # OpenRTM-aist specific directory
 COIL_INCLUDE_DIR=${coil_includedir}

Modified: branches/RELENG_1_2/OpenRTM-aist/utils/rtm-config/openrtm-aist.pc.in
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/utils/rtm-config/openrtm-aist.pc.in	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/utils/rtm-config/openrtm-aist.pc.in	2017-12-10 00:10:04 UTC (rev 3100)
@@ -10,7 +10,7 @@
 includedir=@includedir@
 
 rtm_cxx=@CXX@
-rtm_cflags=@CXXFLAGS@ -I at prefix@/include -I at coil_includedir@ -I at rtm_includedir@ -I at rtm_idldir@
+rtm_cflags=-I at prefix@/include -I at coil_includedir@ -I at rtm_includedir@ -I at rtm_idldir@
 rtm_libs=@LDFLAGS@ -L at libdir@ @LIBS@ -lRTC -lcoil
 rtm_version=@RTM_VERSION@
 rtm_orb=@ORB@

Modified: branches/RELENG_1_2/OpenRTM-aist/win32/OpenRTM-aist/rtm_config.vsprops
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/win32/OpenRTM-aist/rtm_config.vsprops	2017-12-10 00:07:31 UTC (rev 3099)
+++ branches/RELENG_1_2/OpenRTM-aist/win32/OpenRTM-aist/rtm_config.vsprops	2017-12-10 00:10:04 UTC (rev 3100)
@@ -85,20 +85,19 @@
 	/>
 	<UserMacro
 		Name="rtm_libd"
-		Value="RTC$(rtm_dllver)d.lib $(coil_libd) $(omni_libd) advapi32.lib ws2_32.lib mswsock.lib $(user_libd)"
+		Value="RTC$(rtm_dllver)d.lib $(coil_libd) $(omni_libd) $(rtm_ext_libd) advapi32.lib ws2_32.lib mswsock.lib $(user_libd)"
 	/>
 	<UserMacro
 		Name="rtm_libd_x64"
-
-		Value="RTC$(rtm_dllver_x64)d.lib $(coil_libd_x64) $(omni_libd) advapi32.lib ws2_32.lib mswsock.lib $(user_libd)"
+		Value="RTC$(rtm_dllver_x64)d.lib $(coil_libd_x64) $(omni_libd) $(rtm_ext_libd_x64) advapi32.lib ws2_32.lib mswsock.lib $(user_libd)"
 	/>
 	<UserMacro
 		Name="rtm_lib"
-		Value="RTC$(rtm_dllver).lib $(coil_lib) $(omni_lib) advapi32.lib ws2_32.lib mswsock.lib $(user_lib)"
+		Value="RTC$(rtm_dllver).lib $(coil_lib) $(omni_lib) $(rtm_ext_lib) advapi32.lib ws2_32.lib mswsock.lib $(user_lib)"
 	/>
 	<UserMacro
 		Name="rtm_lib_x64"
-		Value="RTC$(rtm_dllver_x64).lib $(coil_lib_x64) $(omni_lib) advapi32.lib ws2_32.lib mswsock.lib $(user_lib)"
+		Value="RTC$(rtm_dllver_x64).lib $(coil_lib_x64) $(omni_lib) $(rtm_ext_lib_x64) advapi32.lib ws2_32.lib mswsock.lib $(user_lib)"
 	/>
 	<UserMacro
 		Name="rtm_idlc"
@@ -125,4 +124,20 @@
 		Name="coil_libd_x64"
 		Value="coil$(coil_dllver_x64)d.lib"
 	/>
+	<UserMacro
+		Name="rtm_ext_lib"
+		Value="rtmCamera$(rtm_dllver).lib rtmManipulator$(rtm_dllver).lib"
+	/>
+	<UserMacro
+		Name="rtm_ext_libd"
+		Value="rtmCamera$(rtm_dllver)d.lib rtmManipulator$(rtm_dllver)d.lib"
+	/>
+	<UserMacro
+		Name="rtm_ext_lib_x64"
+		Value="rtmCamera$(rtm_dllver_x64).lib rtmManipulator$(rtm_dllver_x64).lib"
+	/>
+	<UserMacro
+		Name="rtm_ext_libd_x64"
+		Value="rtmCamera$(rtm_dllver_x64)d.lib rtmManipulator$(rtm_dllver_x64)d.lib"
+	/>
 </VisualStudioPropertySheet>



More information about the openrtm-commit mailing list