#include <RTCompConnect.h>
RTCompConnectに対する継承グラフ
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 | |
RTCompConnect & | operator= (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 |
【使い方】
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
name | corba name server ip address | |
port | corba name server port |