openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

The Rti1516eAmbassador ignores the federateType parameter for joinFederationExecution() #280

Open adlaws opened 5 years ago

adlaws commented 5 years ago

The implementation of the joinFederationExecution( String federateName, String federateType, String federationName, URL[] fomModules ) method in Rti1516eAmbassador ignores the federateType parameter.

When creating the JoinFederation request instance, it only uses the federateName, federationName and fomModules parameters. It's worth noting that the JoinFederation class currently has no ability to store the federateType parameter in any case.

A practical side effect of this is that when one subscribes to the HLAobjectRoot.HLAmanager.HLAfederate attribute reflection to discover federates joining the federation, the value for the HLAfederateType attribute is always the same as the HLAfederateName attribute, no matter what parameter was used for federateType during the joinFederationExecution(...) call.

This means that one cannot detect the types of a federate joining the federation based on the value of the HLAfederateType in the attribute reflections.

A temporary workaround would be to name federates in such a way as to encapsulate the federate type information (e.g., fedtypeA-fedname1, fedtypeA-fedname2, fedtypeB-fedname1, fedtypeB-fedname2, etc...), but support of the federateType parameter is preferred to this.

adlaws commented 5 years ago

See Pull Request https://github.com/openlvc/portico/pull/281 for code fixes to be considered for merging to address this issue.