Skip to content

Conversation

@Nobu19800
Copy link

Identify the Bug

rtcname形式(指定アドレスのネームサーバーからRTCを取得)、rtcloc形式(指定アドレスのマスターマネージャからRTCを取得)の機能を使う場合、IIOPの通信プロトコルのみ使用できるようになっており、SSLIOPやHTIOP等は使用できない。

Description of the Change

以下のようにrtcnamertclocの後に通信プロトコル名を指定することによりSSLIOP、HTIOP通信などの通信を使用可能にした。

rtcname.ssliop://localhost:2809/test.host_cxt/ConsoleOut0
rtcname.https://localhost:2809/call#test.host_cxt/ConsoleOut0
rtcloc.ssliop://localhost:2810/example/ConsoleOut0
rtcloc.http://localhost:2810/call#example/ConsoleOut0

この機能の実装のため、rtcname形式、rtcloc形式の文字列から通信プロトコル名、アドレス、RTC名を取得するCORBA_RTCUtil::RTCURIObjectを実装した。

Verification

  • Did you succeed the build?
  • No warnings for the build?
  • Have you passed the unit tests?

n-ando
n-ando previously approved these changes Jan 24, 2022
@n-kawauchi n-kawauchi marked this pull request as ready for review August 30, 2024 09:19
Copy link

@n-kawauchi n-kawauchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最新masterへマージしたところコンフリクトしました。

>git merge featue/sslhttpconf
Auto-merging CMakeLists.txt
Auto-merging etc/CMakeLists.txt
Auto-merging src/lib/rtm/CORBA_RTCUtil.cpp
Auto-merging src/lib/rtm/CORBA_RTCUtil.h
Auto-merging src/lib/rtm/Manager.cpp
CONFLICT (content): Merge conflict in src/lib/rtm/Manager.cpp
Auto-merging src/lib/rtm/Manager.h
Auto-merging src/lib/rtm/ManagerServant.cpp
Auto-merging src/lib/rtm/NamingManager.cpp
CONFLICT (content): Merge conflict in src/lib/rtm/NamingManager.cpp
Auto-merging src/lib/rtm/PortBase.cpp
Auto-merging utils/openrtmNames/NamingContext.cpp
Automatic merge failed; fix conflicts and then commit the result.

@Nobu19800
Copy link
Author

動作確認の手順は以下の通り。

#1003 と同じ手順でhttpのネームサーバー、ConsoleInコンポーネントを起動する。

> bin\vc14\openrtmNames.exe -f ext/rtc.names.http.conf
> Components\C++\Examples\vc14\ConsoleInComp.exe -f ext/http/rtc.http.conf

ConsoleOutコンポーネントでmanager.components.preconnectオプションを設定して、データポートを接続して、画面にConnector Listener: ON_CONNECT~のメッセージが表示されていれば動作に問題なし。

以下はネームサーバーからRTCにアクセスする(rtcname)のコマンド。

> Components\C++\Examples\vc14\ConsoleOutComp.exe -f ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/call#%COMPUTERNAME%.host_cxt/ConsoleIn0.out"
(中略)
------------------------------
Connector Listener: ON_CONNECT
Profile::name:      ConsoleOut0.in?port=rtcname.http://localhost:2809/call#DESKTOP-R549M7A.host_cxt/ConsoleIn0.out
Profile::id:        5ae1df37-8127-486d-8e49-46d34aa50595
Profile::properties:
- data_type: IDL:RTC/TimedLong:1.0
- allow_dup_connection:
- dataflow_type: push
- interface_type: corba_cdr
- serializer
  - cdr
    - endian: little,big
- inport:
- provider:

------------------------------

次にマスターマネージャからRTCにアクセスする(rtcloc)手順を試す。
まず、マスターマネージャを起動する。

> bin\vc14\rtcd2.exe -d -f ext/http/rtc.http.conf

次にConsoleInコンポーネントを起動するが、これはrtcnameの手順と同じ。

Components\C++\Examples\vc14\ConsoleInComp.exe -f ext/http/rtc.http.conf

ConsoleOutコンポーネントを起動してデータポートの接続を確認する。

Components\C++\Examples\vc14\ConsoleOutComp.exe -f ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.http://localhost:2810/call#example/ConsoleIn0.out" -o "naming.type:manager"

これを#1003 と同様に、https、ws、wss、sslについても動作を確認する。

rtcname.https://localhost:2809/call#%COMPUTERNAME%.host_cxt/ConsoleIn0.out
rtcname.ws//localhost:2809/ws#%COMPUTERNAME%.host_cxt/ConsoleIn0.out
rtcname.wss://localhost:2809/ws#%COMPUTERNAME%.host_cxt/ConsoleIn0.out
rtcname.ssliop://localhost:2809/%COMPUTERNAME%.host_cxt/ConsoleIn0.out
rtcloc.https://localhost:2810/call#example/ConsoleIn0.out
rtcloc.ws//localhost:2810/ws#example/ConsoleIn0.out
rtcloc.wss://localhost:2810/ws#example/ConsoleIn0.out
rtcloc.ssliop://localhost:2810/example/ConsoleIn0.out

@n-kawauchi
Copy link

最新masterへマージしてUbuntu24.04上で動作確認しましたが、ConsoleOut側がエラーになります。

  • ネームサーバを起動
$ /usr/bin/openrtmNames -f /usr/etc/rtc.names.http.conf
  • ConsoleInを起動
$ mkdir test
$ cd test/
$ cp -r /usr/share/openrtm-2.1/components/c++/examples/* .
$ ./ConsoleInComp -f /usr/etc/http/rtc.http.conf
  • ConsoleOutを起動するとomniORBのエラーが表示されます。
$ ./ConsoleOutComp -f /usr/etc/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/call#`hostname`.host_cxt/ConsoleIn0.out" 
omniORB: (0) 2025-12-25 09:40:28.412753: Error: the application attempted to invoke an operation on a nil reference.
succeed.
=================================================
 Component Profile
-------------------------------------------------
InstanceID:     ConsoleOut0
 :
  • ConsoleOutのログを見るとERRORとして下記が出力されています。
Dec 25 07:19:33.318 ERROR: manager: rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0 not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants