Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPTransportの追加 #999

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

Nobu19800
Copy link

Identify the Bug

omniORB-4.3.0からHTTP通信がサポートされるため、これに対応したい。

Description of the Change

HTTP通信対応のための拡張プラグインHTTPTransportを追加した。
cmake実行時に-DHTTP_ENABLE=ONオプションを追加することで利用できる。
omniORBではSSLTpが有効になっていないとHTTPTpはビルドできないため、OpenRTM-aistでも同様にSSLTransportのビルドを有効にする必要がある。

cmake-DSSL_ENABLE=ON -DHTTP_ENABLE=ON

rtc.confでモジュールのパス、モジュール名、エンドポイントを設定することで使用できる。

manager.modules.load_path: C:\\Program Files\\OpenRTM-aist\\2.0.0\\ext\\http
manager.preload.modules: HTTPTransport.dll
corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:http:///call

HTTP、HTTPS、WS、WSSのプロトコルが使用可能。それぞれのエンドポイントの設定例は以下のようになっている。

#HTTP
corba.args: -ORBendPoint giop:http:http://127.0.0.1:2810/call
#HTTPS
corba.args: -ORBendPoint giop:http:https://127.0.0.1:2810/call
#WS
corba.args: -ORBendPoint giop:http:ws://127.0.0.1:2810/ws
#WSS
corba.args: -ORBendPoint giop:http:wss://127.0.0.1:2810/ws

ただし、HTTPS、WSSの場合は証明書、秘密鍵、パスワードの設定が必要。

corba.http.certificate_authority_file:C:\\Program Files\\OpenRTM-aist\\2.0.0\\ext\\ssl\\root.crt
corba.http.key_file:C:\\Program Files\\OpenRTM-aist\\2.0.0\\ext\\ssl\\server.pem
corba.http.key_file_password:password

またHTTP、HTTPS、WS、WSS通信に対応したconfファイルを自動生成するため、それを利用することで動作確認できる。

cd %OpenRTM_INSTALL_DIR%/2.0.0
Components\C++\Examples\vc142\ConsoleOutComp.exe -f %OpenRTM_INSTALL_DIR%\2.0.0\ext\http\rtc.http.conf
Components\C++\Examples\vc142\ConsoleOutComp.exe -f %OpenRTM_INSTALL_DIR%\2.0.0\ext\http\rtc.https.conf
Components\C++\Examples\vc142\ConsoleOutComp.exe -f %OpenRTM_INSTALL_DIR%\2.0.0\ext\http\rtc.ws.conf
Components\C++\Examples\vc142\ConsoleOutComp.exe -f %OpenRTM_INSTALL_DIR%\2.0.0\ext\http\rtc.wss.conf

Verification

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

@Nobu19800 Nobu19800 added the enhancement New feature or request label Jan 11, 2022
@Nobu19800 Nobu19800 requested a review from n-ando January 11, 2022 09:09
@Nobu19800 Nobu19800 self-assigned this Jan 11, 2022
n-ando
n-ando previously approved these changes Mar 28, 2022
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.

2 participants