[openrtm-commit:01306] r2501 - in branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest: LightweightRTObjectServant stubs

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 2月 15日 (土) 19:03:04 JST


Author: win-ei
Date: 2014-02-15 19:03:04 +0900 (Sat, 15 Feb 2014)
New Revision: 2501

Modified:
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/LightweightRTObjectServantTests.cpp
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/Makefile.am
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ExecutionContextImpl.cpp
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/LightweightRTObjectImpl.cpp
Log:
Daily work. 

Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/LightweightRTObjectServantTests.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/LightweightRTObjectServantTests.cpp	2014-02-15 09:52:09 UTC (rev 2500)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/LightweightRTObjectServantTests.cpp	2014-02-15 10:03:04 UTC (rev 2501)
@@ -20,10 +20,15 @@
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/TestAssert.h>
+
 #include <LightweightRTObjectServant.h>
+#include <ExecutionContextServant.h>
+
 #include <doil/ServantBase.h>
 #include <doil/corba/CORBAManager.h>
+
 #include <stubs/LightweightRTObjectImpl.h>
+#include <stubs/ExecutionContextImpl.h>
 #include <stubs/Logger.h>
 
 /*!
@@ -51,6 +56,8 @@
   
   private:
     ::UnitTest::Servant::LightweightRTObjectImpl* Impl;
+    ::UnitTest::Servant::ExecutionContextImpl* EImpl;
+
     ::UnitTest::Servant::Logger Log;
     ::doil::ServantBase* Servant;
     ::RTC::CORBA::LightweightRTObjectServant * CServant;
@@ -71,6 +78,14 @@
         doil::ReturnCode_t ret = doil::CORBA::CORBAManager::instance().activateObject(Impl);
         Servant = doil::CORBA::CORBAManager::instance().toServant(Impl);
         CServant = dynamic_cast<RTC::CORBA::LightweightRTObjectServant*>(Servant);
+
+        EImpl = new UnitTest::Servant::ExecutionContextImpl(Log);
+        doil::CORBA::CORBAManager::instance().registerFactory(EImpl->id(),
+            doil::New<RTC::CORBA::ExecutionContextServant>,
+            doil::Delete<RTC::CORBA::ExecutionContextServant>);
+        ret = doil::CORBA::CORBAManager::instance().activateObject(EImpl);
+
+
     }
     
     /*!

Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/Makefile.am
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/Makefile.am	2014-02-15 09:52:09 UTC (rev 2500)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/LightweightRTObjectServant/Makefile.am	2014-02-15 10:03:04 UTC (rev 2501)
@@ -67,6 +67,7 @@
 LightweightRTObjectServantTests_LDADD  += -lcppunit
 #LightweightRTObjectServantTests_LDADD  += -lstubs
 LightweightRTObjectServantTests_LDADD  += $(target_srcdir)/LightweightRTObjectServant.o
+LightweightRTObjectServantTests_LDADD  += $(target_srcdir)/ExecutionContextServant.o
 LightweightRTObjectServantTests_LDADD  += $(target_srcdir)/RTCTypeConversion.o
 LightweightRTObjectServantTests_LDADD  += $(target_srcdir)/SDOPackageTypeConversion.o
 LightweightRTObjectServantTests_LDADD  += $(target_srcdir)/ComponentActionServant.o

Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ExecutionContextImpl.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ExecutionContextImpl.cpp	2014-02-15 09:52:09 UTC (rev 2500)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ExecutionContextImpl.cpp	2014-02-15 10:03:04 UTC (rev 2501)
@@ -33,11 +33,13 @@
 
     ExecutionContextImpl::ExecutionContextImpl()
     {
+      sprintf(m_name, "%s", id());
       ++count;
       m_logger = new Logger();
     } 
     ExecutionContextImpl::ExecutionContextImpl(Logger& aLogger)
     {
+      sprintf(m_name, "%s", id());
       ++count;
       m_logger = &aLogger;
     } 

Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/LightweightRTObjectImpl.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/LightweightRTObjectImpl.cpp	2014-02-15 09:52:09 UTC (rev 2500)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/LightweightRTObjectImpl.cpp	2014-02-15 10:03:04 UTC (rev 2501)
@@ -117,7 +117,6 @@
             m_logger->push("get_context");
           }
        ::RTC::Local::IExecutionContext *ret = new ::UnitTest::Servant::ExecutionContextImpl();
-       std::cout<<"020:"<< m_pec <<std::endl;
         //return ret;
         return m_pec;
     }



More information about the openrtm-commit mailing list