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

1 つの投稿 / 0 new
root
オフライン
Last seen: 3日 8時間 前
登録日: 2009-06-23 14:31
[openrtm-users 01605] how can I get the full name of component

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
>

未定義

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

Webサイト統計
ユーザ数:2209
プロジェクト統計
RTコンポーネント307
RTミドルウエア35
ツール22
文書・仕様書2

Choreonoid

モーションエディタ/シミュレータ

OpenHRP3

動力学シミュレータ

OpenRTP

統合開発プラットフォーム

産総研RTC集

産総研が提供するRTC集

TORK

東京オープンソースロボティクス協会

DAQ-Middleware

ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク