[openrtm-commit:00463] r2237 - trunk/OpenRTM-aist/src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2011年 10月 25日 (火) 10:25:38 JST


Author: n-ando
Date: 2011-10-25 10:25:37 +0900 (Tue, 25 Oct 2011)
New Revision: 2237

Modified:
   trunk/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h
Log:
Update on initialize has been added.

Modified: trunk/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h	2011-10-12 13:23:56 UTC (rev 2236)
+++ trunk/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h	2011-10-25 01:25:37 UTC (rev 2237)
@@ -657,6 +657,8 @@
      * 指定した名称のコンフィギュレーションパラメータが既に存在する場合は
      * falseを返す。
      * \<VarType\>としてコンフィギュレーションパラメータのデータ型を指定する。
+     * なお、このメンバ関数が呼ばれた後、現在アクティブなコンフィギュレー
+     * ションセットの値が変数にセットされる。
      *
      * @param param_name コンフィギュレーションパラメータ名
      * @param var コンフィギュレーションパラメータ格納用変数
@@ -673,6 +675,8 @@
      * Return false, if configuration parameter of specified name has already 
      * existed.
      * Specify the data type of the configuration as \<VarType\>.
+     * After calling this function, configuration variable would be
+     * updated by the active configuration parameter.
      *
      * @param param_name Configuration parameter name
      * @param var Configuration parameter variable
@@ -696,6 +700,7 @@
       Config<VarType>* c = new Config<VarType>(param_name, var, def_val, trans);
       m_params.push_back(c);
       c->setCallback(this, &RTC::ConfigAdmin::onUpdateParam);
+      update(getActiveId(), param_name);
       return true;
     }
 



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