[openrtm-users 02811] Re: Checking connection before connecting two ports

Ando Noriaki n-ando @ aist.go.jp
2013年 6月 4日 (火) 09:59:01 JST


Hello,

You can know whether a port is identical by using
CORBA::Object::is_equivalent() method.

For example,

if (this_port.is_equivalent(that_port)) {
  // this_port is that_port
}

Best regards,
Noriaki Ando



2013/6/1  <shanshan1370 @ sina.com>:
> Dear All: There’s one problem bothering me for months. I’d like to
> connect two ports by programming with Java API. This is no problem. The
> problem is I want to check whether these two ports have already been
> connected before I do the connecting. Here’s my way. 1. I can get the
> connection information by this method: ConnectorProfile
> PortService.get_connector_profiles(); 2. I can get the two ports:
> PortService
> ConnectorProfile.ports; 3. Each ports’ name, profile, owner, etc. The key
> problem is how to decide whether two PortServices are identical, or whether
> two RTObjects are indentical. So that I can decide whether the port has been
> connected or not. Due to there could be different RT-components with the
> same
> name under different path, it makes this problem more complicated. Please
> help me out. Thanks a lot! Wenshan
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users @ openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users


More information about the openrtm-users mailing list