17 #ifndef ManagerServant_cpp 18 #define ManagerServant_cpp 20 #include <cppunit/ui/text/TestRunner.h> 21 #include <cppunit/TextOutputter.h> 22 #include <cppunit/extensions/TestFactoryRegistry.h> 23 #include <cppunit/extensions/HelperMacros.h> 24 #include <cppunit/TestAssert.h> 27 #include <idl/SDOPackageSkel.h> 28 #include <idl/RTCSkel.h> 29 #include <rtm/idl/ManagerSkel.h> 47 void log(
const std::string& msg)
55 for (
int i = 0; i < (int)
m_log.size(); ++i)
57 if (
m_log[i] == msg) ++count;
67 :
public CppUnit::TestFixture
71 CPPUNIT_TEST(test_add_master_manager);
72 CPPUNIT_TEST(test_add_slave_manager);
73 CPPUNIT_TEST(test_get_loadable_modules);
74 CPPUNIT_TEST(test_load_module);
75 CPPUNIT_TEST(test_unload_modules);
76 CPPUNIT_TEST(test_get_loaded_modules);
77 CPPUNIT_TEST(test_get_factory_profiles);
78 CPPUNIT_TEST(test_create_component);
79 CPPUNIT_TEST(test_get_components);
80 CPPUNIT_TEST(test_get_component_profiles);
81 CPPUNIT_TEST(test_get_profile);
82 CPPUNIT_TEST(test_get_configuration);
83 CPPUNIT_TEST(test_set_configuration);
84 CPPUNIT_TEST(test_fork);
85 CPPUNIT_TEST(test_get_service);
86 CPPUNIT_TEST(test_getObjRef);
87 CPPUNIT_TEST(test_delete_component);
91 CPPUNIT_TEST_SUITE_END();
101 bool isFound(const ::RTM::ModuleProfileList* list,
const std::string& mod)
104 for (CORBA::ULong ic = 0; ic < list->length(); ++ic)
106 if( (*list)[ic].properties[0].value >>= pch )
108 if(mod == ::std::string(pch))
127 m_pORB = CORBA::ORB_init(argc, argv);
128 m_pPOA = PortableServer::POA::_narrow(
129 m_pORB->resolve_initial_references(
"RootPOA"));
130 m_pPOA->the_POAManager()->activate();
164 RTM::ManagerList* list;
168 CORBA::Boolean cbret;
171 CPPUNIT_ASSERT(!cbret);
175 CPPUNIT_ASSERT_EQUAL(0, (
int)list->length());
179 CPPUNIT_ASSERT(bret);
182 CPPUNIT_ASSERT(!bret);
184 std::string host_port(
"localhost:2810");
185 RTM::Manager_var owner;
193 CPPUNIT_ASSERT_EQUAL(1, (
int)list->length());
199 CPPUNIT_ASSERT_EQUAL(0, (
int)list->length());
201 CORBA::Object_var obj;
202 obj = m_pORB->resolve_initial_references(
"omniINSPOA");
203 PortableServer::POA_ptr poa = PortableServer::POA::_narrow(obj);
204 poa->the_POAManager()->deactivate(
false,
true);
206 catch(CORBA::SystemException& e)
208 std::cout <<
"test_add_master_manager() SystemException: " << e._name() << std::endl;
212 std::cout <<
"test_add_master_manager() other Exception" << std::endl;
227 RTM::ManagerList* list;
234 CPPUNIT_ASSERT_EQUAL(0, (
int)list->length());
238 CPPUNIT_ASSERT(!bret);
240 std::string host_port(
"localhost:2810");
241 RTM::Manager_var owner;
250 CPPUNIT_ASSERT_EQUAL(1, (
int)list->length());
256 CPPUNIT_ASSERT_EQUAL(0, (
int)list->length());
258 CORBA::Object_var obj;
259 obj = m_pORB->resolve_initial_references(
"omniINSPOA");
260 PortableServer::POA_ptr poa = PortableServer::POA::_narrow(obj);
261 poa->the_POAManager()->deactivate(
false,
true);
263 catch(CORBA::SystemException& e)
265 std::cout <<
"test_add_slave_manager() SystemException: " << e._name() << std::endl;
269 std::cout <<
"test_add_slave_manager() other Exception" << std::endl;
288 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
291 ".//.libs/DummyModule1.so"));
295 CPPUNIT_FAIL(
"Exception thrown.");
301 ret = pman->
load_module(
"bar.so",
"DummyModule1Init");
302 CPPUNIT_FAIL(
"Exception not thrown.");
312 CPPUNIT_FAIL(
"Exception not thrown.");
317 ".//.libs/DummyModule1.so"));
320 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
323 ".//.libs/DummyModule1.so"));
326 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
329 ".//.libs/DummyModule2.so"));
345 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
347 ".//.libs/DummyModule1.so"));
352 CPPUNIT_FAIL(
"Exception thrown.");
356 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
359 ".//.libs/DummyModule2.so"));
363 CPPUNIT_FAIL(
"Exception thrown.");
373 CPPUNIT_FAIL(
"unload error" );
379 CPPUNIT_FAIL(
"Exception not thrown.");
399 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
402 ".//.libs/DummyModule1.so"));
406 CPPUNIT_FAIL(
"Exception thrown.");
410 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
413 ".//.libs/DummyModule2.so"));
417 CPPUNIT_FAIL(
"Exception thrown.");
421 ::RTM::ModuleProfileList* list;
423 ::RTM::ModuleProfileList modlist(*list);
427 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)2, modlist.length());
428 CPPUNIT_ASSERT_EQUAL(::std::string(
"file_path"),
429 ::std::string(modlist[0].properties[0].name));
431 if( modlist[0].properties[0].value >>= ch )
433 CPPUNIT_ASSERT_EQUAL(::std::string(
".//.libs/DummyModule1.so"),
438 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
441 CPPUNIT_ASSERT_EQUAL(::std::string(
"file_path"),
442 ::std::string(modlist[1].properties[0].name));
444 if( modlist[1].properties[0].value >>= ch )
446 CPPUNIT_ASSERT_EQUAL(::std::string(
".//.libs/DummyModule2.so"),
451 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
463 typedef struct data_struct {
467 DATA_STRUCT composite_spec[] =
469 {
"implementation_id",
"PeriodicECSharedComposite"},
470 {
"type_name",
"PeriodicECSharedComposite"},
471 {
"description",
"PeriodicECSharedComposite"},
473 {
"vendor",
"jp.go.aist"},
474 {
"category",
"composite.PeriodicECShared"},
475 {
"activity_type",
"DataFlowComponent"},
476 {
"max_instance",
"0"},
478 {
"lang_type",
"compile"},
479 {
"exported_ports",
""},
480 {
"conf.default.members",
""},
481 {
"conf.default.exported_ports",
""},
486 {
"implementation_id",
"DummyModule1"},
487 {
"type_name",
"DummyModule1"},
488 {
"description",
"Console input component"},
490 {
"vendor",
"Noriaki Ando, AIST"},
491 {
"category",
"example"},
492 {
"activity_type",
"DataFlowComponent"},
493 {
"max_instance",
"10"},
495 {
"lang_type",
"compile"},
500 {
"implementation_id",
"DummyModule2"},
501 {
"type_name",
"DummyModule2"},
502 {
"description",
"Console output component"},
504 {
"vendor",
"Noriaki Ando, AIST"},
505 {
"category",
"example"},
506 {
"activity_type",
"DataFlowComponent"},
507 {
"max_instance",
"10"},
509 {
"lang_type",
"compile"},
516 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
519 ".//.libs/DummyModule1.so"));
520 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
523 ".//.libs/DummyModule2.so"));
526 ::RTM::ModuleProfileList *list;
528 ::RTM::ModuleProfileList profiles(*list);
533 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)3, profiles.length());
534 len = profiles[0].properties.length();
535 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)13, len);
536 for (CORBA::ULong ic = 0; ic < len; ++ic)
538 CPPUNIT_ASSERT_EQUAL(composite_spec[ic].name,
539 ::std::string(profiles[0].properties[ic].name));
542 if( profiles[0].properties[ic].value >>= ch )
544 CPPUNIT_ASSERT_EQUAL(composite_spec[ic].value,
549 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
552 len =profiles[1].properties.length();
553 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)10, len);
554 for (CORBA::ULong ic = 0; ic < len; ++ic)
556 CPPUNIT_ASSERT_EQUAL(consolein_spec[ic].name,
557 ::std::string(profiles[1].properties[ic].name));
560 if( profiles[1].properties[ic].value >>= ch )
562 CPPUNIT_ASSERT_EQUAL(consolein_spec[ic].value,
567 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
570 len =profiles[2].properties.length();
571 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)10, len);
572 for (CORBA::ULong ic = 0; ic < len; ++ic)
574 CPPUNIT_ASSERT_EQUAL(consoleout_spec[ic].name,
575 ::std::string(profiles[2].properties[ic].name));
578 if( profiles[2].properties[ic].value >>= ch )
580 CPPUNIT_ASSERT_EQUAL(consoleout_spec[ic].value,
585 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
600 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
603 ".//.libs/DummyModule1.so"));
604 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
607 ".//.libs/DummyModule2.so"));
610 ::RTC::RTObject_ptr inobj;
612 CPPUNIT_ASSERT(::CORBA::is_nil(inobj));
614 CPPUNIT_ASSERT(!::CORBA::is_nil(inobj));
616 ::RTC::RTObject_ptr outobj;
618 CPPUNIT_ASSERT(!::CORBA::is_nil(outobj));
632 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
635 ".//.libs/DummyModule1.so"));
636 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
639 ".//.libs/DummyModule2.so"));
641 ::RTC::RTObject_ptr inobj;
643 CPPUNIT_ASSERT(!::CORBA::is_nil(inobj));
645 ::RTC::RTObject_ptr outobj;
647 CPPUNIT_ASSERT(!::CORBA::is_nil(outobj));
649 ::RTC::ComponentProfileList *list;
651 CPPUNIT_ASSERT(list!=NULL);
652 ::RTC::ComponentProfileList profiles(*list);
656 m_pPOA->the_POAManager()->deactivate(
false,
true);
677 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
680 ".//.libs/DummyModule1.so"));
681 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
684 ".//.libs/DummyModule2.so"));
686 ::RTC::RTObject_ptr inobj;
688 CPPUNIT_ASSERT(!::CORBA::is_nil(inobj));
690 ::RTC::RTObject_ptr outobj;
692 CPPUNIT_ASSERT(!::CORBA::is_nil(outobj));
697 CPPUNIT_ASSERT(list != NULL);
701 ::CORBA::ULong len(rtclist.length());
704 for (::CORBA::ULong ic = 0; ic < len; ++ic)
706 if( rtclist[ic] == inobj )
711 CPPUNIT_ASSERT_EQUAL( bflag,
true );
714 for (::CORBA::ULong ic = 0; ic < len; ++ic)
716 if( rtclist[ic] == outobj )
721 CPPUNIT_ASSERT_EQUAL( bflag,
true );
733 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
736 ".//.libs/DummyModule1.so"));
737 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
740 ".//.libs/DummyModule2.so"));
743 ::RTC::RTObject_ptr inobj;
745 CPPUNIT_ASSERT(!::CORBA::is_nil(inobj));
747 ::RTC::RTObject_ptr outobj;
749 CPPUNIT_ASSERT(!::CORBA::is_nil(outobj));
752 ::RTC::ComponentProfileList *list;
754 CPPUNIT_ASSERT(list!=NULL);
755 ::RTC::ComponentProfileList profiles(*list);
761 CPPUNIT_ASSERT(plist != NULL);
765 ::CORBA::ULong len(rtclist.length());
768 for (::CORBA::ULong ic = 0; ic < len; ++ic)
770 if( rtclist[ic] == inobj )
773 ::std::string str(profiles[ic].instance_name);
774 CPPUNIT_ASSERT(str.find(
"DummyModule1") != ::std::string::npos);
775 CPPUNIT_ASSERT_EQUAL(::std::string(
"DummyModule1"),
776 ::std::string(profiles[ic].type_name));
777 CPPUNIT_ASSERT_EQUAL(::std::string(
"Console input component"),
779 CPPUNIT_ASSERT_EQUAL(::std::string(
"1.0"),
780 ::std::string(profiles[ic].version));
781 CPPUNIT_ASSERT_EQUAL(::std::string(
"Noriaki Ando, AIST"),
782 ::std::string(profiles[ic].vendor));
783 CPPUNIT_ASSERT_EQUAL(::std::string(
"example"),
784 ::std::string(profiles[ic].category));
788 CPPUNIT_ASSERT_EQUAL( bflag,
true );
791 for (::CORBA::ULong ic = 0; ic < len; ++ic)
793 if( rtclist[ic] == outobj )
796 ::std::string str(profiles[ic].instance_name);
797 CPPUNIT_ASSERT(str.find(
"DummyModule2") != ::std::string::npos);
798 CPPUNIT_ASSERT_EQUAL(::std::string(
"DummyModule2"),
799 ::std::string(profiles[ic].type_name));
800 CPPUNIT_ASSERT_EQUAL(::std::string(
"Console output component"),
802 CPPUNIT_ASSERT_EQUAL(::std::string(
"1.0"),
803 ::std::string(profiles[ic].version));
804 CPPUNIT_ASSERT_EQUAL(::std::string(
"Noriaki Ando, AIST"),
805 ::std::string(profiles[ic].vendor));
806 CPPUNIT_ASSERT_EQUAL(::std::string(
"example"),
807 ::std::string(profiles[ic].category));
811 CPPUNIT_ASSERT_EQUAL( bflag,
true );
822 typedef struct data_struct {
826 DATA_STRUCT manager_profile[] =
828 {
"instance_name",
"manager"},
830 {
"naming_formats",
"%h.host_cxt/%n.mgr"},
832 {
"refstring_path",
"/var/log/rtcmanager.ref"},
833 {
"modules.load_path",
""},
834 {
"modules.abs_path_allowed",
"YES"},
835 {
"modules.C++.manager_cmd",
""},
836 {
"modules.C++.profile_cmd",
""},
837 {
"modules.C++.suffixes",
""},
838 {
"modules.C++.load_paths",
""},
839 {
"modules.Python.manager_cmd",
""},
840 {
"modules.Python.profile_cmd",
""},
841 {
"modules.Python.suffixes",
""},
842 {
"modules.Python.load_paths",
""},
843 {
"modules.Java.manager_cmd",
""},
844 {
"modules.Java.profile_cmd",
""},
845 {
"modules.Java.suffixes",
""},
846 {
"modules.Java.load_paths",
""},
847 {
"modules.config_path",
""},
848 {
"modules.download_allowed",
""},
849 {
"modules.init_func_suffix",
""},
850 {
"modules.init_func_prefix",
""},
853 {
"corba_servant",
"YES"},
854 {
"shutdown_on_nortcs",
"YES"},
855 {
"shutdown_auto",
"YES"},
857 {
"supported_languages",
""},
858 {
"os.name",
"Linux"},
869 ::RTM::ManagerProfile *list;
871 ::RTM::ManagerProfile profile(*list);
874 len = profile.properties.length();
875 CPPUNIT_ASSERT_EQUAL(34,len);
876 for(
int ic = 0; ic < len; ++ic)
878 CPPUNIT_ASSERT_EQUAL(manager_profile[ic].name,
879 ::std::string(profile.properties[ic].name));
881 if( profile.properties[ic].value >>= ch )
883 if(!manager_profile[ic].value.empty())
885 CPPUNIT_ASSERT_EQUAL(manager_profile[ic].value,
900 typedef struct data_struct {
906 {
"config.version",
"1.0.0"},
907 {
"openrtm.version",
"OpenRTM-aist-1.0.0"},
908 {
"manager.instance_name",
"manager"},
909 {
"manager.name",
"manager"},
910 {
"manager.naming_formats",
"%h.host_cxt/%n.mgr"},
912 {
"manager.refstring_path",
"/var/log/rtcmanager.ref"},
913 {
"manager.modules.load_path",
""},
914 {
"manager.modules.abs_path_allowed",
"YES"},
915 {
"manager.modules.C++.manager_cmd",
""},
916 {
"manager.modules.C++.profile_cmd",
""},
917 {
"manager.modules.C++.suffixes",
""},
918 {
"manager.modules.C++.load_paths",
""},
919 {
"manager.modules.Python.manager_cmd",
""},
920 {
"manager.modules.Python.profile_cmd",
""},
921 {
"manager.modules.Python.suffixes",
""},
922 {
"manager.modules.Python.load_paths",
""},
923 {
"manager.modules.Java.manager_cmd",
""},
924 {
"manager.modules.Java.profile_cmd",
""},
925 {
"manager.modules.Java.suffixes",
""},
926 {
"manager.modules.Java.load_paths",
""},
927 {
"manager.modules.config_path",
""},
928 {
"manager.modules.download_allowed",
""},
929 {
"manager.modules.init_func_suffix",
""},
930 {
"manager.modules.init_func_prefix",
""},
931 {
"manager.is_master",
""},
932 {
"manager.corba_servant",
"YES"},
933 {
"manager.shutdown_on_nortcs",
"YES"},
934 {
"manager.shutdown_auto",
"YES"},
935 {
"manager.command",
"rtcd"},
936 {
"manager.supported_languages",
""},
937 {
"manager.os.name",
"Linux"},
938 {
"manager.os.release",
""},
939 {
"manager.os.version",
""},
940 {
"manager.os.arch",
""},
941 {
"manager.os.hostname",
""},
947 {
"logger.enable",
""},
948 {
"logger.file_name",
""},
949 {
"logger.date_format",
"%b %d %H:%M:%S"},
950 {
"logger.log_level",
""},
951 {
"logger.stream_lock",
"NO"},
952 {
"logger.master_logger",
""},
953 {
"module.conf_path",
""},
954 {
"module.load_path",
""},
955 {
"naming.enable",
"YES"},
956 {
"naming.type",
"corba"},
957 {
"naming.formats",
"%h.host_cxt/%n.rtc"},
958 {
"naming.update.enable",
"YES"},
959 {
"naming.update.interval",
"10.0"},
960 {
"timer.enable",
"YES"},
961 {
"timer.tick",
"0.1"},
963 {
"corba.endpoint",
""},
964 {
"corba.id",
"omniORB"},
965 {
"corba.nameservers",
""},
966 {
"corba.master_manager",
"localhost:2810"},
967 {
"corba.nameservice.replace_endpoint",
"NO"},
969 {
"exec_cxt.periodic.type",
"PeriodicExecutionContext"},
970 {
"exec_cxt.periodic.rate",
"1000"},
971 {
"exec_cxt.evdriven.type",
"EventDrivenExecutionContext"},
972 {
"example.DummyModule10.config_file",
""},
973 {
"example.DummyModule1.config_file",
""},
974 {
"example.DummyModule20.config_file",
""},
975 {
"example.DummyModule2.config_file",
""},
976 {
"example.DummyModule11.config_file",
""},
977 {
"example.DummyModule21.config_file",
""},
978 {
"example.DummyModule12.config_file",
""},
979 {
"example.DummyModule22.config_file",
""},
990 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)73,len);
991 for(::CORBA::ULong ic = 0; ic < len; ++ic)
993 CPPUNIT_ASSERT_EQUAL(config[ic].name,
994 ::std::string(conf[ic].name));
996 if( conf[ic].value >>= ch )
998 if(!config[ic].value.empty())
1000 CPPUNIT_ASSERT_EQUAL(config[ic].value,
1015 typedef struct data_struct {
1017 ::std::string value;
1021 {
"config.version",
"1.0.0"},
1022 {
"openrtm.version",
"OpenRTM-aist-1.0.0"},
1023 {
"manager.naming_formats",
"%n.rtc"},
1024 {
"manager.modules.load_path",
"./,./.libs"},
1025 {
"manager.modules.abs_path_allowed",
"NO"},
1026 {
"manager.os.release",
"2.6.22-14-generic"},
1027 {
"manager.os.version",
"2008"},
1028 {
"manager.os.arch",
"64"},
1029 {
"manager.os.hostname",
"ubuntur810"},
1034 len =
sizeof config/
sizeof config[0];
1035 for(
int ic = 0; ic < len; ++ic)
1038 config[ic].value.c_str());
1046 ::CORBA::ULong leng;
1047 leng = conf.length();
1048 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)73,leng);
1049 for(::CORBA::ULong ic = 0; ic < leng; ++ic)
1051 if(config[0].name == ::std::string(conf[ic].name))
1053 CPPUNIT_ASSERT_EQUAL(config[ic].name,
1054 ::std::string(conf[ic].name));
1056 if( conf[ic].value >>= ch )
1058 if(!config[ic].value.empty())
1060 CPPUNIT_ASSERT_EQUAL(config[ic].value,
1090 CPPUNIT_FAIL(
"Exception thrown.");
1111 ret = pman->
load_module(
".libs/DummyModule1.so",
"DummyModule1Init");
1118 CPPUNIT_FAIL(
"Exception thrown.");
1124 ret = pman->
load_module(
".libs/DummyModule2.so",
"DummyModule2Init");
1131 CPPUNIT_FAIL(
"Exception thrown.");
1135 ::RTM::ModuleProfileList* list;
1137 ::RTM::ModuleProfileList modlist(*list);
1141 CPPUNIT_ASSERT_EQUAL((::CORBA::ULong)2, modlist.length());
1144 CPPUNIT_ASSERT(long_ret!=-1);
1147 if( modlist[0].properties[long_ret].value >>= ch )
1149 CPPUNIT_ASSERT_EQUAL(::std::string(
"DummyModule2.so"),
1154 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
1158 CPPUNIT_ASSERT(long_ret!=-1);
1160 if( modlist[1].properties[long_ret].value >>= ch )
1162 CPPUNIT_ASSERT_EQUAL(::std::string(
"DummyModule1.so"),
1167 CPPUNIT_FAIL(
"ModuleProfileList is illegal." );
1207 std::string name(
"service0");
1209 CPPUNIT_ASSERT(CORBA::is_nil(pman->
get_service(name.c_str())));
1236 int main(
int argc,
char* argv[])
1238 CppUnit::TextUi::TestRunner runner;
1239 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
1240 CppUnit::Outputter* outputter =
1241 new CppUnit::TextOutputter(&runner.result(), std::cout);
1242 runner.setOutputter(outputter);
1247 #endif // ManagerServant_cpp void test_set_configuration()
tests for set_configuration()
int main(int argc, char **argv)
int countLog(const std::string &msg)
void test_delete_component()
tests for delete_components()
RTM::ManagerList * get_slave_managers()
Getting slave managers.
static const char * consoleout_spec[]
CPPUNIT_TEST_SUITE_REGISTRATION(ManagerServant::ManagerServantTests)
unsigned int sleep(unsigned int seconds)
Stop a processing at specified second time.
bool createINSManager()
Generate INSManager.
std::vector< std::pair< std::string, std::string > > NVList
bool isFound(const ::RTM::ModuleProfileList *list, const std::string &mod)
virtual void setUp()
Test initialization.
void test_get_profile()
tests for get_profile()
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
CORBA::Object_ptr get_service(const char *name)
Get the reference of RTC.
RTC::ReturnCode_t shutdown()
This method shutdowns RTC.
void test_get_factory_profiles()
tests for get_factory_profiles()
ManagerServantTests()
Constructor.
RTM::NVList * get_configuration()
Getting this manager's configuration.
std::vector< std::string > m_log
RTC::RTObject_ptr create_component(const char *module_name)
Creating an RT-Component.
void test_add_slave_manager()
tests for add_slave_manager(), get_slave_managers(), remove_slave_manager()
void test_get_service()
tests for get_service()
virtual void tearDown()
Test finalization.
RTM::ManagerList * get_master_managers()
Getting master managers.
void test_create_component()
void log(const std::string &msg)
RTM::Manager_ptr findManager(const char *host_port)
Find the reference of Manager.
const CORBA::Long find_index(const SDOPackage::NVList &nv, const char *name)
Return the index of element specified by name from NVList.
RTC::ReturnCode_t remove_slave_manager(RTM::Manager_ptr mgr)
Removing a slave manager.
RTC::ReturnCode_t set_configuration(const char *name, const char *value)
Setting manager's configuration.
RTC::ReturnCode_t delete_component(const char *instance_name)
Deleting an RT-Component.
RTC::ReturnCode_t load_module(const char *pathname, const char *initfunc)
Loading a module.
RTC::ReturnCode_t remove_master_manager(RTM::Manager_ptr mgr)
Removing a master manager.
void test_unload_modules()
tests for unload_modules()
PortableServer::POA_ptr m_pPOA
void test_get_configuration()
tests for get_configuration()
void test_add_master_manager()
tests for is_master(), createINSManager(), findManager(), add_master_manager(), get_master_managers()...
RTComponent manager servant implementation class.
static const char * consolein_spec[]
void test_fork()
tests for fork()
NameValue and NVList utility functions.
void test_shutdown()
tests for shutdown()
RTC::ReturnCode_t restart()
This method restarts RTC.
void test_get_loadable_modules()
tests for get_loadable_modules()
RTM::ModuleProfileList * get_loaded_modules()
Getting loaded module profiles.
RTC::ReturnCode_t unload_module(const char *pathname)
Unloading a module.
RTC::ReturnCode_t add_master_manager(RTM::Manager_ptr mgr)
Getting a master manager.
RTM::Manager_ptr getObjRef() const
Get the reference of Manager.
void test_get_component_profiles()
tests for get_component_profiles()
void test_get_loaded_modules()
tests for get_loaded_modules()
void test_restart()
tests for restart()
RTM::ManagerProfile * get_profile()
Getting this manager's profile.
::CORBA::Boolean is_master()
Whether this manager is master or not.
void test_getObjRef()
tests for getObjRef()
void test_get_components()
tests for get_components()
RTM::ModuleProfileList * get_factory_profiles()
Getting component factory profiles.
RTC::RTCList * get_components()
Getting RT-Component list running on this manager.
std::vector< IRTObject * > RTCList
RTC::ComponentProfileList * get_component_profiles()
Getting RT-Component's profile list running on this manager.
void test_load_module()
tests for load_module()
RTM::ModuleProfileList * get_loadable_modules()
Getting loadable module profiles.
RTC::ReturnCode_t add_slave_manager(RTM::Manager_ptr mgr)
Getting a slave manager.
RTC::ReturnCode_t fork()
The copy of the process is generated.
RTM::Manager_ptr m_objref
~ManagerServantTests()
Destructor.