OpenRTM-aist 2.1.0
読み取り中…
検索中…
一致する文字列を見つけられません
CORBA_RTCUtil::CorbaURI クラス

CorbaURI クラス 指定のCORBAオブジェクト参照用URLから参照形式、ホスト名、ポート番号、 パス、オブジェクトキーを取得する機能を提供するクラス [詳解]

#include <CORBA_RTCUtil.h>

公開メンバ関数

 CorbaURI (std::string uri, const std::string &objkey="")
 コンストラクタ
 ~CorbaURI ()
 デストラクタ
std::string toString () const
 CORBAオブジェクト参照用URLを取得する
std::string getProtocol () const
 参照形式を取得する 例:corbaloc、corbaname、http、https、ws、wss
std::string getHost () const
 ホスト名を取得する
unsigned short getPort () const
 ポート番号を取得する
bool isAddressOnly () const
 初期化時にCORBAオブジェクト参照用URLを指定した場合はfalse、 ホスト名、ポート番号のみを指定した場合はtrueを返す。

詳解

CorbaURI クラス 指定のCORBAオブジェクト参照用URLから参照形式、ホスト名、ポート番号、 パス、オブジェクトキーを取得する機能を提供するクラス

構築子と解体子

◆ CorbaURI()

CORBA_RTCUtil::CorbaURI::CorbaURI ( std::string uri,
const std::string & objkey = "" )

コンストラクタ

コンストラクタ

uriには以下の形式のURLを指定できる

  • corbaloc形式(例:corbaloc:iiop:192.168.11.1:2809/Nameservice)
  • corbaname形式(例:corbaname::192.168.11.1:2809#ConsoleOut0.rtc)
  • HTTP(例:http://192.168.11.1:2809/call#Nameservice)
  • HTTPS(例:https://192.168.11.1:2809/call#Nameservice)
  • WS(例:ws://192.168.11.1:2809/ws#Nameservice)
  • WSS(例:wss://192.168.11.1:2809/ws#Nameservice)

また、giop:ではじまるエンドポイントを指定することもできる この場合は上記のcorbaloc形式、corbaname形式、HTTP、HTTPS、WS、WSSのURLに変換する

  • giop::192.168.11.1:2809 -> corbaloc:iiop:192.168.11.1:2809
  • giop:tcp:192.168.11.1:2809 -> corbaloc:iiop:192.168.11.1:2809
  • giop:ssl:192.168.11.1:2809 -> corbaloc:ssliop:192.168.11.1:2809
  • giop:http:http://192.168.11.1:2809/call -> http://192.168.11.1:2809/call

アドレス、ポート番号を指定した場合はcorbaloc形式URLに変換する。

  • 192.168.11.1:2809 -> corbaloc:iiop:192.168.11.1:2809

objkeyを指定した場合はURIの末尾に追加する。

引数
uriCORBAオブジェクト参照用URL
objkeyオブジェクト名

◆ ~CorbaURI()

CORBA_RTCUtil::CorbaURI::~CorbaURI ( )

デストラクタ

デストラクタ

関数詳解

◆ getHost()

std::string CORBA_RTCUtil::CorbaURI::getHost ( ) const

ホスト名を取得する

戻り値
ホスト名

◆ getPort()

unsigned short CORBA_RTCUtil::CorbaURI::getPort ( ) const

ポート番号を取得する

戻り値
ポート番号

◆ getProtocol()

std::string CORBA_RTCUtil::CorbaURI::getProtocol ( ) const

参照形式を取得する 例:corbaloc、corbaname、http、https、ws、wss

戻り値
参照形式

◆ isAddressOnly()

bool CORBA_RTCUtil::CorbaURI::isAddressOnly ( ) const

初期化時にCORBAオブジェクト参照用URLを指定した場合はfalse、 ホスト名、ポート番号のみを指定した場合はtrueを返す。

戻り値
参照先の指定方法

◆ toString()

std::string CORBA_RTCUtil::CorbaURI::toString ( ) const

CORBAオブジェクト参照用URLを取得する

戻り値
CORBAオブジェクト参照用URL

このクラス詳解は次のファイルから抽出されました: