クラス RTCompConnect

RT component connection class [詳細]

#include <RTCompConnect.h>

RTCompConnectに対する継承グラフ

Inheritance graph
[凡例]
RTCompConnectのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

 RTCompConnect (std::string CorbaServeName, long CorbaPort=-1)
 コンストラクタ
 RTCompConnect (const RTCompConnect &src)
 コピーコンストラクタ
virtual ~RTCompConnect ()
 デストラクタ
void SetNameServer (std::string ServerName, long OmniPort=-1)
 regist both nameserver
void SetNameServer (const int num, std::string ServerName, long OmniPort=-1)
 regist nameserver
bool SetPort (const int num, std::string ComponentName, std::string PortName)
 接続するPortの設定
bool SetPort (const int num, std::string ComponentName, int PortNumber)
 接続するPortの設定
bool SetPort (const int num, RTC::PortList_var *plist, std::string PortName)
 接続するPortの設定
bool SetPort (const int num, RTC::PortList *plist, int PortNumber)
 接続するPortの設定
bool SetFoundPort (const int num, std::string ComponentName, std::string PortName)
 接続するPortを検索(接続されていないポートを検索し設定)
bool Connect (std::string ConnectionName, std::string subs_type="Flush", std::string period="")
 Portの接続
bool isConnect ()
 check the already connection
bool DisConnect (std::string ConnectionName)
 dosconnect
RTCompConnectoperator= (const RTCompConnect &right)
 operator=

Protected メソッド

RTC::CorbaNaming * GetNameServer (const int num)
 Name server slection function
void SetPortList (RTCompSet *port, std::string &ComponentName, RTC::CorbaNaming *NameServer)
 Get port list from nameserver
bool SetPortName (RTCompSet *port, std::string &PortName)
 Set port numbering from port name
bool SetPortNumber (RTCompSet *port, int &PortNumber)
 Set port numbering
bool FindPortName (RTCompSet *port, std::string PortName, bool noConnectionPort=true)
 Find and Set port numbering from port name
std::string NameAndPort2str (std::string name, long port)
 make string from port name and port number

説明

RT component connection class

【使い方】
STEP0 Portを問い合わせるネームサーバを設定する SetNameServer()
STEP1 Portの設定を行う SetPort()
STEP2 接続する Connect()
【使用上の注意】
一つの接続につき、このクラスは一つ必要です。複数接続する場合には複数用意すること。
複数管理したい場合には、stdvector<RTCompConnect>や std::list<RTCompConnect>などにより管理 することが可能です


コンストラクタとデストラクタ

RTCompConnect::RTCompConnect ( std::string  CorbaServeName,
long  CorbaPort = -1 
)

コンストラクタ

引数:
CorbaServeName  corba name server
CorbaPort  corba port setting

RTCompConnect::RTCompConnect ( const RTCompConnect src  ) 

コピーコンストラクタ

引数:
src  source

RTCompConnect::~RTCompConnect (  )  [virtual]

デストラクタ


関数

void RTCompConnect::SetNameServer ( std::string  ServerName,
long  OmniPort = -1 
)

regist both nameserver

引数:
ServerName Corba name server's name(Corba name server's ip address)
OmniPort Corba name server's port number (Example : 9876

void RTCompConnect::SetNameServer ( const int  num,
std::string  ServerName,
long  OmniPort = -1 
)

regist nameserver

引数:
num port number[0,1]
ServerName Corba name server's name(Corba name server's ip address)
OmniPort Corba name server's port number (Example : 9876

bool RTCompConnect::SetPort ( const int  num,
std::string  ComponentName,
std::string  PortName 
)

接続するPortの設定

引数:
num port number[0,1]
ComponentName Component name (Example : ConsoleIn0.rtc
PortName Component port name (Example : out

STEP1 get port list

STEP2 identyfy port by name

bool RTCompConnect::SetPort ( const int  num,
std::string  ComponentName,
int  PortNumber 
)

接続するPortの設定

引数:
num port number[0,1]
ComponentName Component name (Example : ConsoleIn0.rtc
PortNumber Component port name (Example : 0

STEP1 get port list

STEP2 identyfy port by number

bool RTCompConnect::SetPort ( const int  num,
RTC::PortList_var *  plist,
std::string  PortName 
)

接続するPortの設定

引数:
num port number[0,1]
plist Component port list (Example : this->get_port_list()
PortName Component port name (Example : out

STEP1 set port list

STEP2 identyfy port by name

bool RTCompConnect::SetPort ( const int  num,
RTC::PortList *  plist,
int  PortNumber 
)

接続するPortの設定

引数:
num port number[0,1]
plist Component port list (Example : this->get_port_list()
PortNumber Component port name (Example : 0

STEP1 set port list

STEP2 identyfy port by number

bool RTCompConnect::SetFoundPort ( const int  num,
std::string  ComponentName,
std::string  PortName 
)

接続するPortを検索(接続されていないポートを検索し設定)

引数:
num port number[0,1]
ComponentName Component name (Example : ConsoleIn0.rtc
PortName Component port name (Example : out , MyService ...

STEP1 get port list

STEP2 identyfy port by name and find not connection port

bool RTCompConnect::Connect ( std::string  ConnectionName,
std::string  subs_type = "Flush",
std::string  period = "" 
)

Portの接続

引数:
ConnectionName Connection name
subs_type Connection type (Example : Flush, New,,,)
period Communication period (Example : 1.0 )

接続情報の設定(どのポートとどのポートを接続するのか)

接続プロパティの設定(周期的、間隔など)

接続前の下処理(接続しているポートの切断)

接続

接続情報表示

bool RTCompConnect::isConnect (  ) 

check the already connection

bool RTCompConnect::DisConnect ( std::string  ConnectionName  ) 

dosconnect

引数:
ConnectionName  Connection name

RTCompConnect & RTCompConnect::operator= ( const RTCompConnect right  ) 

operator=

引数:
right  source

RTC::CorbaNaming * RTCompConnect::GetNameServer ( const int  num  )  [protected]

Name server slection function

引数:
num port number

void RTCompConnect::SetPortList ( RTCompSet port,
std::string &  ComponentName,
RTC::CorbaNaming *  NameServer 
) [protected]

Get port list from nameserver

引数:
port port parameters variable pointer
ComponentName RT component name
NameServer corba name server's pointer

bool RTCompConnect::SetPortName ( RTCompSet port,
std::string &  PortName 
) [protected]

Set port numbering from port name

引数:
port port parameters variable pointer
PortName port name

bool RTCompConnect::SetPortNumber ( RTCompSet port,
int &  PortNumber 
) [protected]

Set port numbering

引数:
port port parameters variable pointer
PortNumber port number

bool RTCompConnect::FindPortName ( RTCompSet port,
std::string  PortName,
bool  noConnectionPort = true 
) [protected]

Find and Set port numbering from port name

引数:
port port parameters variable pointer
PortName port name
noConnectionPort true : check if its port is no connection, false:don't care connection

他に接続が存在するかどうかを調べる if (noConnectionPort == false) then 接続が存在していても気にしない

std::string RTCompConnect::NameAndPort2str ( std::string  name,
long  port 
) [inline, protected]

make string from port name and port number

戻り値:
corba port
引数:
name corba name server ip address
port corba name server port


このクラスの説明は次のファイルから生成されました:
RTComponent Controlに対してThu Jul 31 22:42:00 2008に生成されました。  doxygen 1.5.1