9 #include <rtm/Manager.h>
21 comp = manager->createComponent(
"Path");
29 RTC::RTObject_var rtobj;
30 rtobj = RTC::RTObject::_narrow(manager->getPOA()->servant_to_reference(comp));
33 PortServiceList* portlist;
34 portlist = rtobj->get_ports();
37 std::cout <<
"Number of Ports: ";
38 std::cout << portlist->length() << std::endl << std::endl;
39 for (CORBA::ULong
i(0),
n(portlist->length());
i <
n; ++
i)
42 port = (*portlist)[
i];
43 std::cout <<
"Port" <<
i <<
" (name): ";
44 std::cout << port->get_port_profile()->name << std::endl;
46 RTC::PortInterfaceProfileList iflist;
47 iflist = port->get_port_profile()->interfaces;
48 std::cout <<
"---interfaces---" << std::endl;
49 for (CORBA::ULong
i(0),
n(iflist.length());
i <
n; ++
i)
51 std::cout <<
"I/F name: ";
52 std::cout << iflist[
i].instance_name << std::endl;
53 std::cout <<
"I/F type: ";
54 std::cout << iflist[
i].type_name << std::endl;
56 pol = iflist[
i].polarity == 0 ?
"PROVIDED" :
"REQUIRED";
57 std::cout <<
"Polarity: " << pol << std::endl;
59 std::cout <<
"---properties---" << std::endl;
60 NVUtil::dump(port->get_port_profile()->properties);
61 std::cout <<
"----------------" << std::endl << std::endl;
67 int main (
int argc,
char** argv)
69 RTC::Manager* manager;
70 manager = RTC::Manager::init(argc, argv);
73 manager->init(argc, argv);
80 manager->activateManager();
84 manager->runManager();