[openrtm-commit:01793] r785 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 3月 1日 (火) 20:08:01 JST


Author: win-ei
Date: 2016-03-01 20:08:01 +0900 (Tue, 01 Mar 2016)
New Revision: 785

Modified:
   trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java
Log:
Adjusting function names and interfaces. refs #3385

Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java	2016-03-01 08:55:44 UTC (rev 784)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/CORBA_RTCUtil.java	2016-03-01 11:08:01 UTC (rev 785)
@@ -974,7 +974,7 @@
      *
      *
      */
-    public static Vector<String> get_connector_names(PortBase port){
+    public static Vector<String> get_connector_names_by_portref(PortBase port){
         if(port==null){
             return null;
         }
@@ -987,9 +987,42 @@
         }
         return names;
     }
-
     /**
+     * {@.ja 対象のRTCの指定したポートのコネクタの名前のリストを取得}
+     * {@.en Gets a list of the ports name specified port maintains.}
      *
+     * @param rtc
+     *   {@.ja RTコンポーネント}
+     *   {@.en Target RT-Component's instances}
+     *
+     * @param port 
+     *   {@.ja 対象のポート}
+     *   {@.en Target Port}
+     * 
+     * @return 
+     *   {@.ja コネクタ名のリスト}
+     *   {@.en List of port names}
+     */
+    public static Vector<String> get_connector_names(RTObject rtc, 
+                    String port_name){
+        if(rtc==null){
+            return null;
+        }
+        Vector<String> names = new Vector<String>();
+        PortService port = get_port_by_name(rtc, port_name);
+        if(port == null){
+            return null;
+        }
+        ConnectorProfileListHolder conprof =
+                new ConnectorProfileListHolder();
+        conprof.value = port.get_connector_profiles();
+        for(int ic=0;ic<conprof.value.length;++ic){
+            names.add(conprof.value[ic].name);
+        }
+        return names;
+    }
+    /**
+     *
      * {@.ja 指定したポートの保持しているコネクタのIDのリストを取得}
      * {@.en Gets a list of the connectorIDs specified port maintains.}
      *
@@ -1004,7 +1037,7 @@
      * 
      *
      */
-    public static Vector<String> get_connector_ids(PortBase port){
+    public static Vector<String> get_connector_ids_by_portref(PortBase port){
         if(port == null){
             return null;
         }
@@ -1019,6 +1052,42 @@
     }
     /**
      *
+     * {@.ja 対象のRTCの指定したポートのコネクタのIDのリストを取得}
+     * {@.en Gets a list of the connectorIDs specified port maintains 
+     *  of target RTC.}
+     *
+     * 
+     * @param rtc
+     *   {@.ja RTコンポーネント}
+     *   {@.en Target RT-Component's instances}
+     *
+     * @param name 
+     *   {@.ja ポート名}
+     *   {@.en the name of port}
+     * 
+     * @return 
+     *   {@.ja コネクタのIDのリスト}
+     *   {@.en List of connectorIDs}
+     *
+     */
+    public static Vector<String> get_connector_ids(RTObject rtc, 
+                    String port_name){
+        if(rtc==null){
+            return null;
+        }
+        Vector<String> ids = new Vector<String>();
+        PortService port = get_port_by_name(rtc, port_name);
+        if(port==null){
+            return null;
+        }
+        ConnectorProfile[] conprof = port.get_connector_profiles();
+        for(int ic=0;ic<conprof.length;++ic){
+            ids.add(conprof[ic].connector_id);
+        }
+        return ids;
+    }
+    /**
+     *
      * {@.ja 指定したポートを接続するためのコネクタプロファイルを取得}
      * {@.en Gets ConnectorProfile for connect specified ports}
      *



More information about the openrtm-commit mailing list