Changeset 91:16104eff1b99 in finroc_plugins_runtime_construction for tAdministrationService.cpp


Ignore:
Timestamp:
14.05.2017 13:29:00 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Changes tAdministrationService::DeleteUriConnector to be more suitable for use with finstruct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tAdministrationService.cpp

    r90 r91  
    302302} 
    303303 
    304 bool tAdministrationService::DeleteUriConnector(int local_port_handle, const rrlib::uri::tURI& uri) 
     304bool tAdministrationService::DeleteUriConnector(int local_port_handle, uint index) 
    305305{ 
    306306  core::tAbstractPort* port = core::tRuntimeEnvironment::GetInstance().GetPort(local_port_handle); 
     
    308308  if (port && port->IsReady()) 
    309309  { 
    310     for (auto & connector : port->UriConnectors()) 
    311     { 
    312       if (connector->Uri() == uri) 
    313       { 
    314         connector->Disconnect(); 
    315         return true; 
    316       } 
    317     } 
    318     result << "No connector with URI " << uri.ToString() << " found"; 
     310    if (port->UriConnectors().size() > index && port->UriConnectors()[index]) 
     311    { 
     312      port->UriConnectors()[index]->Disconnect(); 
     313      return true; 
     314    } 
     315    result << "No URI connector with index " << index << " found"; 
    319316  } 
    320317  else 
Note: See TracChangeset for help on using the changeset viewer.