[openrtm-commit:01340] r2522 - trunk/OpenRTM-aist/src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 3月 14日 (金) 10:15:22 JST


Author: n-ando
Date: 2014-03-14 10:15:22 +0900 (Fri, 14 Mar 2014)
New Revision: 2522

Modified:
   trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
Log:
[compat,->RELENG_1_1] formatString() for component name format function now supports %i, %N (implementation id, instance #). refs #208

Modified: trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp	2014-03-03 07:47:45 UTC (rev 2521)
+++ trunk/OpenRTM-aist/src/lib/rtm/Manager.cpp	2014-03-14 01:15:22 UTC (rev 2522)
@@ -1995,6 +1995,12 @@
 		else if (c == 'v')  str += prop["version"];
 		else if (c == 'V')  str += prop["vendor"];
 		else if (c == 'c')  str += prop["category"];
+		else if (c == 'i')  str += prop["implementation_id"];
+		else if (c == 'N')
+		  {
+		    size_t n = prop["implementation_id"].size();
+		    str += prop["instance_name"].substr(n);
+		  }
 		else if (c == 'h')  str += m_config["os.hostname"];
 		else if (c == 'M')  str += m_config["manager.name"];
 		else if (c == 'p')  str += m_config["manager.pid"];



More information about the openrtm-commit mailing list