[openrtm-commit:00539] r2259 - branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2012年 1月 4日 (水) 22:18:30 JST


Author: n-ando
Date: 2012-01-04 22:18:29 +0900 (Wed, 04 Jan 2012)
New Revision: 2259

Modified:
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaConsumer.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.cpp
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPort.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPortConsumer.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/OutPort.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.cpp
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.h
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.cpp
   branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.h
Log:
RELENG_1_0 modifications which affect compatibility to 1.0.0-RELEASE has been reverted.

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ConfigAdmin.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -138,8 +138,7 @@
      *
      * @endif
      */
-    virtual void operator()(const char* config_set,
-                            const char* config_param) = 0;
+    virtual void operator()(const char* config_set, const char* config_param) = 0;
   };
 
   /*!
@@ -1451,7 +1450,7 @@
     /*!
      * @if jp
      *
-     * @brief コンフィギュレーションセットへの追加時にコールされる
+     * @brief 指定したプロパティのコンフィギュレーションセットへの追加された時にコールされる
      *
      * 設定されてるコールバックオブジェクトを呼び出す。
      *
@@ -1459,7 +1458,7 @@
      *
      * @else
      *
-     * @brief Called when the property is added to the configuration set
+     * @brief When the property is added to the configuration set, this function is called. 
      *
      * Call the set callback object.
      * 
@@ -1472,7 +1471,7 @@
     /*!
      * @if jp
      *
-     * @brief 設定値が追加されたときにコールされる。
+     * @brief コンフィギュレーションセットに設定値が追加されたときにコールされる。
      *
      * 設定されてるコールバックオブジェクトを呼び出す。
      *
@@ -1480,7 +1479,7 @@
      *
      * @else
      *
-     * @brief Called when a set value is added to the configuration set
+     * @brief When a set value is added to the configuration set, this function is called.
      *
      * Call the set callback object.
      * 
@@ -1493,7 +1492,7 @@
     /*!
      * @if jp
      *
-     * @brief セットが削除されてるときにコールされる。
+     * @brief コンフィギュレーションセットが削除されているときにコールされる。
      *
      * 設定されてるコールバックオブジェクトを呼び出す。
      *
@@ -1501,7 +1500,7 @@
      *
      * @else
      *
-     * @brief Called when the configuration set has been deleted
+     * @brief When the configuration set has been deleted, this function is called. 
      *
      * Call the set callback object.
      * 
@@ -1514,7 +1513,7 @@
     /*!
      * @if jp
      *
-     * @brief セットがアクティブ化されたときにコールされる。
+     * @brief コンフィギュレーションセットがアクティブ化されたときにコールされる。
      *
      * 設定されてるコールバックオブジェクトを呼び出す。
      *
@@ -1522,7 +1521,7 @@
      *
      * @else
      *
-     * @brief Called when the configuration set is made active
+     * @brief When the configuration set is made active, this function is called.
      *
      * Call the set callback object.
      * 
@@ -1533,8 +1532,8 @@
     void onActivateSet(const char* config_id);
     
   private:
-    ConfigAdmin(const ConfigAdmin& ca);
-    ConfigAdmin& operator=(const ConfigAdmin& ca);
+    ConfigAdmin(const ConfigAdmin& ca);// : m_configsets(ca.m_configsets) {};
+    ConfigAdmin& operator=(const ConfigAdmin& ca); //{return *this;};
     
     struct find_conf
     {

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaConsumer.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaConsumer.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaConsumer.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -398,7 +398,7 @@
       return *this;
     }
 
-    void swap(CorbaConsumer& x)
+    void swap(const CorbaConsumer& x)
     {
       CorbaConsumerBase::swap(x);
       ObjectTypeVar tmpref = x.m_var;

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.cpp
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.cpp	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.cpp	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date  $Date: 2007-12-31 03:08:02 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2009
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -69,8 +69,8 @@
     RTC_DEBUG_STR((m_properties));
 
     int num(-1);
-    if (!coil::stringTo(num, m_properties.getProperty("connection_limit",
-                                                      "-1").c_str()))
+    if (!coil::stringTo(num, 
+                     m_properties.getProperty("connection_limit","-1").c_str()))
       {
         RTC_ERROR(("invalid connection_limit value: %s", 
                    m_properties.getProperty("connection_limit").c_str()));
@@ -195,7 +195,7 @@
     RTC_TRACE(("publishInterfaces()"));
 
     ReturnCode_t returnvalue = _publishInterfaces();
-    if(returnvalue != RTC::RTC_OK)
+    if(returnvalue!=RTC::RTC_OK)
       {
         return returnvalue;
       }
@@ -206,10 +206,10 @@
       {
         //------------------------------------------------------------
         // new version descriptor
-        // <comp_iname>.port.<port_name>.provided.<type_name>.<instance_name>
-        std::string newdesc((const char*)m_profile.name);
-        newdesc.insert(m_ownerInstanceName.size(), ".port");
-        newdesc += ".provided." + it->descriptor();
+        // <comp_iname>.port.<port_name>.provider.<type_name>.<instance_name>
+        std::string newdesc;
+        newdesc = m_ownerInstanceName + ".port." + (const char*)m_profile.name
+          + ".provider." + it->descriptor();
         CORBA_SeqUtil::
           push_back(properties,
                     NVUtil::newNV(newdesc.c_str(), it->ior().c_str()));
@@ -262,18 +262,12 @@
     for (CorbaConsumerList::iterator it(m_consumers.begin());
          it != m_consumers.end(); ++it)
       {
-        std::string ior;
-        if (findProvider(nv, *it, ior))
-          {
-            setObject(ior, *it);
-            continue;
-          }
-        if (findProviderOld(nv, *it, ior))
-          {
-            setObject(ior, *it);
-            continue;
-          }
+        bool res0(findProvider(nv, *it));
+        if (res0) { continue; }
 
+        bool res1(findProviderOld(nv, *it));
+        if (res1) { continue; }
+
         // never come here without error
         // if strict connection option is set, error is returned.
         if (strict)
@@ -301,41 +295,19 @@
     RTC_TRACE(("unsubscribeInterfaces()"));
 
     const NVList& nv(connector_profile.properties);
-    RTC_DEBUG_STR((NVUtil::toString(nv)));
 
-    for (CorbaConsumerList::iterator it(m_consumers.begin());
-         it != m_consumers.end(); ++it)
-      {
-        std::string ior;
-        if (findProvider(nv, *it, ior))
-          {
-            RTC_DEBUG(("Correspoinding consumer found."));
-            releaseObject(ior, *it);
-            continue;
-          }
-        if (findProviderOld(nv, *it, ior))
-          {
-            RTC_DEBUG(("Correspoinding consumer found."));
-            releaseObject(ior, *it);
-            continue;
-          }
-      }
+    RTC_DEBUG_STR((NVUtil::toString(nv)));
+    
+    CORBA_SeqUtil::for_each(nv, unsubscribe(m_consumers));
   }
   
-  /*!
-   * @if jp
-   * @brief Consumer に合致する Provider を NVList の中から見つける
-   * @else
-   * @brief Find out a provider corresponding to the consumer from NVList
-   * @endif
-   */
-  bool CorbaPort::findProvider(const NVList& nv, CorbaConsumerHolder& cons,
-                               std::string& iorstr)
+
+  bool CorbaPort::findProvider(const NVList& nv, CorbaConsumerHolder& cons)
   {
     // new consumer interface descriptor
-    std::string newdesc((const char*)m_profile.name);
-    newdesc.insert(m_ownerInstanceName.size(), ".port");
-    newdesc += ".required." + cons.descriptor();
+    std::string newdesc;
+    newdesc = m_ownerInstanceName + ".port." + (const char*)m_profile.name
+      + ".consumer." + cons.descriptor();
 
     // find a NameValue of the consumer
     CORBA::Long cons_index(NVUtil::find_index(nv, newdesc.c_str()));
@@ -358,20 +330,24 @@
         RTC_WARN(("Cannot extract Provider IOR string"));
         return false;
       }
-    iorstr = ior;
-    RTC_DEBUG(("interface matched with new descriptor: %s", newdesc.c_str()));
+ 
+    // if ior string is "null" or "nil", ignore it.
+    if (std::string("null") == ior) { return true; }
+    if (std::string("nil")  == ior) { return true; }
+    // IOR should be started by "IOR:"
+    if (std::string("IOR:").compare(0, 4, ior, 4) != 0) { return false; }
+    // set IOR to the consumer
+    if (!cons.setObject(ior))
+      {
+        RTC_ERROR(("Cannot narrow reference"));
+        return false;
+      }
+    RTC_ERROR(("interface matched with new descriptor: %s", newdesc.c_str()));
+
     return true;
   }
 
-  /*!
-   * @if jp
-   * @brief Consumer に合致する Provider を NVList の中から見つける
-   * @else
-   * @brief Find out a provider corresponding to the consumer from NVList
-   * @endif
-   */
-  bool CorbaPort::findProviderOld(const NVList&nv, CorbaConsumerHolder& cons,
-                                  std::string& iorstr)
+  bool CorbaPort::findProviderOld(const NVList&nv, CorbaConsumerHolder& cons)
   {
     // old consumer interface descriptor
     std::string olddesc("port."); olddesc += cons.descriptor();
@@ -386,57 +362,17 @@
         RTC_WARN(("Cannot extract Provider IOR string"));
         return false;
       }
-    iorstr = ior;
-    RTC_INFO(("interface matched with old descriptor: %s", olddesc.c_str()));
-    return true;
-  }
 
-  /*!
-   * @if jp
-   * @brief Consumer に IOR をセットする
-   * @else
-   * @brief Setting IOR to Consumer
-   * @endif
-   */
-  bool CorbaPort::setObject(const std::string& ior, CorbaConsumerHolder& cons)
-  {
-    // if ior string is "null" or "nil", ignore it.
-    if (std::string("null") == ior) { return true; }
-    if (std::string("nil")  == ior) { return true; }
-    // IOR should be started by "IOR:"
-    if (std::string("IOR:").compare(0, 4, ior.c_str(), 4) != 0)
-      {
-        return false;
-      }
-
     // set IOR to the consumer
-    if (!cons.setObject(ior.c_str()))
+    if (!cons.setObject(ior))
       {
         RTC_ERROR(("Cannot narrow reference"));
         return false;
       }
-    RTC_TRACE(("setObject() done"));
+
+    RTC_ERROR(("interface matched with old descriptor: %s", olddesc.c_str()));
+
     return true;
   }
-
-  /*!
-   * @if jp
-   * @brief Consumer のオブジェクトをリリースする
-   * @else
-   * @brief Releasing Consumer Object
-   * @endif
-   */
-  bool CorbaPort::releaseObject(const std::string& ior,
-                                CorbaConsumerHolder& cons)
-  {
-    if (ior == cons.getIor())
-      {
-        cons.releaseObject();
-        RTC_DEBUG(("Consumer %s released.", cons.descriptor().c_str()));
-        return true;
-      }
-    RTC_WARN(("IORs between Consumer and Connector are different."));
-    return false;
-  }
   
 };

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/CorbaPort.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date  $Date: 2007-12-31 03:08:02 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2009
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -49,14 +49,17 @@
    * CorbaPort は RT コンポーネントにおいて、ユーザ定義の CORBA オブジェ
    * クトサービスおよびコンシューマを提供する Port 実装である。
    *
+   * <p>
    * RT コンポーネントは、Port を介してユーザが定義した CORBA サービス
    * を提供することができ、これを RT Service (Provider) と呼ぶ。また、
    * 他の RT コンポーネントのサービスを利用するための CORBA オブジェク
    * トのプレースホルダを提供することができ、これを RT Service
    * Consumer と呼ぶ。
+   * <p>
    * CorbaPort は任意の数の Provider および Consumer を管理することがで
    * き、Port 同士を接続する際に対応する Provider と Consumer を適切に
    * 関連付けることができる。
+   * <p>
    * CorbaPort は通常以下のように利用される。
    *
    * <pre>
@@ -99,7 +102,7 @@
    * て、接続開始時点ではインスタンス名は存在しないが、接続シーケンス中
    * のインターフェースを公開するプロセスにおいて、プロバイダは生成した
    * インスタンスに対応した記述子を ConnectorProfile に適正に設定するも
-   * のとする。(未実装)
+   * のとする。
    *
    * REQUIREDすなわちコンシューマのインスタンス名が "*" の場合は、一つ
    * のコンシューマが複数のプロバイダと接続可能なタイプのコンシューマで
@@ -284,9 +287,9 @@
    *
    * プロバイダは subscribeInterfaces() では特に操作は行わない。
    *
-   * コンシューマは、 publishInterfaces() においては特に操作を行わない。
+   * コンシューマは、publishInterfaces() においては特に操作を行わない。
    *
-   * 一方、 subscribeInterfaces() では、自分の記述子を key とする
+   * 一方、subscribeInterfaces() では、自分の記述子を key とする
    * key-value ペア が存在するかどうか調べ、もし存在すれば、その value
    * に設定されたプロバイダのインターフェース指定子で指定される参照を、
    * さらに ConnectorProfile::properties から探し、それをコンシューマの
@@ -625,24 +628,12 @@
      * @if jp
      * @brief コンストラクタ
      *
-     * コンストラクタでは、引数に与えられた名前を PortBase に対してセッ
-     * トするとともに、PortProfile::properties に対して
-     *
-     * - port.port_type: "CorbaPort"
-     *
-     * をプロパティとして追加する。
-     *
      * @param name Port の名前
      *
      * @else
      *
      * @brief Constructor
      *
-     * In the ctor, a given name is set into PortBase, and the
-     * following property is added to the PortProfile::properties,
-     *
-     * - port.port_type: "CorbaPort"
-     *
      * @param name The name of Port 
      *
      * @endif
@@ -666,27 +657,14 @@
      * @if jp
      * @brief プロパティの初期化
      *
-     * OutPortのプロパティを初期化する。このポートへの接続数を指定する
-     * プロパティ "connection_limit" が含まれ、適切な数値が設定されてい
-     * る場合、最大接続数としてその数値が設定される。プロパティが設定さ
-     * れていない場合、もしくは適切な値が設定されていない場合には、最大
-     * 接続数は無制限となる。
+     * OutPortのプロパティを初期化する
      *
-     * @param prop CorbaPort のプロパティ
-     *
      * @else
      *
      * @brief Initializing properties
      *
-     * This operation initializes outport's properties. If a property
-     * "connection_limit" is set and appropriate value is set to this
-     * property value, the number of maximum connection is set as this
-     * value. If the property does not exist or invalid value is set
-     * to this property, the maximum number of connection will be set
-     * unlimited.
+     * This operation initializes outport's properties
      *
-     * @param prop properties of the CorbaPort
-     *
      * @endif
      */
     void init(coil::Properties& prop);
@@ -696,12 +674,10 @@
      *
      * @brief Provider を登録する
      *
-     * この Port において提供したいサーバントをこの Port に対して登録す
-     * る。サーバントは、引数で与えられる instance_name, type_name を、
+     * この Port において提供したいサーバントをこの Port に対して登録する。
+     * サーバントは、引数で与えられる instance_name, type_name を、
      * サーバント自身のインスタンス名およびタイプ名として、サーバントに
-     * 関連付けられる。この関数により、サーバントは CorbaPort 内部に保
-     * 持されるとともに、PortInterfaceProfile にRTC::PROVIDED インター
-     * フェースとして登録される。
+     * 関連付けられる。
      *
      * @param instance_name サーバントのインスタンス名
      * @param type_name サーバントのタイプ名
@@ -713,12 +689,10 @@
      *
      * @brief Register the provider
      *
-     * This operation registers a servant, which is provided in this
-     * Port, to the Port. The servant is associated with
-     * "instance_name" and "type_name" as the instance name of the
-     * servant and as the type name of the servant. A given servant
-     * will be stored in the CorbaPort, and this is registered as
-     * RTC::PROVIDED interface into the PortInterfaceProfile.
+     * This operation registers a servant, which is provided in this Port,
+     * to the Port. The servant is associated with "instance_name" and
+     * "type_name" as the instance name of the servant and as the type name
+     * of the servant.
      *
      * @param instance_name Instance name of servant
      * @param type_name Type name of the servant
@@ -1071,133 +1045,9 @@
     
   private:
     class CorbaConsumerHolder;
-    /*!
-     * @if jp
-     * @brief Consumer に合致する Provider を NVList の中から見つける
-     *
-     * NVList 中から CorbaConsumerHolder に保持されている Consumer に合
-     * 致するキーを持つ Provider を見つけ、IOR を抽出しナローイングして
-     * Consumer にセットする。対応するキーが存在しない、IOR が見つから
-     * ない、ナローイングに失敗した場合、false を返す。
-     *
-     * @param nv Provider が含まれている ConnectorProfile::properties の NVList
-     * @param cons Provider と対応する Consumer のホルダ
-     * 
-     * @retrun bool Consumer に対応する Provider が見つからない場合 false
-     *
-     * @else
-     * @brief Find out a provider corresponding to the consumer from NVList
-     *
-     * This function finds out a Provider with the key that is matched
-     * with Cosumer's name in the CorbaConsumerHolder, extracts IOR
-     * and performs narrowing into the Consumer and set it to the
-     * Consumer. False is returned when there is no corresponding key
-     * and IOR and the narrowing failed.
-     *  
-     * @param nv NVlist of ConnectorProfile::properties that includes Provider
-     * @param cons a Consumer holder to be matched with a Provider
-     * 
-     * @return bool false is returned if there is no provider for the consumer
-     *
-     * @endif
-     */
-    virtual bool findProvider(const NVList& nv, CorbaConsumerHolder& cons,
-                              std::string& iorstr);
+    virtual bool findProvider(const NVList& nv, CorbaConsumerHolder& cons);
+    virtual bool findProviderOld(const NVList&nv, CorbaConsumerHolder& cons);
 
-    /*!
-     * @if jp
-     * @brief Consumer に合致する Provider を NVList の中から見つける
-     *
-     * この関数は、古いバージョンの互換性のための関数である。
-     *
-     * NVList 中から CorbaConsumerHolder に保持されている Consumer に合
-     * 致するキーを持つ Provider を見つける。対応するキーが存在しない、
-     * IOR が見つからない場合、false を返す。
-     *  
-     * @param nv Provider が含まれている ConnectorProfile::properties の NVList
-     * @param cons Provider と対応する Consumer のホルダ
-     * @param iorstr 見つかったIOR文字列を格納する変数
-     * 
-     * @retrun bool Consumer に対応する Provider が見つからない場合 false
-     *
-     * @else
-     * @brief Find out a provider corresponding to the consumer from NVList
-     *
-     * This function is for the old version's compatibility.
-     *
-     * This function finds out a Provider with the key that is matched
-     * with Cosumer's name in the CorbaConsumerHolder and extracts
-     * IOR.  False is returned when there is no corresponding key and
-     * IOR.
-     *  
-     * @param nv NVlist of ConnectorProfile::properties that includes Provider
-     * @param cons a Consumer holder to be matched with a Provider
-     * @param iorstr variable which is set IOR string
-     * 
-     * @return bool false is returned if there is no provider for the consumer
-     *
-     * @endif
-     */
-    virtual bool findProviderOld(const NVList&nv, CorbaConsumerHolder& cons,
-                                 std::string& iorstr);
-
-    /*!
-     * @if jp
-     * @brief Consumer に IOR をセットする
-     *
-     * IOR をナローイングしてConsumer にセットする。ナローイングに失敗
-     * した場合、false を返す。ただし、IOR文字列が、nullまたはnilの場合、
-     * オブジェクトに何もセットせずに true を返す。
-     *
-     * @param ior セットする IOR 文字列
-     * @param cons Consumer のホルダ
-     * 
-     * @retrun bool Consumer へのナローイングに失敗した場合 false
-     *
-     * @else
-     * @brief Setting IOR to Consumer
-     *
-     * This function performs narrowing into the Consumer and set it to the
-     * Consumer. False is returned when the narrowing failed. But, if IOR
-     * string is "null" or "nil", this function returns true.
-     *  
-     * @param ior IOR string
-     * @param cons Consumer holder
-     * 
-     * @retrun bool false if narrowing failed.
-     *
-     * @endif
-     */
-    bool setObject(const std::string& ior, CorbaConsumerHolder& cons);
-
-    /*!
-     * @if jp
-     * @brief Consumer のオブジェクトをリリースする
-     *
-     * Consumer にセットされた参照をリリースする。ConsumerのIORが与えら
-     * れたIOR文字列と異なる場合、falseを返す。
-     *
-     * @param ior セットする IOR 文字列
-     * @param cons Consumer のホルダ
-     * 
-     * @retrun ConsumerのIORが与えられたIOR文字列と異なる場合、falseを返す。
-     *
-     * @else
-     * @brief Releasing Consumer Object
-     *
-     * This function releases object reference of Consumer. If the
-     * given IOR string is different from Consumer's IOR string, it
-     * returns false.
-     *  
-     * @param ior IOR string
-     * @param cons Consumer holder
-     * 
-     * @retrun bool False if IOR and Consumer's IOR are different
-     *
-     * @endif
-     */
-    bool releaseObject(const std::string& ior, CorbaConsumerHolder& cons);
-
   private:
     /*!
      * @if jp
@@ -1231,10 +1081,14 @@
             Manager::instance().
               getPOA()->activate_object_with_id(m_oid, m_servant);
           }
-        catch(...)
+        catch(const ::PortableServer::POA::ServantAlreadyActive &)
           {
             ;
           }
+        catch(const ::PortableServer::POA::ObjectAlreadyActive &)
+          {
+            ;
+          }
         CORBA::Object_var obj;
         obj = Manager::instance().getPOA()->id_to_reference(m_oid);
         CORBA::ORB_ptr orb = Manager::instance().getORB();
@@ -1242,10 +1096,7 @@
         m_ior = ior_var;
         deactivate();
       }
-      virtual ~CorbaProviderHolder()
-      {
-        deactivate();
-      }
+
       std::string instanceName() { return m_instanceName; }
       std::string typeName() { return m_typeName; }
       std::string ior() { return m_ior; }
@@ -1262,7 +1113,7 @@
           {
             ; // do nothing
           }
-        catch(...)
+        catch(const ::PortableServer::POA::ObjectAlreadyActive &)
           {
             ; // do nothing
           }
@@ -1273,7 +1124,7 @@
           {
             Manager::instance().getPOA()->deactivate_object(m_oid);
           }
-        catch(...)
+        catch(const ::PortableServer::POA::ObjectNotActive&)
           {
             ; // do nothing
           }
@@ -1311,8 +1162,7 @@
                           CorbaConsumerBase* consumer)
         : m_typeName(type_name),
           m_instanceName(instance_name),
-          m_consumer(consumer),
-          m_ior("")
+          m_consumer(consumer)
       {
       }
       std::string instanceName() { return m_instanceName; }
@@ -1321,7 +1171,6 @@
 
       bool setObject(const char* ior)
       {
-        m_ior = ior;
         CORBA::ORB_ptr orb = ::RTC::Manager::instance().getORB();
         CORBA::Object_var obj = orb->string_to_object(ior);
         if (CORBA::is_nil(obj))
@@ -1335,15 +1184,11 @@
       {
         m_consumer->releaseObject();
       }
-      const std::string& getIor()
-      {
-        return m_ior;
-      }
+
     private:
       std::string m_typeName;
       std::string m_instanceName;
       CorbaConsumerBase* m_consumer;
-      std::string m_ior;
     };
     typedef std::vector<CorbaConsumerHolder> CorbaConsumerList;
     CorbaConsumerList m_consumers;

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date $Date: 2007-12-31 03:08:03 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2008
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -18,7 +18,7 @@
  */
 
 #include "rtm/version.h"
-#include "rtm/config_rtc.h"
+
 /*!
  * @if jp
  * @brief Manager 用 デフォルト・コンフィギュレーション
@@ -78,31 +78,11 @@
     "manager.modules.abs_path_allowed",   "YES",
     "manager.is_master",                  "NO",
     "manager.corba_servant",              "YES",
-    "manager.shutdown_on_nortcs",         "YES",
+    "manager.shutdown_nortcs",            "YES",
     "manager.shutdown_auto",              "YES",
     "manager.name",                       "manager",
     "manager.command",                    "rtcd",
-    "manager.supported_languages",        "C++, Python, Java",
-    "manager.modules.C++.manager_cmd",    "rtcd",
-    "manager.modules.C++.profile_cmd",    "rtcprof",
-#ifdef WIN32
-    "manager.modules.C++.suffixes",       "dll",
-#else
-#ifdef RTM_OS_DARWIN
-    "manager.modules.C++.suffixes",       "dylib",
-#else
-    "manager.modules.C++.suffixes",       "so",
-#endif
-#endif
-    "manager.modules.C++.load_paths",     "./",
-    "manager.modules.Python.manager_cmd", "rtcd_python",
-    "manager.modules.Python.profile_cmd", "rtcprof_python",
-    "manager.modules.Python.suffixes",    "py",
-    "manager.modules.Python.load_paths",  "./",
-    "manager.modules.Java.manager_cmd",   "rtcd_java",
-    "manager.modules.Java.profile_cmd",   "rtcprof_java",
-    "manager.modules.Java.suffixes",      "class",
-    "manager.modules.Java.load_paths",    "./",
+
     ""
   };
 

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPort.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPort.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPort.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -307,18 +307,12 @@
     virtual bool isNew()
     {
       RTC_TRACE(("isNew()"));
-      int r(0);
-
-      {
-        Guard guard(m_connectorsMutex);
-        if (m_connectors.size() == 0)
-         {
-            RTC_DEBUG(("no connectors"));
-            return false;
-         }
-        r = m_connectors[0]->getBuffer()->readable();
-      }
-
+      if (m_connectors.size() == 0)
+        {
+          RTC_DEBUG(("no connectors"));
+          return false;
+        }
+      int r(m_connectors[0]->getBuffer()->readable());
       if (r > 0)
         {
           RTC_DEBUG(("isNew() = true, readable data: %d", r));
@@ -355,18 +349,13 @@
     virtual bool isEmpty()
     {
       RTC_TRACE(("isEmpty()"));
-      int r(0);
 
-      {
-        Guard guard(m_connectorsMutex);
-        if (m_connectors.size() == 0)
-          {
-            RTC_DEBUG(("no connectors"));
-            return true;
-          }
-        r = m_connectors[0]->getBuffer()->readable();
-      }
-
+      if (m_connectors.size() == 0)
+        {
+          RTC_DEBUG(("no connectors"));
+          return true;
+        }
+      int r(m_connectors[0]->getBuffer()->readable());
       if (r == 0)
         {
           RTC_DEBUG(("isEmpty() = true, buffer is empty"));
@@ -461,18 +450,15 @@
           RTC_TRACE(("OnRead called"));
         }
 
+      if (m_connectors.size() == 0)
+        {
+          RTC_DEBUG(("no connectors"));
+          return false;
+        }
+
       cdrMemoryStream cdr;
-      ReturnCode ret;
-      {
-        Guard guard(m_connectorsMutex);
-        if (m_connectors.size() == 0)
-          {
-            RTC_DEBUG(("no connectors"));
-            return false;
-          }
 
-        ret = m_connectors[0]->read(cdr);
-      }
+      ReturnCode ret(m_connectors[0]->read(cdr));
       if (ret == PORT_OK)
         {
           RTC_DEBUG(("data read succeeded"));

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPortConsumer.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPortConsumer.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/InPortConsumer.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -115,12 +115,11 @@
      * 
      * この関数は、以下のリターンコードを返す。
      *
-     * - PORT_OK:         正常終了。
-     * - PORT_ERROR:      データ送信の過程で何らかのエラーが発生した。
-     * - SEND_FULL:       データを送信したが、相手側バッファがフルだった。
-     * - SEND_TIMEOUT:    データを送信したが、相手側バッファがタイムアウトした。
-     * - CONNECTION_LOST: 接続が切断された
-     * - UNKNOWN_ERROR:   原因不明のエラー
+     * - PORT_OK:       正常終了。
+     * - PORT_ERROR:    データ送信の過程で何らかのエラーが発生した。
+     * - SEND_FULL:     データを送信したが、相手側バッファがフルだった。
+     * - SEND_TIMEOUT:  データを送信したが、相手側バッファがタイムアウトした。
+     * - UNKNOWN_ERROR: 原因不明のエラー
      *
      * @param data 送信するデータ
      * @return リターンコード
@@ -252,4 +251,6 @@
   typedef ::coil::GlobalFactory<InPortConsumer> InPortConsumerFactory;
 };     // namespace RTC
 
+template class ::coil::GlobalFactory<RTC::InPortConsumer>;
+
 #endif // RTC_INPORTCONSUMER_H

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.cpp	2012-01-04 13:18:29 UTC (rev 2259)
@@ -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-2008
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -109,7 +109,7 @@
     if (!fileExist(file_path)) throw FileNotFound(file_path.c_str());
     
     DLLEntity* dll(new DLLEntity());
-    
+
     int retval =  dll->dll.open(file_path.c_str());
     if (retval != 0)
       {
@@ -175,7 +175,7 @@
     if (dll != NULL) {
       delete dll;
     }
-    
+
     return;
   }
   
@@ -189,7 +189,7 @@
   void ModuleManager::unloadAll()
   {
     std::vector<DLLEntity*> dlls(m_modules.getObjects());
-    
+
     for (int i(0), len(dlls.size()); i < len; ++i)
       {
         std::string ident(dlls[i]->properties["file_path"]);
@@ -277,47 +277,69 @@
       {
         modules.push_back(dlls[i]->properties);
       }
-    return modules;
-  }
+           return modules;
+         }
   
-  /*!
+    /*!
    * @if jp
    * @brief ロード可能なモジュールリストを取得する(未実装)
    * @else
    * @brief Get the loadable module list(not implemented)
    * @endif
    */
-  std::vector<coil::Properties> ModuleManager::getLoadableModules()
-  {
-    RTC_TRACE(("getLoadableModules()"));
+    std::vector<coil::Properties> ModuleManager::getLoadableModules()
+    {
+      // getting loadable module file path list.
+      coil::vstring dlls;
+      for (size_t i(0); i < m_loadPath.size(); ++i)
+        {
+          if (m_loadPath[i].empty()) { continue; }
+          std::string& path(m_loadPath[i]);
+#ifdef WIN32
+          coil::vstring flist = coil::filelist(path.c_str(), "*.dll");
+#else
+          coil::vstring flist = coil::filelist(path.c_str(), "*.so");
+#endif // WIN32
+          for (size_t j(0); j < flist.size(); ++j)
+            {
+              if (*(path.end() - 1) != '/') { path += "/"; }
+              dlls.push_back(path + flist[j]);
+            }
+        }
 
-    // getting loadable module file path list.
-    coil::Properties& gprop(Manager::instance().getConfig());
-    coil::vstring langs(coil::split(gprop["manager.supported_languages"], ","));
-    RTC_DEBUG(("langs: %s", gprop["manager.supported_languages"].c_str()));
+      // getting module properties from loadable modules
+      std::vector<coil::Properties> prop;
+      for (size_t i(0), len(dlls.size()); i < len; ++i)
+        {
+          std::string cmd("rtcprof ");
+          cmd += dlls[i];
+          FILE* fd;
+          if ((fd = popen(cmd.c_str(), "r")) == NULL)
+            {
+              std::cerr << "popen faild" << std::endl;
+              continue;
+            }
+          coil::Properties p;
+          do
+            {
+              char str[512];
+              fgets(str, 512, fd);
+              std::string line(str);
+              line.erase(line.size() - 1);
+              std::string::size_type pos;
+              if ((pos = line.find(":")) == std::string::npos ) { continue; }
 
-    // for each languages
-    for (size_t l(0); l < langs.size(); ++l)
-      {
-        // 1. getting loadable files list
-        coil::vstring modules;
-        getModuleList(langs[l], modules);
-        RTC_DEBUG(("%s: %s", langs[l].c_str(), coil::flatten(modules).c_str()));
+              p[line.substr(0, pos)] = line.substr(pos + 1);
+              coil::eraseBothEndsBlank(p[line.substr(0, pos)]);
+            } while (!feof(fd));
+          pclose(fd);
+          p["module_file_name"] = coil::basename(dlls[i].c_str());
+          p["module_file_path"] = dlls[i].c_str();
+          prop.push_back(p);
+        }
 
-        // 2. getting module properties from loadable modules
-        vProperties tmpprops;
-        getModuleProfiles(langs[l], modules, tmpprops);
-        RTC_DEBUG(("Modile profile size: %d (newly founded modules)",
-                   tmpprops.size()));
-        m_modprofs.insert(m_modprofs.end(), tmpprops.begin(), tmpprops.end());
-      }
-    RTC_DEBUG(("Modile profile size: %d", m_modprofs.size()));
-    // 3. removing module profiles for which module file does not exist
-    removeInvalidModules();
-    RTC_DEBUG(("Modile profile size: %d (invalid mod-profiles deleted)",
-               m_modprofs.size()));
-    return m_modprofs;
-  }
+      return prop;
+    }
   
   /*!
    * @if jp
@@ -387,156 +409,4 @@
     
     return m_initFuncPrefix + base_name + m_initFuncSuffix;
   }
-
-
-  /*!
-   * @if jp
-   * @brief 無効なモジュールプロファイルを削除する
-   * @else
-   * @brief Removing incalid module profiles
-   * @endif
-   */
-  void ModuleManager::removeInvalidModules()
-  {
-    std::vector<coil::Properties>::iterator it(m_modprofs.begin());
-
-    while (it < m_modprofs.end())
-      {
-        if (!fileExist((*it)["module_file_path"]))
-          {
-            it = m_modprofs.erase(it);
-          }
-        ++it;
-      }
-  }
-
-  /*!
-   * @if jp
-   * @brief 指定言語におけるロードパス上のローダブルなファイルリストを返す
-   * @else
-   * @brief Getting loadable file list on the loadpath for given language
-   * @endif
-   */
-  void ModuleManager::getModuleList(const std::string& lang,
-                                    coil::vstring& modules)
-  {
-    std::string l = "manager.modules." + lang;
-    coil::Properties& lprop(Manager::instance().getConfig().getNode(l));
-
-    // load path: manager.modules.<lang>.load_path + manager.modules.load_path
-    coil::vstring paths(coil::split(lprop["load_paths"], ","));
-    paths.insert(paths.end(), m_loadPath.begin(), m_loadPath.end());
-
-    coil::vstring suffixes(coil::split(lprop["suffixes"], ","));
-    RTC_DEBUG(("suffixes: %s", coil::flatten(suffixes).c_str()));
-
-    // for each load path list
-    for (size_t i(0); i < paths.size(); ++i)
-      {
-        if (paths[i].empty())
-          {
-            RTC_WARN(("Given load path is empty"));
-            continue;
-          }
-        std::string& path(paths[i]);
-        RTC_DEBUG(("Module load path: %s", path.c_str()));
-
-        // get file list for each suffixes
-        coil::vstring flist;
-        for (size_t s(0); s < suffixes.size(); ++s)
-          {
-            std::string glob("*."); glob += suffixes[s];
-            coil::vstring tmp = coil::filelist(path.c_str(), glob.c_str());
-            RTC_DEBUG(("File list (path:%s, ext:%s): %s", path.c_str(),
-                       suffixes[s].c_str(), coil::flatten(tmp).c_str()));
-            flist.insert(flist.end(), tmp.begin(), tmp.end());
-          }
-        
-        // reformat file path and remove cached files
-        for (size_t j(0); j < flist.size(); ++j)
-          {
-            if (*(path.end() - 1) != '/') { path += "/"; }
-            std::string fpath(path + flist[j]);
-            addNewFile(fpath, modules);
-          }
-      }
-  }
-
-  /*!
-   * @if jp
-   * @brief キャッシュに無いパスだけmodulesに追加する
-   * @else
-   * @brief Adding file path not existing cache
-   * @endif
-   */
-  void ModuleManager::addNewFile(const std::string& fpath,
-                                 coil::vstring& modules)
-  {
-    bool exists(false);
-    for (size_t k(0); k < m_modprofs.size(); ++k)
-      {
-        if (m_modprofs[k]["module_file_path"] == fpath)
-          {
-            exists = true;
-            RTC_DEBUG(("Module %s already exists in cache.",
-                       fpath.c_str()));
-            break;
-          }
-      }
-    if (!exists)
-      {
-        RTC_DEBUG(("New module: %s", fpath.c_str()));
-        modules.push_back(fpath);
-      }
-  }
-
-  /*!
-   * @if jp
-   * @brief 指定言語、ファイルリストからモジュールのプロパティを返す
-   * @else
-   * @brief Getting module properties from given language and file list
-   * @endif
-   */
-  void ModuleManager::getModuleProfiles(const std::string& lang,
-                                        const coil::vstring& modules,
-                                        vProperties& modprops)
-  {
-    std::string l = "manager.modules." + lang;
-    coil::Properties& lprop(Manager::instance().getConfig().getNode(l));
-    std::vector<coil::Properties> prop;
-
-    for (size_t i(0), len(modules.size()); i < len; ++i)
-      {
-        std::string cmd(lprop["profile_cmd"]);
-        cmd += " \"" + modules[i] + "\"";
-        FILE* fd;
-        if ((fd = popen(cmd.c_str(), "r")) == NULL)
-          {
-            std::cerr << "popen faild" << std::endl;
-            continue;
-          }
-        coil::Properties p;
-        do
-          {
-            char str[512];
-            fgets(str, 512, fd);
-            std::string line(str);
-            line.erase(line.size() - 1);
-            std::string::size_type pos(line.find(":"));
-            if (pos != std::string::npos)
-              {
-                std::string key(line.substr(0, pos));
-                coil::eraseBothEndsBlank(key);
-                p[key] = line.substr(pos + 1);
-                coil::eraseBothEndsBlank(p[key]);
-              }
-          } while (!feof(fd));
-        pclose(fd);
-        RTC_DEBUG(("rtcprof cmd sub process done."));
-        if (p["implementation_id"].empty()) { continue; }
-        p["module_file_name"] = coil::basename(modules[i].c_str());
-        p["module_file_path"] = modules[i].c_str();
-        modprops.push_back(p);
-      }
-  }
 }; // namespace RTC

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/ModuleManager.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -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-2008
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -73,7 +73,6 @@
    */
   class ModuleManager
   {
-    typedef std::vector<coil::Properties> vProperties;
   public:
     /*!
      * @if jp
@@ -305,8 +304,7 @@
      *
      * @endif
      */
-    std::string load(const std::string& file_name,
-                     const std::string& init_func);
+    std::string load(const std::string& file_name, const std::string& init_func);
     
     /*!
      * @if jp
@@ -450,7 +448,7 @@
      * @endif
      */
     std::vector<coil::Properties> getLoadableModules();
-
+    
     /*!
      * @if jp
      * @brief モジュールの絶対パス指定許可
@@ -602,43 +600,6 @@
   protected:
     /*!
      * @if jp
-     * @brief 無効なモジュールプロファイルを削除する
-     * @else
-     * @brief Removing incalid module profiles
-     * @endif
-     */
-    void removeInvalidModules();
-    
-    /*!
-     * @if jp
-     * @brief 指定言語におけるロードパス上のローダブルなファイルリストを返す
-     * @else
-     * @brief Getting loadable file list on the loadpath for given language
-     * @endif
-     */
-    void getModuleList(const std::string& lang, coil::vstring& modules);
-
-    /*!
-     * @if jp
-     * @brief キャッシュに無いパスだけmodulesに追加する
-     * @else
-     * @brief Adding file path not existing cache
-     * @endif
-     */
-    void addNewFile(const std::string& fpath, coil::vstring& modules);
-
-    /*!
-     * @if jp
-     * @brief 指定言語、ファイルリストからモジュールのプロパティを返す
-     * @else
-     * @brief Getting module properties from given language and file list
-     * @endif
-     */
-    void getModuleProfiles(const std::string& lang,
-                           const coil::vstring& modules, vProperties& modprops);
-
-    /*!
-     * @if jp
      * @brief ロガーストリーム
      * @else
      * @brief Logger stream
@@ -666,7 +627,6 @@
     typedef std::vector<DLLEntity>    DllMap;
     typedef DllMap::iterator           DllMapItr;
     typedef DllMap::const_iterator     DllMapConstItr;
-
     
     /*!
      * @if jp
@@ -702,6 +662,7 @@
      * @brief Module list that has already loaded
      * @endif
      */
+    //    DllMap m_modules;
     ObjectManager<const char*, DLLEntity, DllPred> m_modules;
     
     /*!
@@ -745,7 +706,6 @@
      * @endif
      */
     std::string m_initFuncSuffix;
-
     /*!
      * @if jp
      * @brief 初期実行関数プリフィックス
@@ -755,13 +715,6 @@
      */
     std::string m_initFuncPrefix;
 
-    /*!
-     * @if jp
-     * @brief モジュールアンロードファンクタ
-     * @else
-     * @brief Module unloading functor
-     * @endif
-     */
     class UnloadPred
     {
     public:
@@ -773,8 +726,6 @@
       }
     };
 
-    vProperties m_modprofs;
-
   };   // class ModuleManager
 };     // namespace RTC  
 

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/OutPort.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/OutPort.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/OutPort.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -224,7 +224,7 @@
      */
     OutPort(const char* name, DataType& value)
       : OutPortBase(name, toTypename<DataType>()), m_value(value),
-        m_onWrite(0), m_onWriteConvert(0)
+	m_onWrite(0), m_onWriteConvert(0)
     {
     }
     
@@ -290,57 +290,51 @@
      */
     virtual bool write(DataType& value)
     {
-      RTC_TRACE(("DataType write()"));
+      RTC_TRACE(("DataType write()"))
 
       if (m_onWrite != NULL)
         {
           (*m_onWrite)(value);
-          RTC_TRACE(("OnWrite called"));
+          RTC_TRACE(("OnWrite called"))
         }
 
-      bool result(true);
-      std::vector<const char *> disconnect_ids;
-      {
-        Guard guard(m_connectorsMutex);
-        // check number of connectors
-        size_t conn_size(m_connectors.size());
-        if (!(conn_size > 0)) { return false; }
+      // check number of connectors
+      size_t conn_size(m_connectors.size());
+      if (!(conn_size > 0)) { return false; }
         
-        m_status.resize(conn_size);
+      bool result(true);
+      m_status.resize(conn_size);
 
-        for (size_t i(0), len(conn_size); i < len; ++i)
-          {
-            ReturnCode ret;
-            if (m_onWriteConvert != NULL)
-              {
-                RTC_DEBUG(("m_connectors.OnWriteConvert called"));
-                ret = m_connectors[i]->write(((*m_onWriteConvert)(value)));
-              }
-            else
-              {
-                RTC_DEBUG(("m_connectors.write called"));
-                ret = m_connectors[i]->write(value);
-              }
-            m_status[i] = ret;
-            if (ret == PORT_OK) { continue; }
-      
-            result = false;
-            const char* id(m_connectors[i]->profile().id.c_str());
-            RTC::ConnectorProfile prof(findConnProfile(id));
+      for (size_t i(0), len(conn_size); i < len; ++i)
+        {
+          ReturnCode ret;
+          if (m_onWriteConvert != NULL)
+            {
+              RTC_DEBUG(("m_connectors.OnWriteConvert called"));
+              ret = m_connectors[i]->write(((*m_onWriteConvert)(value)));
+            }
+          else
+            {
+              RTC_DEBUG(("m_connectors.write called"));
+              ret = m_connectors[i]->write(value);
+            }
+          m_status[i] = ret;
+          if (ret == PORT_OK) { continue; }
 
-            if (ret == CONNECTION_LOST)
-              {
-                RTC_WARN(("connection_lost id: %s", id));
-                if (m_onConnectionLost != 0)
-                  {
-                    (*m_onConnectionLost)(prof);
-                  }
-                disconnect_ids.push_back(id);
-              }
-          }
-      }
-      std::for_each(disconnect_ids.begin(),disconnect_ids.end(),
-                    std::bind1st(std::mem_fun(&PortBase::disconnect),this));
+          result = false;
+          const char* id(m_connectors[i]->profile().id.c_str());
+          RTC::ConnectorProfile prof(findConnProfile(id));
+
+          if (ret == CONNECTION_LOST)
+            {
+              RTC_WARN(("connection_lost id: %s", m_connectors[i]->profile().id.c_str()));
+              if (m_onConnectionLost != 0)
+                {
+                  (*m_onConnectionLost)(prof);
+                }
+              disconnect(m_connectors[i]->id());
+            }
+        }
       return result;
     }
     

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.cpp
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.cpp	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.cpp	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date $Date: 2008-01-14 10:19:42 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2009
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -53,11 +53,8 @@
     portname += name;
 
     m_profile.name = CORBA::string_dup(portname.c_str());
-    m_profile.interfaces.length(0);
     m_profile.port_ref = m_objref;
-    m_profile.connector_profiles.length(0);
     m_profile.owner = RTC::RTObject::_nil();
-    m_profile.properties.length(0);
   }
   
   /*!
@@ -229,7 +226,6 @@
     throw (CORBA::SystemException)
   {
     RTC_TRACE(("notify_connect()"));
-    Guard guard(m_connectorsMutex);
     ReturnCode_t retval[] = {RTC::RTC_OK, RTC::RTC_OK, RTC::RTC_OK};
 
     // publish owned interface information to the ConnectorProfile
@@ -383,7 +379,6 @@
     throw (CORBA::SystemException)
   {
     RTC_TRACE(("notify_disconnect(%s)", connector_id));
-    Guard guard(m_connectorsMutex);
     Guard gaurd(m_profile_mutex);
 
     // find connector_profile
@@ -834,13 +829,6 @@
     return true;
   }
 
-  /*!
-   * @if jp
-   * @brief 存在しないポートをdisconnectする。
-   * @else
-   * @brief Disconnect ports that doesn't exist. 
-   * @endif
-   */
   void PortBase::updateConnectors()
   {
     std::vector<std::string> connector_ids;
@@ -867,13 +855,7 @@
       }
   }
   
-  /*!
-   * @if jp
-   * @brief ポートの存在を確認する。
-   * @else
-   * @brief Existence of ports
-   * @endif
-   */
+
   bool PortBase::checkPorts(::RTC::PortServiceList& ports)
   {
     for (CORBA::ULong i(0), len(ports.length()); i < len; ++i)

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PortBase.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date $Date: 2008-01-14 07:56:44 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2008
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -143,7 +143,6 @@
      * PortBase のコンストラクタは Port 名 name を引数に取り初期化を行う
      * と同時に、自分自身を CORBA Object として活性化し、自身の PortProfile
      * の port_ref に自身のオブジェクトリファレンスを格納する。
-     * 名前には、"." 以外の文字列を使用することができる。
      *
      * @param name Port の名前(デフォルト値:"")
      *
@@ -155,7 +154,6 @@
      * and initialized. At the same time, the PortBase activates itself
      * as CORBA object and stores its object reference to the PortProfile's 
      * port_ref member.
-     * Characters except "." can be used for the name of the port.
      *
      * @param name The name of Port (The default value:"")
      *
@@ -1862,9 +1860,7 @@
      *
      * @brief PortProfile の properties に NameValue 値を要素に追加する
      *
-     * PortProfile の properties に NameValue 値を要素に追加する。この
-     * 関数により設定された properties は get_prot_profile() により外部
-     * から参照される。
+     * PortProfile の properties に NameValue 値を要素に追加する。
      *
      * @param key properties の name
      * @param value properties の value
@@ -1873,9 +1869,7 @@
      *
      * @brief Append NameValue data to PortProfile's properties
      *
-     * Append NameValue data to PortProfile's properties.  The
-     * properties which are set by this function would be referred
-     * through get_port_profile() from outsides.
+     * Append NameValue data to PortProfile's properties.
      *
      * @param key The name of properties
      * @param value The value of properties
@@ -1893,20 +1887,13 @@
      *
      * @brief 存在しないポートをdisconnectする。
      *
-     * 死んだPortを検出し、もし死んでいるポートがあった場合には、接続を
-     * 解除する。
-     *
      * @else
      *
      * @brief Disconnect ports that doesn't exist. 
      *
-     * This function detects dead-port, and if dead ports are found in
-     * the connection list, disconnects them.
-     *
      * @endif
      */
     void updateConnectors();
-
     /*!
      * @if jp
      *
@@ -1959,7 +1946,6 @@
      * @endif
      */
     mutable coil::Mutex m_profile_mutex;
-    mutable coil::Mutex m_connectorsMutex;
     typedef coil::Guard<coil::Mutex> Guard;
 
     /*!

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.cpp
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.cpp	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.cpp	2012-01-04 13:18:29 UTC (rev 2259)
@@ -155,13 +155,6 @@
     return PORT_OK;
   }
 
-  /*!
-   * @if jp
-   * @brief データを書き込む
-   * @else
-   * @brief Write data 
-   * @endif
-   */
   PublisherBase::ReturnCode PublisherNew::write(const cdrMemoryStream& data,
                                                 unsigned long sec,
                                                 unsigned long usec)
@@ -197,38 +190,17 @@
     return convertReturn(ret, data);
   }
 
-  /*!
-   * @if jp
-   * @brief アクティブ化確認
-   * @else
-   * @brief Confirm to activate
-   * @endif
-   */
   bool PublisherNew::isActive()
   {
     return m_active;
   }
 
-  /*!
-   * @if jp
-   * @brief アクティブ化
-   * @else
-   * @brief activation
-   * @endif
-   */
   PublisherBase::ReturnCode PublisherNew::activate()
   {
     m_active = true;
     return PORT_OK;
   }
 
-  /*!
-   * @if jp
-   * @brief 非アクティブ化
-   * @else
-   * @brief deactivation
-   * @endif
-   */
   PublisherBase::ReturnCode PublisherNew::deactivate()
   {
     m_active = false;
@@ -482,13 +454,6 @@
     return PORT_OK;
   }
 
-  /*!
-   * @if jp
-   * @brief BufferStatus から DataPortStatus への変換
-   * @else
-   * @brief Convertion from BufferStatus to DataPortStatus
-   * @endif
-   */
   PublisherBase::ReturnCode
   PublisherNew::convertReturn(BufferStatus::Enum status,
                               const cdrMemoryStream& data)
@@ -530,13 +495,6 @@
     return DataPortStatus::PORT_ERROR;
   }
 
-  /*!
-   * @if jp
-   * @brief DataPortStatusに従ってリスナへ通知する関数を呼び出す。
-   * @else
-   * @brief Call listeners according to the DataPortStatus
-   * @endif
-   */
   PublisherNew::ReturnCode
   PublisherNew::invokeListener(DataPortStatus::Enum status,
                                const cdrMemoryStream& data)

Modified: branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.h
===================================================================
--- branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.h	2012-01-04 08:43:17 UTC (rev 2258)
+++ branches/RELENG_1_0/OpenRTM-aist/src/lib/rtm/PublisherNew.h	2012-01-04 13:18:29 UTC (rev 2259)
@@ -5,7 +5,7 @@
  * @date  $Date: 2007-12-31 03:08:06 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2010
+ * Copyright (C) 2006-2009
  *     Noriaki Ando
  *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
@@ -41,7 +41,6 @@
 namespace RTC
 {
   class InPortConsumer;
-
   /*!
    * @if jp
    * @class PublisherNew
@@ -66,6 +65,7 @@
    *
    * @endif
    */
+
   class PublisherNew
     : public PublisherBase
   {
@@ -80,12 +80,20 @@
      * @brief コンストラクタ
      *
      * コンストラクタ
+     * 本 Publisher 用新規スレッドを生成する。
      *
+     * @param consumer データ送出を待つコンシューマ
+     * @param property 本Publisherの駆動制御情報を設定したPropertyオブジェクト
+     *                 (本Publisherでは未使用)
      * @else
      * @brief Constructor
      *
      * Constructor
+     * Create new thread for this Publisher.
      *
+     * @param consumer Consumer that waits for the data sending
+     * @param property Property object that is configured this Publisher's
+     *                 control information.(Unused in this Publisher)
      * @endif
      */
     PublisherNew();
@@ -108,246 +116,83 @@
     /*!
      * @if jp
      * @brief 初期化
-     *
-     * このクラスのオブジェクトを使用するのに先立ち、必ずこの関数を呼び
-     * 出す必要がある。引数には、このオブジェクトの各種設定情報を含む
-     * Properties を与える。データをプッシュする際のポリシーとして
-     * publisher.push_policy をキーとする値に、all, fifo, skip, new の
-     * いずれかを与えることができる。
-     * 
-     * 以下のオプションを与えることができる。
-     * 
-     * - thread_type: スレッドのタイプ (文字列、デフォルト: default)
-     * - publisher.push_policy: Pushポリシー (all, fifo, skip, new)
-     * - publisher.skip_count: 上記ポリシが skip のときのスキップ数
-     * - measurement.exec_time: タスク実行時間計測 (enable/disable)
-     * - measurement.exec_count: タスク関数実行時間計測周期 (数値, 回数)
-     * - measurement.period_time: タスク周期時間計測 (enable/disable)
-     * - measurement.period_count: タスク周期時間計測周期 (数値, 回数)
-     *
-     * @param property 本Publisherの駆動制御情報を設定したPropertyオブジェクト
-     * @return ReturnCode PORT_OK 正常終了
-     *                    INVALID_ARGS Properties が不正な値を含む
-     *
      * @else
-     * @brief Initialization
-     *
-     * This function have to be called before using this class object.
-     * Properties object that includes certain configuration
-     * information should be given as an argument.  all, fifo, skip,
-     * new can be given as a data push policy in a value of the key
-     * "publisher.push_policy."
-     *
-     * The following options are available.
-     * 
-     * - thread_type: Thread type (string, default: default)
-     * - publisher.push_policy: Push policy (all, fifo, skip, new)
-     * - publisher.skip_count: The number of skip count in the "skip" policy
-     * - measurement.exec_time: Task execution time measurement (enable/disable)
-     * - measurement.exec_count: Task execution time measurement count
-     *                           (numerical, number of times)
-     * - measurement.period_time: Task period time measurement (enable/disable)
-     * - measurement.period_count: Task period time measurement count 
-     *                             (number, count)
-     *
-     * @param property Property objects that includes the control information
-     *                 of this Publisher
-     * @return ReturnCode PORT_OK normal return
-     *                    INVALID_ARGS Properties with invalid values.
+     * @brief initialization
      * @endif
      */
     virtual ReturnCode init(coil::Properties& prop);
-
     /*!
      * @if jp
      * @brief InPortコンシューマのセット
      *
-     * この関数では、この Publisher に関連付けられるコンシューマをセットする。
-     * コンシューマオブジェクトがヌルポインタの場合、INVALID_ARGSが返される。
-     * それ以外の場合は、PORT_OK が返される。
-     *
-     * @param consumer Consumer へのポインタ
-     * @return ReturnCode PORT_OK 正常終了
-     *                    INVALID_ARGS 引数に不正な値が含まれている
-     *
      * @else
      * @brief Store InPort consumer
-     *
-     * This operation sets a consumer that is associated with this
-     * object. If the consumer object is NULL, INVALID_ARGS will be
-     * returned.
-     *
-     * @param consumer A pointer to a consumer object.
-     * @return ReturnCode PORT_OK normal return
-     *                    INVALID_ARGS given argument has invalid value
-     *
      * @endif
      */
     virtual ReturnCode setConsumer(InPortConsumer* consumer);
-
     /*!
      * @if jp
      * @brief バッファのセット
-     *
-     * この関数では、この Publisher に関連付けられるバッファをセットする。
-     * バッファオブジェクトがヌルポインタの場合、INVALID_ARGSが返される。
-     * それ以外の場合は、PORT_OK が返される。
-     *
-     * @param buffer CDR buffer へのポインタ
-     * @return ReturnCode PORT_OK 正常終了
-     *                    INVALID_ARGS 引数に不正な値が含まれている
-     *
+     * @param buffer CDRバッファ
+     * @return PORT_OK      正常終了
+     *         INVALID_ARGS 不正な引数
      * @else
      * @brief Setting buffer pointer
-     *
-     * This operation sets a buffer that is associated with this
-     * object. If the buffer object is NULL, INVALID_ARGS will be
-     * returned.
-     *
-     * @param buffer A pointer to a CDR buffer object.
-     * @return ReturnCode PORT_OK normal return
-     *                    INVALID_ARGS given argument has invalid value
-     *
+     * @param buffer CDR buffer
+     * @return PORT_OK      正常終了
+     *         INVALID_ARGS 不正な引数
      * @endif
      */
     virtual ReturnCode setBuffer(CdrBufferBase* buffer);
-
     /*!
      * @if jp
      * @brief リスナを設定する。
-     *
-     * Publisher に対してリスナオブジェクト ConnectorListeners を設定する。
-     * 各種リスナオブジェクトを含む ConnectorListeners をセットすることで、
-     * バッファの読み書き、データの送信時等にこれらのリスナをコールする。
-     * ConnectorListeners オブジェクトの所有権はポートまたは RTObject が持ち
-     * Publisher 削除時に ConnectorListeners は削除されることはない。
-     * ConnectorListeners がヌルポインタの場合 INVALID_ARGS を返す。
-     *
-     * @param info ConnectorProfile をローカル化したオブジェクト ConnectorInfo
-     * @param listeners リスナを多数保持する ConnectorListeners オブジェクト
+     * @param info ConnectorInfo
+     * @param listeners ConnectorListeners 
      * @return PORT_OK      正常終了
      *         INVALID_ARGS 不正な引数
      * @else
      * @brief Set the listener. 
-     *
-     * This function sets ConnectorListeners listener object to the
-     * Publisher. By setting ConnectorListeners containing various
-     * listeners objects, these listeners are called at the time of
-     * reading and writing of a buffer, and transmission of data
-     * etc. Since the ownership of the ConnectorListeners object is
-     * owned by Port or RTObject, the Publisher never deletes the
-     * ConnectorListeners object. If the given ConnectorListeners'
-     * pointer is NULL, this function returns INVALID_ARGS.
-     *
-     * @param info ConnectorInfo that is localized object of ConnectorProfile
-     * @param listeners ConnectorListeners that holds various listeners
+     * @param info ConnectorInfo
+     * @param listeners ConnectorListeners 
      * @return PORT_OK      Normal return
      *         INVALID_ARGS Invalid arguments
      * @endif
      */
     virtual ReturnCode setListener(ConnectorInfo& info,
                                    ConnectorListeners* listeners);
-
     /*!
      * @if jp
      * @brief データを書き込む
-     *
-     * Publisher が保持するバッファに対してデータを書き込む。コンシュー
-     * マ、バッファ、リスナ等が適切に設定されていない等、Publisher オブ
-     * ジェクトが正しく初期化されていない場合、この関数を呼び出すとエラー
-     * コード PRECONDITION_NOT_MET が返され、バッファへの書き込み等の操
-     * 作は一切行われない。
-     *
-     * バッファへの書き込みと、InPortへのデータの送信は非同期的に行われ
-     * るため、この関数は、InPortへのデータ送信の結果を示す、
-     * CONNECTION_LOST, BUFFER_FULL などのリターンコードを返すことがあ
-     * る。この場合、データのバッファへの書き込みは行われない。
-     *
-     * バッファへの書き込みに対して、バッファがフル状態、バッファのエ
-     * ラー、バッファへの書き込みがタイムアウトした場合、バッファの事前
-     * 条件が満たされない場合にはそれぞれ、エラーコード BUFFER_FULL,
-     * BUFFER_ERROR, BUFFER_TIMEOUT, PRECONDITION_NOT_MET が返される。
-     *
-     * これら以外のエラーの場合、PORT_ERROR が返される。
-     * 
-     *
      * @param data 書き込むデータ 
      * @param sec タイムアウト時間
      * @param nsec タイムアウト時間
-     *
-     * @return PORT_OK             正常終了
-     *         PRECONDITION_NO_MET consumer, buffer, listener等が適切に設定
-     *                             されていない等、このオブジェクトの事前条件
-     *                             を満たさない場合。
-     *         CONNECTION_LOST     接続が切断されたことを検知した。
-     *         BUFFER_FULL         バッファがフル状態である。
-     *         BUFFER_ERROR        バッファに何らかのエラーが生じた場合。
-     *         NOT_SUPPORTED       サポートされない操作が行われた。
-     *         TIMEOUT             タイムアウトした。
-     *
+     * @return リターンコード
      * @else
      * @brief Write data 
-     *
-     * This function writes data into the buffer associated with this
-     * Publisher.  If a Publisher object calls this function, without
-     * initializing correctly such as a consumer, a buffer, listeners,
-     * etc., error code PRECONDITION_NOT_MET will be returned and no
-     * operation of the writing to a buffer etc. will be performed.
-     *
-     * Since writing into the buffer and sending data to InPort are
-     * performed asynchronously, occasionally this function returns
-     * return-codes such as CONNECTION_LOST and BUFFER_FULL that
-     * indicate the result of sending data to InPort. In this case,
-     * writing data into buffer will not be performed.
-     *
-     * When publisher writes data to the buffer, if the buffer is
-     * filled, returns error, is returned with timeout and returns
-     * precondition error, error codes BUFFER_FULL, BUFFER_ERROR,
-     * BUFFER_TIMEOUT and PRECONDITION_NOT_MET will be returned
-     * respectively.
-     *
-     * In other cases, PROT_ERROR will be returned.
-     *
-     * @param data Data to be wrote to the buffer
-     * @param sec Timeout time in unit seconds
-     * @param nsec Timeout time in unit nano-seconds
-     * @return PORT_OK             Normal return
-     *         PRECONDITION_NO_MET Precondition does not met. A consumer,
-     *                             a buffer, listenes are not set properly.
-     *         CONNECTION_LOST     detected that the connection has been lost
-     *         BUFFER_FULL         The buffer is full status.
-     *         BUFFER_ERROR        Some kind of error occurred in the buffer.
-     *         NOT_SUPPORTED       Some kind of operation that is not supported
-     *                             has been performed.
-     *         TIMEOUT             Timeout occurred when writing to the buffer.
-     *
+     * @param data Data
+     * @param sec Timeout period
+     * @param nsec Timeout period
+     * @return Return code
      * @endif
      */
     virtual ReturnCode write(const cdrMemoryStream& data,
                              unsigned long sec,
                              unsigned long usec);
-
     /*!
      * @if jp
      *
      * @brief アクティブ化確認
      * 
-     * Publisher はデータポートと同期して activate/deactivate される。
-     * activate() / deactivate() 関数によって、アクティブ状態と非アクティ
-     * ブ状態が切り替わる。この関数により、現在アクティブ状態か、非アク
-     * ティブ状態かを確認することができる。
+     * アクティブ化されているか確認する。
      *
      * @return 状態確認結果(アクティブ状態:true、非アクティブ状態:false)
      *
      * @else
      *
-     * @brief If publisher is active state
+     * @brief Confirm to activate
      * 
-     * A Publisher can be activated/deactivated synchronized with the
-     * data port.  The active state and the non-active state are made
-     * transition by the "activate()" and the "deactivate()" functions
-     * respectively. This function confirms if the publisher is in
-     * active state.
+     * Confirm that has been activated.
      *
      * @return Result of state confirmation
      *         (Active state:true, Inactive state:false)
@@ -355,75 +200,99 @@
      * @endif
      */
     virtual bool isActive();
-
     /*!
      * @if jp
-     * @brief アクティブ化する
+     * @brief アクティブ化
+     * @return リターンコード
      *
-     * Publisher をアクティブ化する。この関数を呼び出すことにより、
-     * Publisherが持つ、データを送信するスレッドが動作を開始する。初期
-     * 化が行われていないなどにより、事前条件を満たさない場合、エラーコー
-     * ド PRECONDITION_NOT_MET を返す。
+     * @else
      *
-     * @return PORT_OK 正常終了
-     *         PRECONDITION_NOT_MET 事前条件を満たさない
+     * @brief activation
+     * @return Return code
      *
+     * @endif
+     */
+    virtual ReturnCode activate();
+    /*!
+     * @if jp
+     * @brief 非アクティブ化
+     * @return リターンコード
+     *
      * @else
-     * @brief activation
      *
-     * This function activates the publisher. By calling this
-     * function, this publisher starts the thread that pushes data to
-     * InPort. If precondition such as initialization process and so
-     * on is not met, the error code PRECONDITION_NOT_MET is returned.
+     * @brief deactivation
+     * @return Return code
      *
-     * @return PORT_OK normal return
-     *         PRECONDITION_NOT_MET precondition is not met
+     * @endif
+     */
+    virtual ReturnCode deactivate();
+    
+    /*!
+     * @if jp
+     * @brief スレッド実行関数
      *
+     * ACE_Task::svc() のオーバーライド
+     * バッファ内のデータが更新されるまでスレッドを待機させる。
+     *
+     * @return 実行結果
+     *
+     * @else
+     * @brief Thread execution function
+     *
+     * ACE_Task::svc() override function.
+     * Make thread stand by until data in the buffer is updated.
+     *
+     * @return Execution result
+     *
      * @endif
      */
-    virtual ReturnCode activate();
-
+    virtual int svc(void);
+    
     /*!
      * @if jp
-     * @brief 非アクティブ化する
+     * @brief タスク開始
      *
-     * Publisher を非アクティブ化する。この関数を呼び出すことにより、
-     * Publisherが持つ、データを送信するスレッドが動作を停止する。初期
-     * 化が行われていないなどにより、事前条件を満たさない場合、エラーコー
-     * ド PRECONDITION_NOT_MET を返す。
+     * ACE_Task::open() のオーバーライド
+     * 本 publisher 用新規スレッドを生成する。
      *
-     * @return PORT_OK 正常終了
-     *         PRECONDITION_NOT_MET 事前条件を満たさない
+     * @param args スレッド生成用引数(本Publisherでは未使用)
      *
+     * @return 実行結果
+     *
      * @else
-     * @brief deactivation
+     * @brief Task start function
      *
-     * This function deactivates the publisher. By calling this
-     * function, this publisher stops the thread that pushes data to
-     * InPort. If precondition such as initialization process and so
-     * on is not met, the error code PRECONDITION_NOT_MET is returned.
+     * ACE_Task::open() override function.
+     * Create newly thread for this Publisher.
      *
-     * @return PORT_OK normal return
-     *         PRECONDITION_NOT_MET precondition is not met
+     * @param args Thread creation arguments (Unused in this Publisher)
      *
+     * @return Execution result
+     *
      * @endif
      */
-    virtual ReturnCode deactivate();
+    //    virtual int open(void *args);
     
     /*!
      * @if jp
-     * @brief スレッド実行関数
+     * @brief タスク終了関数
      *
-     * coil::PeriodicTask により周期実行されるタスク実行関数。
+     * ACE_Task::release() のオーバーライド
+     * 駆動フラグをfalseに設定し、本 Publisher の駆動を停止する。
+     * ただし、駆動スレッドがブロックされている場合には、
+     * 最大1回コンシューマの送出処理が呼び出される場合がある。
      *
      * @else
-     * @brief Thread execution function
+     * @brief Task terminate function
      *
-     * A task execution function to be executed by coil::PeriodicTask.
+     * ACE_Task::release() override function.
+     * Set 2driven flag to false, and terminate this Publisher's operation.
+     * However, if the driven thread is blocked, Consumer's send
+     * processing may be invoked maximum once.
      *
      * @endif
      */
-    virtual int svc(void);
+    //    virtual void release();
     
   protected:
     enum Policy
@@ -473,59 +342,9 @@
     ReturnCode pushNew();
 
     /*!
-     * @if jp
-     * @brief BufferStatus から DataPortStatus への変換
+     * @brief return code conversion (BufferStatus -> DataPortStatus)
      *
-     * バッファからの戻り値を DataPortStatus::Enum 型へ変換する関数。そ
-     * れぞれ、以下のように変換される。変換時にコールバックを呼ぶ場合、
-     * コールバク関数も付記する。
-     * 
-     * - BUFFER_OK: PORT_OK
-     *  - None
-     * - BUFFER_ERROR: BUFFER_ERROR
-     *  - None
-     * - BUFFER_FULL: BUFFER_FULL
-     *  - onBufferFull()
-     * - NOT_SUPPORTED: PORT_ERROR
-     *  - None
-     * - TIMEOUT: BUFFER_TIMEOUT
-     *  - onBufferWriteTimeout()
-     * - PRECONDITION_NOT_MET: PRECONDITION_NOT_MET
-     *  - None
-     * - other: PORT_ERROR
-     *  - None
      *
-     * @param status BufferStatus
-     * @param data cdrMemoryStream
-     * @return DataPortStatu 型のリターンコード
-     *
-     * @else
-     * @brief Convertion from BufferStatus to DataPortStatus
-     * 
-     * This function converts return value from the buffer to
-     * DataPortStatus::Enum typed return value. The conversion rule is
-     * as follows. Callback functions are also shown, if it exists.
-     * 
-     * - BUFFER_OK: PORT_OK
-     *  - None
-     * - BUFFER_ERROR: BUFFER_ERROR
-     *  - None
-     * - BUFFER_FULL: BUFFER_FULL
-     *  - onBufferFull()
-     * - NOT_SUPPORTED: PORT_ERROR
-     *  - None
-     * - TIMEOUT: BUFFER_TIMEOUT
-     *  - onBufferWriteTimeout()
-     * - PRECONDITION_NOT_MET: PRECONDITION_NOT_MET
-     *  - None
-     * - other: PORT_ERROR
-     *  - None
-     *
-     * @param status BufferStatus
-     * @param data cdrMemoryStream
-     * @return DataPortStatus typed return code
-     *
-     * @endif
      */
     ReturnCode convertReturn(BufferStatus::Enum status,
                              const cdrMemoryStream& data);
@@ -533,14 +352,13 @@
     /*!
      * @if jp
      * @brief DataPortStatusに従ってリスナへ通知する関数を呼び出す。
-     *
      * @param status DataPortStatus
      * @param data cdrMemoryStream
      * @return リターンコード
      *
      * @else
-     * @brief Call listeners according to the DataPortStatus
-     *
+     * @brief This method calls the function notified the listener 
+     *        according to DataPortStatus.  
      * @param status DataPortStatus
      * @param data cdrMemoryStream
      * @return Return code
@@ -551,11 +369,14 @@
                               const cdrMemoryStream& data);
     
     /*!
+     * @brief Connector data listener functions
+     */
+    /*!
      * @if jp
      * @brief ON_BUFFER_WRITEのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_BUFFER_WRITE event to listeners
+     * @brief This method is notified to listeners of ON_BUFFER_WRITE. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -567,10 +388,10 @@
 
     /*!
      * @if jp
-     * @brief ON_BUFFER_FULLリスナへイベントを通知する。 
+     * @brief ON_BUFFER_FULLのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_BUFFER_FULL event to listeners
+     * @brief This method is notified to listeners of ON_BUFFER_FULL. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -585,7 +406,7 @@
      * @brief ON_BUFFER_WRITE_TIMEOUTのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_BUFFER_WRITE_TIMEOUT event to listeners
+     * @brief This method is notified to listeners of ON_BUFFER_WRITE_TIMEOUT. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -600,7 +421,7 @@
      * @brief ON_BUFFER_OVERWRITEのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_BUFFER_OVERWRITE event to listeners
+     * @brief This method is notified to listeners of ON_BUFFER_OVERWRITE.
      * @param data cdrMemoryStream
      * @endif
      */
@@ -615,7 +436,7 @@
      * @brief ON_BUFFER_READのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_BUFFER_READ event to listeners
+     * @brief This method is notified to listeners of ON_BUFFER_READ.
      * @param data cdrMemoryStream
      * @endif
      */
@@ -630,7 +451,7 @@
      * @brief ON_SENDのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_SEND event to listners
+     * @brief This method is notified to listeners of ON_SEND. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -645,7 +466,7 @@
      * @brief ON_RECEIVEDのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_RECEIVED event to listeners
+     * @brief This method is notified to listeners of ON_RECEIVED. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -660,7 +481,7 @@
      * @brief ON_RECEIVER_FULLのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_RECEIVER_FULL event to listeners
+     * @brief This method is notified to listeners of ON_RECEIVER_FULL. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -675,7 +496,7 @@
      * @brief ON_RECEIVER_TIMEOUTのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_RECEIVER_TIMEOUT event to listeners
+     * @brief This method is notified to listeners of ON_RECEIVER_TIMEOUT. 
      * @param data cdrMemoryStream
      * @endif
      */
@@ -690,7 +511,7 @@
      * @brief ON_RECEIVER_ERRORのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_RECEIVER_ERROR event to listeners
+     * @brief This method is notified to listeners of ON_RECEIVER_ERROR.
      * @param data cdrMemoryStream
      * @endif
      */
@@ -701,11 +522,38 @@
     }
 
     /*!
+     * @brief Connector listener functions
+     */
+//    inline void onBufferEmpty()
+//    {
+//      m_listeners->
+//        connector_[ON_BUFFER_EMPTY].notify(m_profile);
+//    }
+
+//    inline void onBufferReadTimeout()
+//    {
+//      m_listeners->
+//        connector_[ON_BUFFER_READ_TIMEOUT].notify(m_profile);
+//    }
+
+//    inline void onSenderEmpty()
+//    {
+//      m_listeners->
+//        connector_[ON_SENDER_EMPTY].notify(m_profile);
+//    }
+
+//    inline void onSenderTimeout()
+//    {
+//      m_listeners->
+//        connector_[ON_SENDER_TIMEOUT].notify(m_profile);
+//    }
+
+    /*!
      * @if jp
      * @brief ON_SENDER_ERRORのリスナへ通知する。 
      * @param data cdrMemoryStream
      * @else
-     * @brief Notify an ON_SENDER_ERROR event to listeners
+     * @brief This method is notified to listeners of ON_SENDER_ERROR.
      * @param data cdrMemoryStream
      * @endif
      */



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