Changeset 131:2f80193dc0b7 in finroc_plugins_runtime_construction


Ignore:
Timestamp:
31.10.2019 17:35:26 (9 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Enhances backward-compatibility for service/RPC ports in structure XML files; now also cases are supported where one port is found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tFinstructable.cpp

    r130 r131  
    503503                } 
    504504              } 
     505              else if (version == 0 && source_port && source_port->GetDataType().GetTypeClassification() == rrlib::rtti::tTypeClassification::RPC_TYPE && destination_port == nullptr) 
     506              { 
     507                core::tAbstractPort* service_destination_port = GetChildPort(ReplaceInterfaceInPath(destination_uri_parsed.path, "Services")); 
     508                if (service_destination_port && service_destination_port->GetDataType() == source_port->GetDataType()) 
     509                { 
     510                  FINROC_LOG_PRINT(WARNING, "Adjusted connector's interfaces to service interfaces (auto-update loading legacy files): now connects '", *source_port, "' and '", *service_destination_port, "'"); 
     511                  destination_port = service_destination_port; 
     512                } 
     513              } 
     514              else if (version == 0 && destination_port && destination_port->GetDataType().GetTypeClassification() == rrlib::rtti::tTypeClassification::RPC_TYPE && source_port == nullptr) 
     515              { 
     516                core::tAbstractPort* service_source_port = GetChildPort(ReplaceInterfaceInPath(source_uri_parsed.path, "Services")); 
     517                if (service_source_port && service_source_port->GetDataType() == destination_port->GetDataType()) 
     518                { 
     519                  FINROC_LOG_PRINT(WARNING, "Adjusted connector's interfaces to service interfaces (auto-update loading legacy files): now connects '", *service_source_port, "' and '", *destination_port, "'"); 
     520                  source_port = service_source_port; 
     521                } 
     522              } 
    505523 
    506524              if (source_port == nullptr && destination_port == nullptr) 
Note: See TracChangeset for help on using the changeset viewer.