31 RTC::RTObject_var rtobj;
32 rtobj = RTC::RTObject::_narrow(manager->
getPOA()->servant_to_reference(comp));
39 std::cout <<
"Number of Ports: ";
40 std::cout << portlist->length() << std::endl << std::endl;
41 for (CORBA::ULong
i(0),
n(portlist->length());
i <
n; ++
i)
44 port = (*portlist)[
i];
45 std::cout <<
"Port" <<
i <<
" (name): ";
46 std::cout << port->get_port_profile()->name << std::endl;
48 RTC::PortInterfaceProfileList iflist;
49 iflist = port->get_port_profile()->interfaces;
50 std::cout <<
"---interfaces---" << std::endl;
51 for (CORBA::ULong i(0), n(iflist.length()); i < n; ++i)
53 std::cout <<
"I/F name: ";
54 std::cout << iflist[i].instance_name << std::endl;
55 std::cout <<
"I/F type: ";
56 std::cout << iflist[i].type_name << std::endl;
58 pol = iflist[i].polarity == 0 ?
"PROVIDED" :
"REQUIRED";
59 std::cout <<
"Polarity: " << pol << std::endl;
61 std::cout <<
"---properties---" << std::endl;
63 std::cout <<
"----------------" << std::endl << std::endl;
69 int main (
int argc,
char** argv)
75 manager->
init(argc, argv);
79 manager->
load(
"libhrpEC.so",
"hrpECInit");
81 std::cerr << ex.
name << std::endl;
83 std::cerr << ex.
reason << std::endl;
84 std::cerr << dlerror() << std::endl;
86 std::cerr <<
"exception in loading libhrpEC.so" << std::endl;
RTObject_impl * createComponent(const char *comp_args)
PortableServer::POA_ptr getPOA()
void runManager(bool no_block=false)
void load(const char *fname, const char *initfunc)
virtual PortServiceList * get_ports()
int main(int argc, char **argv)
void RobotHardwareInit(RTC::Manager *manager)
static Manager * init(int argc, char **argv)
void MyModuleInit(RTC::Manager *manager)
void dump(const SDOPackage::NVList &nv)
std::vector< IPortService * > PortServiceList
void setModuleInitProc(ModuleInitProc proc)