[openrtm-commit:01303] r2498 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 15日 (土) 18:02:50 JST
Author: win-ei
Date: 2014-02-15 18:02:50 +0900 (Sat, 15 Feb 2014)
New Revision: 2498
Modified:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/Makefile.am
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/SDOServantTests.cpp
Log:
Daily work.
Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/Makefile.am
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/Makefile.am 2014-02-15 09:01:19 UTC (rev 2497)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/Makefile.am 2014-02-15 09:02:50 UTC (rev 2498)
@@ -49,6 +49,7 @@
SDOServantTests_SOURCES += ../stubs/SDOImpl.cpp
SDOServantTests_SOURCES += ../stubs/ConfigurationImpl.cpp
SDOServantTests_SOURCES += ../stubs/SDOServiceImpl.cpp
+SDOServantTests_SOURCES += ../stubs/MonitoringImpl.cpp
SDOServantTests_SOURCES += ../stubs/Logger.cpp
SDOServantTests_LDFLAGS = -L$(libdir)
@@ -59,6 +60,9 @@
SDOServantTests_LDADD += -lcoil
SDOServantTests_LDADD += -lcppunit
SDOServantTests_LDADD += $(target_srcdir)/SDOServant.o
+SDOServantTests_LDADD += $(target_srcdir)/SDOServiceServant.o
+SDOServantTests_LDADD += $(target_srcdir)/ConfigurationServant.o
+SDOServantTests_LDADD += $(target_srcdir)/MonitoringServant.o
SDOServantTests_LDADD += $(target_srcdir)/RTCTypeConversion.o
SDOServantTests_LDADD += $(target_srcdir)/SDOPackageTypeConversion.o
Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/SDOServantTests.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/SDOServantTests.cpp 2014-02-15 09:01:19 UTC (rev 2497)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/SDOServant/SDOServantTests.cpp 2014-02-15 09:02:50 UTC (rev 2498)
@@ -20,10 +20,20 @@
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestAssert.h>
+
#include <SDOServant.h>
+#include <SDOServiceServant.h>
+#include <ConfigurationServant.h>
+#include <MonitoringServant.h>
+
#include <doil/ServantBase.h>
#include <doil/corba/CORBAManager.h>
+
#include <stubs/SDOImpl.h>
+#include <stubs/SDOServiceImpl.h>
+#include <stubs/ConfigurationImpl.h>
+#include <stubs/MonitoringImpl.h>
+
#include <stubs/Logger.h>
/*!
@@ -54,9 +64,17 @@
private:
::UnitTest::Servant::SDOImpl* Impl;
+ ::UnitTest::Servant::SDOServiceImpl* SSImpl;
+ ::UnitTest::Servant::ConfigurationImpl* CImpl;
+ ::UnitTest::Servant::MonitoringImpl* MImpl;
+
::UnitTest::Servant::Logger Log;
+
::doil::ServantBase* Servant;
::SDOPackage::CORBA::SDOServant * CServant;
+ ::SDOPackage::CORBA::SDOServiceServant * CSServant;
+ ::SDOPackage::CORBA::ConfigurationServant * CCServant;
+ ::SDOPackage::CORBA::MonitoringServant * MServant;
public:
@@ -73,6 +91,28 @@
doil::ReturnCode_t ret = doil::CORBA::CORBAManager::instance().activateObject(Impl);
Servant = doil::CORBA::CORBAManager::instance().toServant(Impl);
CServant = dynamic_cast<SDOPackage::CORBA::SDOServant*>(Servant);
+
+ SSImpl = new UnitTest::Servant::SDOServiceImpl();
+ doil::CORBA::CORBAManager::instance().registerFactory(SSImpl->id(),
+ doil::New<SDOPackage::CORBA::SDOServiceServant>,
+ doil::Delete<SDOPackage::CORBA::SDOServiceServant>);
+ doil::ReturnCode_t ret2 = doil::CORBA::CORBAManager::instance().activateObject(SSImpl);
+ //Servant = doil::CORBA::CORBAManager::instance().toServant(SSImpl);
+ //CSServant = dynamic_cast<SDOPackage::CORBA::SDOServiceServant*>(Servant);
+
+ CImpl = new UnitTest::Servant::ConfigurationImpl();
+ doil::CORBA::CORBAManager::instance().registerFactory(CImpl->id(),
+ doil::New<SDOPackage::CORBA::ConfigurationServant>,
+ doil::Delete<SDOPackage::CORBA::ConfigurationServant>);
+ doil::CORBA::CORBAManager::instance().activateObject(CImpl);
+ //Servant = doil::CORBA::CORBAManager::instance().toServant(CImpl);
+ //CCServant = dynamic_cast<SDOPackage::CORBA::ConfigurationServant*>(Servant);
+
+ MImpl = new UnitTest::Servant::MonitoringImpl();
+ doil::CORBA::CORBAManager::instance().registerFactory(MImpl->id(),
+ doil::New<SDOPackage::CORBA::MonitoringServant>,
+ doil::Delete<SDOPackage::CORBA::MonitoringServant>);
+ doil::CORBA::CORBAManager::instance().activateObject(MImpl);
}
/*!
More information about the openrtm-commit
mailing list