39 RTC::RTObject_var rtobj;
40 rtobj = RTC::RTObject::_narrow(manager->
getPOA()->servant_to_reference(comp));
47 std::cout <<
"Number of Ports: ";
48 std::cout << portlist->length() << std::endl << std::endl;
49 for (CORBA::ULong
i(0),
n(portlist->length());
i <
n; ++
i)
52 port = (*portlist)[
i];
53 std::cout <<
"Port" <<
i <<
" (name): ";
54 std::cout << port->get_port_profile()->name << std::endl;
56 RTC::PortInterfaceProfileList iflist;
57 iflist = port->get_port_profile()->interfaces;
58 std::cout <<
"---interfaces---" << std::endl;
59 for (CORBA::ULong
i(0),
n(iflist.length()); i <
n; ++
i)
61 std::cout <<
"I/F name: ";
62 std::cout << iflist[
i].instance_name << std::endl;
63 std::cout <<
"I/F type: ";
64 std::cout << iflist[
i].type_name << std::endl;
66 pol = iflist[
i].polarity == 0 ?
"PROVIDED" :
"REQUIRED";
67 std::cout <<
"Polarity: " << pol << std::endl;
69 std::cout <<
"---properties---" << std::endl;
71 std::cout <<
"----------------" << std::endl << std::endl;
77 int main (
int argc,
char** argv)
83 manager->
init(argc, argv);
int main(int argc, char **argv)
RTObject_impl * createComponent(const char *comp_args)
PortableServer::POA_ptr getPOA()
void runManager(bool no_block=false)
virtual PortServiceList * get_ports()
DLL_EXPORT void SamplePDInit(RTC::Manager *manager)
static Manager * init(int argc, char **argv)
void dump(const SDOPackage::NVList &nv)
std::vector< IPortService *> PortServiceList
void setModuleInitProc(ModuleInitProc proc)
void MyModuleInit(RTC::Manager *manager)