[openrtm-commit:01023] r697 - in trunk/jp.go.aist.rtm.RTC: . idl src/jp/go/aist/rtm/RTC/executionContext src/jp/go/aist/rtm/RTC/util tests/src tests/src/Extension tests/src/Extension/EC tests/src/Extension/EC/logical_time tests/src/jp/go/aist/rtm tests/src/jp/go/aist/rtm/RTC/executionContext
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 2月 23日 (土) 18:13:52 JST
Author: ga
Date: 2013-02-23 18:13:52 +0900 (Sat, 23 Feb 2013)
New Revision: 697
Added:
trunk/jp.go.aist.rtm.RTC/idl/LogicalTimeTriggeredEC.idl
trunk/jp.go.aist.rtm.RTC/tests/src/Extension/
trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/
trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/logical_time/
trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/logical_time/LogicalTimeTriggeredECTests.java
Modified:
trunk/jp.go.aist.rtm.RTC/build.xml
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextBase.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContext.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/TimeValue.java
trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/AllTest110.java
trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContextTests.java
trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContextTests.java
Log:
LogicalTimeTriggeredEC have been implemented.
Modified: trunk/jp.go.aist.rtm.RTC/build.xml
===================================================================
--- trunk/jp.go.aist.rtm.RTC/build.xml 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/build.xml 2013-02-23 09:13:52 UTC (rev 697)
@@ -119,6 +119,8 @@
<property name="idl.Logger" value="${idl.path}/Logger.idl" />
+ <property name="idl.LogicalTimeTriggeredEC" value="${idl.path}/LogicalTimeTriggeredEC.idl" />
+
<property name="idl.test.CorbaConsumer" value="${idl.path.tests}/CorbaConsumer/Hello.idl" />
<property name="idl.test.CorbaPort" value="${idl.path.tests}/CorbaPort/MyService.idl" />
@@ -482,6 +484,12 @@
</exec>
+ <exec executable="${java.home}\..\bin\idlj">
+
+ <arg line="-v -fall -td ${source} -i ${idl.path} -emitAll ${idl.LogicalTimeTriggeredEC}"/>
+
+ </exec>
+
</target>
Added: trunk/jp.go.aist.rtm.RTC/idl/LogicalTimeTriggeredEC.idl
===================================================================
--- trunk/jp.go.aist.rtm.RTC/idl/LogicalTimeTriggeredEC.idl (rev 0)
+++ trunk/jp.go.aist.rtm.RTC/idl/LogicalTimeTriggeredEC.idl 2013-02-23 09:13:52 UTC (rev 697)
@@ -0,0 +1,34 @@
+// -*- IDL -*-
+/*!
+ * @file OpenRTM.idl
+ * @brief OpenRTM interface definition
+ * @date $Date: 2007-09-21 09:19:33 $
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2007
+ * Task-intelligence Research Group,
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id: OpenRTM.idl 1338 2009-05-18 05:58:25Z n-ando $
+ *
+ */
+
+#include <RTC.idl>
+
+#pragma prefix "openrtm.org"
+
+module OpenRTM
+{
+
+ interface LogicalTimeTriggeredEC
+ : RTC::ExecutionContextService
+ {
+ void tick(in unsigned long sec, in unsigned long usec);
+ void get_time(out unsigned long sec, out unsigned long usec);
+ };
+
+};
+
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextBase.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextBase.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextBase.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -1,20 +1,15 @@
package jp.go.aist.rtm.RTC.executionContext;
-import org.omg.CORBA.SystemException;
-
-import RTC.ExecutionContextService;
-import OpenRTM.ExtTrigExecutionContextServicePOA;
-
import jp.go.aist.rtm.RTC.RTObjectStateMachine;
import jp.go.aist.rtm.RTC.RTObject_impl;
-import jp.go.aist.rtm.RTC.log.Logbuf;
import jp.go.aist.rtm.RTC.util.Properties;
import jp.go.aist.rtm.RTC.util.TimeValue;
+import RTC.ExecutionContextService;
import RTC.ExecutionKind;
import RTC.LifeCycleState;
import RTC.LightweightRTObject;
-import RTC.ReturnCode_t;
import RTC.RTObject;
+import RTC.ReturnCode_t;
/**
* <p>Periodic Sampled Data Processing(周期実行用)ExecutionContextのベースとなる
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExecutionContextWorker.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -623,7 +623,7 @@
- protected void updateComponentList() {
+ public void updateComponentList() {
synchronized (m_mutex) {
synchronized (m_addedMutex) {// adding component
for (int ic=0; ic < m_addedComps.size(); ++ic) {
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContext.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContext.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContext.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -140,13 +140,11 @@
}
if(!m_workerthread.ticked_){continue;}
}
- TimeValue t0 = new TimeValue();
- t0.convert(System.nanoTime()/1000000000.0);
+ TimeValue t0 = new TimeValue(System.nanoTime());
m_worker.invokeWorkerPreDo();
m_worker.invokeWorkerDo();
m_worker.invokeWorkerPostDo();
- TimeValue t1 = new TimeValue();
- t1.convert(System.nanoTime()/1000000000.0);
+ TimeValue t1 = new TimeValue(System.nanoTime());
synchronized (m_workerthread.mutex_) {
m_workerthread.ticked_ = false ;
}
@@ -579,8 +577,7 @@
(long )(m_activationTimeout.toDouble() / getPeriod().toDouble());
rtcout.println(Logbuf.DEBUG,"Timeout is "+ m_activationTimeout.toDouble() + "[s] ("+ getRate() + "[s] in "+ cycle + " times");
// Wating INACTIVE -> ACTIVE
- TimeValue starttime = new TimeValue();
- starttime.convert(System.nanoTime()/1000000000.0);
+ TimeValue starttime = new TimeValue(System.nanoTime());
while (rtobj.isCurrentState(LifeCycleState.INACTIVE_STATE))
{
ret = onWaitingActivated(rtobj, count); // Template method
@@ -606,8 +603,7 @@
} catch (Exception e) {
e.printStackTrace();
}
- TimeValue delta= new TimeValue();
- delta.convert(System.nanoTime()/1000000000.0);
+ TimeValue delta= new TimeValue(System.nanoTime());
delta = delta.minus(starttime);
rtcout.println(Logbuf.DEBUG,"Waiting to be ACTIVE state. " + delta + " [s] slept (" + count +"/" + cycle);
++count;
@@ -688,8 +684,7 @@
(long )(m_deactivationTimeout.toDouble() / getPeriod().toDouble());
rtcout.println(Logbuf.DEBUG,"Timeout is "+ m_deactivationTimeout.toDouble() + "[s] ("+ getRate() + "[s] in "+ cycle + " times");
// Wating ACTIVE -> INACTIVE
- TimeValue starttime = new TimeValue();
- starttime.convert(System.nanoTime()/1000000000.0);
+ TimeValue starttime = new TimeValue(System.nanoTime());
while (rtobj.isCurrentState(LifeCycleState.ACTIVE_STATE))
{
ret = onWaitingDeactivated(rtobj, count); // Template method
@@ -715,8 +710,7 @@
} catch (Exception e) {
e.printStackTrace();
}
- TimeValue delta = new TimeValue();
- delta.convert(System.nanoTime()/1000000000.0);
+ TimeValue delta = new TimeValue(System.nanoTime());
delta = delta.minus(starttime);
rtcout.println(Logbuf.DEBUG,"Waiting to be INACTIVE state. Sleeping " + delta + " [s] (" + count +"/" + cycle);
++count;
@@ -796,8 +790,7 @@
(long )(m_resetTimeout.toDouble() / getPeriod().toDouble());
rtcout.println(Logbuf.DEBUG,"Timeout is "+ m_resetTimeout.toDouble() + "[s] ("+ getRate() + "[s] in "+ cycle + " times");
// Wating ERROR -> INACTIVE
- TimeValue starttime = new TimeValue();
- starttime.convert(System.nanoTime()/1000000000.0);
+ TimeValue starttime = new TimeValue(System.nanoTime());
while (rtobj.isCurrentState(LifeCycleState.ERROR_STATE))
{
ret = onWaitingReset(rtobj, count); // Template method
@@ -823,8 +816,7 @@
} catch (Exception e) {
e.printStackTrace();
}
- TimeValue delta = new TimeValue();
- delta.convert(System.nanoTime()/1000000000.0);
+ TimeValue delta = new TimeValue(System.nanoTime());
delta = delta.minus(starttime);
rtcout.println(Logbuf.DEBUG,"Waiting to be INACTIVE state. Sleeping " + delta + " [s] (" + count +"/" + cycle);
++count;
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContext.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -1,6 +1,5 @@
package jp.go.aist.rtm.RTC.executionContext;
-import java.util.ArrayList;
import java.util.Vector;
import jp.go.aist.rtm.RTC.Manager;
@@ -13,16 +12,12 @@
import jp.go.aist.rtm.RTC.StateHolder;
import jp.go.aist.rtm.RTC.StateMachine;
import jp.go.aist.rtm.RTC.log.Logbuf;
-import jp.go.aist.rtm.RTC.util.CORBA_SeqUtil;
import jp.go.aist.rtm.RTC.util.NVUtil;
import jp.go.aist.rtm.RTC.util.POAUtil;
import jp.go.aist.rtm.RTC.util.Properties;
import jp.go.aist.rtm.RTC.util.TimeValue;
import jp.go.aist.rtm.RTC.util.equalFunctor;
-//import RTC.ExecutionContextProfile;
import OpenRTM.DataFlowComponent;
-import OpenRTM.DataFlowComponentHelper;
-import RTC.ExecutionContextProfileHolder;
import RTC.ExecutionContextService;
import RTC.ExecutionContextServiceHelper;
import RTC.ExecutionContextServicePOA;
@@ -152,12 +147,10 @@
}
}
}
- TimeValue t0 = new TimeValue();
- t0.convert(System.nanoTime()/1000000000.0);
+ TimeValue t0 = new TimeValue(System.nanoTime());
invokeWorkerDo();
invokeWorkerPostDo();
- TimeValue t1 = new TimeValue();
- t1.convert(System.nanoTime()/1000000000.0);
+ TimeValue t1 = new TimeValue(System.nanoTime());
TimeValue period = getPeriod();
if(count > 1000){
TimeValue t1_w = t1;
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/TimeValue.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/TimeValue.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/util/TimeValue.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -33,9 +33,21 @@
this.tv_sec = sec;
this.tv_usec = usec;
}
+
/**
* {@.ja コンストラクタ}
+ * {@.en Constructor}
*
+ * @param nano
+ * {@.ja システム時間}
+ * {@.en System Time}
+ */
+ public TimeValue(long system) {
+ convert(system/1000000000.0);
+ }
+ /**
+ * {@.ja コンストラクタ}
+ *
* @param timeval
* {@.ja 設定値}
* {@.en Set value}
Added: trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/logical_time/LogicalTimeTriggeredECTests.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/logical_time/LogicalTimeTriggeredECTests.java (rev 0)
+++ trunk/jp.go.aist.rtm.RTC/tests/src/Extension/EC/logical_time/LogicalTimeTriggeredECTests.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -0,0 +1,326 @@
+package Extension.EC.logical_time;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import jp.go.aist.rtm.RTC.DataFlowComponentBase;
+import jp.go.aist.rtm.RTC.Manager;
+import jp.go.aist.rtm.RTC.executionContext.ECFactoryBase;
+import jp.go.aist.rtm.RTC.executionContext.ECFactoryJava;
+import jp.go.aist.rtm.RTC.executionContext.ExecutionContextBase;
+import junit.framework.TestCase;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.IntHolder;
+
+import RTC.ComponentProfile;
+import RTC.ExecutionContext;
+import RTC.ExecutionContextService;
+import RTC.ReturnCode_t;
+import _SDOPackage.Configuration;
+import _SDOPackage.DeviceProfile;
+import _SDOPackage.InterfaceNotImplemented;
+import _SDOPackage.InvalidParameter;
+import _SDOPackage.Monitoring;
+import _SDOPackage.NameValue;
+import _SDOPackage.NotAvailable;
+import _SDOPackage.Organization;
+import _SDOPackage.SDOService;
+import _SDOPackage.ServiceProfile;
+
+/**
+* LogicalTimeTriggeredECクラス テスト
+* 対象クラス:LogicalTimeTriggeredEC
+*/
+public class LogicalTimeTriggeredECTests extends TestCase {
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * <p>tick()メソッドのテスト
+ * <ul>
+ * <li>ECを正常にstartできるか?</li>
+ * <li>RTObjectを正常に登録できるか?</li>
+ * <li>tickメソッドの呼び出しで正常に論理時間が設定される?</li>
+ * </ul>
+ * </p>
+ */
+ public void test_tick() {
+ // RTObjectを生成する
+ Manager manager = Manager.instance();
+ DataFlowComponentMock rto = new DataFlowComponentMock(manager); // will be deleted automatically
+ LightweightRTObjectMock mock = rto;
+ manager.activateManager();
+
+ // ExecutionContextを生成する
+ LogicalTimeTriggeredEC ec = new LogicalTimeTriggeredEC(); // will be deleted automatically
+ assertEquals(ReturnCode_t.RTC_OK, ec.start());
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ assertEquals(ReturnCode_t.RTC_OK, ec.add_component(rto._this()));
+ ec.m_worker.updateComponentList();
+ assertEquals(ReturnCode_t.RTC_OK, ec.activate_component(rto.getObjRef()));
+ ec.tick(1, 1);
+ // tick()呼出を行い、その回数とon_execute()の呼出回数が一致していることを確認する
+ for (int tickCalledCount = 2; tickCalledCount < 5; tickCalledCount++) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ assertEquals(tickCalledCount, mock.countLog("on_execute"));
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ ec.tick(tickCalledCount, tickCalledCount-1);
+ }
+ //入力した論理時間が設定されているか?
+ IntHolder secHolder = new IntHolder();
+ IntHolder usecHolder = new IntHolder();
+ ec.get_time(secHolder, usecHolder);
+ assertEquals(4, secHolder.value);
+ assertEquals(3, usecHolder.value);
+ }
+
+ /**
+ * <p>name()メソッドのテスト
+ * <ul>
+ * <li>コンストラクタで指定した名称を、name()メソッドで正しく取得できるか?</li>
+ * </ul>
+ * </p>
+ */
+ public void test_name() {
+ String name = "Extension.EC.logical_time.LogicalTimeTriggeredEC";
+ ECFactoryBase factory = new ECFactoryJava(name);
+ // コンストラクタで指定した名称を、name()メソッドで正しく取得できるか?
+ assertEquals(name, factory.name());
+ }
+
+ /**
+ * <p>ExecutionContext FactoryからのEC生成チェック
+ * <ul>
+ * <li>ECFactoryを正常に登録できるか?</li>
+ * <li>登録したECFactoryからExecutionContextを正常に生成できるか?</li>
+ * </ul>
+ * </p>
+ */
+ public void test_create_destroy() {
+ ECFactoryJava factory = new ECFactoryJava("Extension.EC.logical_time.LogicalTimeTriggeredEC");
+ assertEquals("Extension.EC.logical_time.LogicalTimeTriggeredEC", factory.name());
+ ExecutionContextBase base = factory.create();
+ assertNotNull(base);
+ assertEquals(Double.valueOf(1000.0), Double.valueOf(base.getRate()));
+ base = factory.destroy(base);
+ assertNull(base);
+ }
+
+ private class LightweightRTObjectMock extends DataFlowComponentBase {
+ protected Map<Integer, ExecutionContext> m_execContexts = new HashMap<Integer, ExecutionContext>();
+ protected int m_nextUniqueId;
+ protected Vector<String> m_log = new Vector<String>();
+ protected boolean m_alive;
+ protected boolean m_error;
+
+ public LightweightRTObjectMock(Manager manager) {
+ super(manager);
+ m_alive = true;
+ m_error = false;
+ }
+
+ // RTC::_impl_ComponentAction
+ public int attach_executioncontext(ExecutionContext exec_context) {
+ m_log.add("attach_executioncontext");
+ m_execContexts.put(new Integer(m_nextUniqueId++), exec_context);
+ return m_nextUniqueId;
+ }
+ public ReturnCode_t detach_executioncontext(int ec_id) {
+ m_log.add("detach_executioncontext");
+ m_execContexts.remove(ec_id);
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_initialize() {
+ m_log.add("on_initialize");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_finalize() {
+ m_log.add("on_finalize");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_startup(String ec_id) {
+ m_log.add("on_startup");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_shutdown(String ec_id) {
+ m_log.add("on_shutdown");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_activated(String ec_id) {
+ m_log.add("on_activated");
+ return returnCode(ReturnCode_t.RTC_OK);
+ }
+ public ReturnCode_t on_deactivated(String ec_id) {
+ m_log.add("on_deactivated");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_aborting(String ec_id) {
+ m_log.add("on_aborting");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_error(String ec_id) {
+ m_log.add("on_error");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t on_reset(String ec_id) {
+ m_log.add("on_reset");
+ return ReturnCode_t.RTC_OK;
+ }
+
+ // RTC::_impl_LightweightRTObject
+// public ReturnCode_t initialize() {
+// m_log.add("initialize");
+// return ReturnCode_t.RTC_OK;
+// }
+ public ReturnCode_t _finalize() {
+ m_log.add("finalize");
+ return ReturnCode_t.RTC_OK;
+ }
+ public ReturnCode_t exit() {
+ m_log.add("exit");
+ return ReturnCode_t.RTC_OK;
+ }
+ public boolean is_alive() {
+ m_log.add("is_alive");
+ return m_alive;
+ }
+ public ExecutionContext[] get_contexts() {
+ m_log.add("get_contexts");
+ return null;
+ }
+ public ExecutionContext get_context(String ec_id) {
+ m_log.add("get_context");
+ return m_execContexts.get(ec_id);
+ }
+
+ public int countLog(String line) {
+ int count = 0;
+ for( int i = 0; i < m_log.size(); ++i) {
+ if( m_log.get(i).equals(line)) ++count;
+ }
+ return count;
+ }
+
+ void setAlive(boolean alive) {
+ m_alive = alive;
+ }
+
+ void setError(boolean error) {
+ m_error = error;
+ }
+
+ private ReturnCode_t returnCode(ReturnCode_t rc) {
+ return m_error ? ReturnCode_t.RTC_ERROR : rc;
+ }
+ };
+
+ private class DataFlowComponentMock extends LightweightRTObjectMock {
+ public DataFlowComponentMock(Manager manager) {
+ super(manager);
+ }
+ // SDOPackage::_impl_SDOSystemElement
+ public Organization[] get_owned_organizations() throws NotAvailable {
+ m_log.add("get_owned_organizations");
+ return null; // dummy
+ }
+ public String get_sdo_id() throws NotAvailable, InternalError {
+ m_log.add("get_sdo_id");
+ return null; // dummy
+ }
+ public String get_sdo_type() throws NotAvailable, InternalError {
+ m_log.add("get_sdo_type");
+ return null; // dummy
+ }
+ public DeviceProfile get_device_profile() throws NotAvailable, InternalError {
+ m_log.add("get_device_profile");
+ return null; // dummy
+ }
+ public ServiceProfile[] get_service_profiles() throws NotAvailable {
+ m_log.add("get_service_profiles");
+ return null; // dummy
+ }
+ public ServiceProfile get_service_profile(final String id) throws InvalidParameter, NotAvailable, InternalError {
+ m_log.add("get_service_profile");
+ return null; // dummy
+ }
+ public SDOService get_sdo_service(final String id) throws InvalidParameter, NotAvailable, InternalError {
+ m_log.add("get_sdo_service");
+ return null; // dummy
+ }
+ public Configuration get_configuration() throws InterfaceNotImplemented, NotAvailable, InternalError {
+ m_log.add("get_configuration");
+ return null; // dummy
+ }
+ public Monitoring get_monitoring() throws InterfaceNotImplemented, NotAvailable, InternalError {
+ m_log.add("get_monitoring");
+ return null; // dummy
+ }
+ public Organization[] get_organizations() throws NotAvailable, InternalError {
+ m_log.add("get_organizations");
+ return null; // dummy
+ }
+ public NameValue[] get_status_list() throws NotAvailable, InternalError {
+ m_log.add("get_status_list");
+ return null; // dummy
+ }
+ public Any get_status(final String name) throws InvalidParameter, NotAvailable, InternalError {
+ m_log.add("get_status");
+ return null; // dummy
+ }
+
+ // RTC::_impl_RTObject
+ public ComponentProfile get_component_profile() {
+ m_log.add("get_component_profile");
+ // dummy
+ ComponentProfile prof = new ComponentProfile();
+ return prof;
+ }
+/*
+ public Port[] get_ports() {
+ m_log.add("get_ports");
+ // dummy
+ Port[] ports = new Port[0];
+ return ports;
+ }
+*/
+ public ExecutionContextService[] get_execution_context_services() {
+ m_log.add("get_execution_context_services");
+ // dummy
+ ExecutionContextService[] ec = new ExecutionContextService[0];
+ return ec;
+ }
+
+ // RTC::_impl_DataFlowComponentAction
+ public ReturnCode_t on_execute(int ec_id) {
+ m_log.add("on_execute");
+ return ReturnCode_t.RTC_OK; // dummy
+ }
+ public ReturnCode_t on_state_update(int ec_id) {
+ m_log.add("on_state_update");
+ return ReturnCode_t.RTC_OK; // dummy
+ }
+ public ReturnCode_t on_rate_changed(int ec_id) {
+ m_log.add("on_rate_changed");
+ return ReturnCode_t.RTC_OK; // dummy
+ }
+ }
+}
Modified: trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/AllTest110.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/AllTest110.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/AllTest110.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -1,11 +1,13 @@
package jp.go.aist.rtm;
+import Extension.EC.logical_time.LogicalTimeTriggeredECTests;
import jp.go.aist.rtm.RTC.log.LogBufTimeTest;
import jp.go.aist.rtm.RTC.log.LogbufTest;
import jp.go.aist.rtm.RTC.util.AdjustedClockTest;
import jp.go.aist.rtm.RTC.util.TimeValueTest;
import jp.go.aist.rtm.RTC.buffer.RingBufferTest;
-import jp.go.aist.rtm.RTC.executionContext.*;
+import jp.go.aist.rtm.RTC.executionContext.ExtTrigExecutionContextTests;
+import jp.go.aist.rtm.RTC.executionContext.PeriodicExecutionContextTests;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -14,14 +16,17 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test for 1.1.0");
+ suite.addTestSuite(LogbufTest.class);
+ suite.addTestSuite(LogBufTimeTest.class);
+
+ suite.addTestSuite(PeriodicExecutionContextTests.class);
+ suite.addTestSuite(ExtTrigExecutionContextTests.class);
+ suite.addTestSuite(LogicalTimeTriggeredECTests.class);
+
suite.addTestSuite(TimeValueTest.class);
- suite.addTestSuite(LogbufTest.class);
suite.addTestSuite(AdjustedClockTest.class);
- suite.addTestSuite(LogBufTimeTest.class);
suite.addTestSuite(RingBufferTest.class);
- suite.addTestSuite(ExtTrigExecutionContextTests.class);
- suite.addTestSuite(PeriodicExecutionContextTests.class);
return suite;
}
Modified: trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContextTests.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContextTests.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/ExtTrigExecutionContextTests.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -13,8 +13,6 @@
import RTC.ComponentProfile;
import RTC.ExecutionContext;
import RTC.ExecutionContextService;
-import RTC.ExecutionKind;
-//import RTC.Port;
import RTC.ReturnCode_t;
import _SDOPackage.Configuration;
import _SDOPackage.DeviceProfile;
Modified: trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContextTests.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContextTests.java 2013-02-20 14:57:21 UTC (rev 696)
+++ trunk/jp.go.aist.rtm.RTC/tests/src/jp/go/aist/rtm/RTC/executionContext/PeriodicExecutionContextTests.java 2013-02-23 09:13:52 UTC (rev 697)
@@ -6,8 +6,8 @@
import jp.go.aist.rtm.RTC.DataFlowComponentBase;
import jp.go.aist.rtm.RTC.Manager;
-import jp.go.aist.rtm.RTC.util.POAUtil;
import jp.go.aist.rtm.RTC.util.ORBUtil;
+import jp.go.aist.rtm.RTC.util.POAUtil;
import junit.framework.TestCase;
import org.omg.CORBA.Any;
@@ -24,7 +24,6 @@
import RTC.LightweightRTObject;
import RTC.LightweightRTObjectHelper;
import RTC.LightweightRTObjectPOA;
-import RTC.PortService;
import RTC.ReturnCode_t;
import _SDOPackage.Configuration;
import _SDOPackage.DeviceProfile;
More information about the openrtm-commit
mailing list