-
Notifications
You must be signed in to change notification settings - Fork 4
Update to disco to be more compliant with FOM module loading #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,8 +97,11 @@ public void addParameter( ParameterClass parameter ) | |
| // make sure we don't already have one by this name | ||
| if( parameters.containsKey(parameter.getName()) ) | ||
| { | ||
| throw new DiscoException( "Add Parameter Failed: Class [%s] already has parameter with name [%s]", | ||
| name, parameter.getName() ); | ||
| // FIXME - we'll assume that this parameter has the same definition - which makes this fine | ||
| // but if it were defined any differently we should error out. | ||
| return; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally this should have equivalency checks on the parameters as per portico. Are we just treating this current change as a stop-gap to get current work out of the way?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep exactly. I think the way DISCO is doing this merging would need to change somewhat fundamentally for us to be able to do such equivalency checks - as far as I can tell - the only info we have about parameters at this point is the name, so would need to rework so that we have the full definition of the existing and the incoming parameters.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disco isn't doing any FOM merging. It is reading the collective set of provided FOM modules to cache information from it so that it can reference it later. The only information required to be stored for Interactions is the name I believe, because it's the only thing from the FOM that Disco uses in operation (gets used in pubsub). I believe this check by itself should just be enough.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I lie - Parameters are also needed (for handle lookup). This will need to expand to just loop over all params and add them to the set of cached parameters. If the RTI allows the set of FOM modules then you know they should comply with any HLA merging rules, so there should be no issue with just cumulatively adding to the store of parameters. That is effectively what happens, so it should be OK. |
||
| // throw new DiscoException( "Add Parameter Failed: Class [%s] already has parameter with name [%s]", | ||
| // name, parameter.getName() ); | ||
| } | ||
|
|
||
| // store the parameter | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these extra files already included in the codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I don't know why they weren't included (perhaps we just never used anything in them?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shouldn't be needed by Disco and should be removed. Any module that is not 100% required (because there is a mapper that uses data from it) should be excluded. If other federates/applications need these models they can add them within the scope of their applications.