[openrtm-users 01605] Re: how can I get the full name of component

Ando Noriaki n-ando @ aist.go.jp
2011年 2月 24日 (木) 21:57:49 JST


Dear Zoltán-san

Thank you for contacting me.
It is not a problem to send this kind of questions to the mailing-list at all.
Please do not hesitate to send question to the mailing-list.

> hi,
>
> I'm Zoltán Krizsán (member of Korondi's team). I have implemented the
> SZTAKI system editor and Iceport extension.

Thank you for extending OpenRTM to use Ice. I'm very interested in
your extension.
Can we have a meeting about it when I visit Hungary on next month?
Anyway I'm looking forward to seeing you in Budapest.

> I use your jar file from web application and at the moment I develop a
> set of command line tool which support the base system and our
> extension too.
>
> When I would like to write out the connected ports of specified port,
> I don't know the correct way.

rtshell http://www.openrtm.org/openrtm/en/content/tools
will help you to know how to handle RTCs functionalities.

> The port class has a member named owner  (it stores only the short
> name: component.rtc), but how can I get the full name of
> component?

What is the full name of the Component?

> If the "nc1/nc2/component.rtc" is the full name of corba object, then
> I get only the "component.rtc" string.
> (I did not send this question to the user's mailing list, because it
> is not user level problem)

If you mean the name on the CORBA name server, it is not an
official CORBA object's name of the component. The name on
the CORBA name server can be specified by rtc.conf's configuration
"naming.formats" parameter.
See http://www.openrtm.org/openrtm/en/content/configuration

And this name can have multiple formats. It means you can
register your RTC's names on the CORBA name service like
 "/a/b/c/mycomp0.rtc"
and
 "/room0/robot4/cameras/mycomp0.rtc"
simultaneously.

If you mean the name of actual CORBA object, which can be
used in the corbaloc URI scheme, usual RTCs has no CORBA
object name. In other words RTC has no human readable CORBA
object key.

If you just want to get your RTC's name on CORBA name servers,
you can get it from RTObject_impl::getNamingNames() function.
See details in the following class reference.

http://www.openrtm.org/openrtm/en/content/openrtm-aist-class-references
http://www.openrtm.org/OpenRTM-aist/documents/current/cxx/classreference_en/classRTC_1_1RTObject__impl.html#ac386930b2987bbca3e9576bdb78108b2

getNamingNames() returns multiple names to be registered on CORBA name servers.
The following code is an example to print them.

  coil::vstring n = getNamingNames();
  for (size_t i(0); i < n.size(); ++i)
    {
      std::cout << "name[" << i << "]: " << n[i] << std::endl;
    }

But getNamingNames() might not return right values before calling
onInitialized().

Best regards,
Noriaki Ando



> Thanks,
>
> krz
>
> --
> "Life would be much easier if I had the source code."
>
> Zoltán Krizsán
> Assist Professor
> University of Miskolc
> Department of Information Technology
>



-- 
Noriaki Ando, Ph.D.
    Senior Research Scientist, RT-Synthesis R.G., ISRI, AIST
    AIST Tsukuba Central 2, Tsukuba, Ibaraki 305-8568 JAPAN
    e-mail: n-ando @ aist.go.jp, web: http://staff.aist.go.jp/n-ando
    OpenRTM-aist: http://www.openrtm.org




openrtm-users メーリングリストの案内