OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000009OMNeT++IDE / INI editorpublic2008-11-26 11:212010-05-05 16:07
0000009: The IDE ini editor doesn't know about parameters of dynamically created modules
The IDE ini editor doesn't know about parameters of dynamically created modules, because it only parses the ned files of all static modules (and submodules) in a network.

I've try to add a "hint" in the ned file by adding the to be dynamically created module as empty array (e.g. overlayTerminal[0]: OverlayTerminal), but this doesn't show any effect in the ini editor.
No tags attached.
Issue History
2008-11-26 11:21baumgartNew Issue
2008-11-26 11:21baumgartStatusnew => assigned
2008-11-26 11:21baumgartAssigned To => andras
2008-12-02 16:13andrasNote Added: 0000046
2008-12-04 11:16baumgartNote Added: 0000056
2008-12-05 11:27baumgartNote Added: 0000063
2008-12-08 11:23andrasStatusassigned => acknowledged
2008-12-08 11:23andrasTarget Version => 4.1
2008-12-08 16:18baumgartNote Added: 0000080
2008-12-09 11:56andrasNote Added: 0000082
2008-12-10 08:52rhornigStatusacknowledged => to be tested
2008-12-10 10:04rhornigStatusto be tested => postponed
2008-12-10 22:27baumgartNote Added: 0000087
2008-12-10 22:27baumgartStatuspostponed => feedback
2008-12-10 22:27baumgartResolutionopen => reopened
2008-12-10 23:11andrasNote Added: 0000088
2008-12-15 22:28baumgartNote Added: 0000095
2009-09-11 10:23baumgartNote Added: 0000175
2009-11-23 14:27rhornigPrioritynormal => high
2010-03-08 21:52andrasNote Added: 0000216
2010-05-05 16:07andrasNote Added: 0000271
2010-05-05 16:07andrasStatusfeedback => resolved
2010-05-05 16:07andrasFixed in Version => 4.1b4
2010-05-05 16:07andrasResolutionreopened => fixed

2008-12-02 16:13   
The overlayTerminal[0] hint doesn't work because the editor is "too clever" and knows that a zero-sized array doesn't count.

However, I get the point that it would be indeed a useful feature to be able to parameterize dynamically created modules in the editor. I'm thinking about using metadata annotations in the NED file (@dynamicModule or something like that) to convey info about dynamically created modules to the editor.
2008-12-04 11:16   
Maybe it would also be useful to add metadata to ini file parameters, which are use to specify module types. This could be used by the ini editor to suggest valid module names. To make this even more useful this could be restricted to all modules with a specific interface ("like").


module OverlayHost {
  string overlayType @moduleName(IOverlay)

Because it makes only sense to specify a module type if it is later used in the simulation, all parameters for the given module should also be offered as valid parameters in the ini editor. For dynamically created modules you still would not know where this module will be created, but you would at least know, that a module of this type will be created somewhere.
2008-12-05 11:27   
Probably the @dynamicModule metadata could also be used to specify parameters and a display string for dynamically created modules directly in the ned file.
2008-12-08 16:18   
Do you think you could implement a quick fix for omnetpp-4.0 e.g. to have an option to search all ned files for input parameter?

Currently the IDE ini-file editor is not really usable with OverSim, since almost all parameters are unknown to the IDE (warning symbol shown, no comment and no default value available).
2008-12-09 11:56   
Yeah I know. I'll try to cook up something.
2008-12-10 22:27   
I've noticed that this problem is not only related to dynamically created modules:

If you have a static compound module containing a submodule specified by a parameter ("like"), all parameters of the submodule are unknown to the INI file editor.
2008-12-10 23:11   
It only takes into account the interface parameters.
2008-12-15 22:28   
BTW, I've just noticed that the "overlayTerminal[0] hint" currently works great to assign parameters and properties for dynamically created modules in a ned file. So maybe you should simply reduce the "cleverness" of the INI editor as a first step. (Of course this does not solve the problem, that the IDE doesn't know about parameters of "like" modules).
2009-09-11 10:23   
I've also noticed that the "overlayTerminal[0]" hint also works in the IDE ned editor and for neddoc generation.
2010-03-08 21:52   
OMNeT++ 4.1 supports the @dynamic property for submodules. Submodules marked with @dynamic will not be created by NED i.e. they are expected to be created at runtime by C++ code. The editor will show such submodules as semi-transparent, and its parameters can be edited in the INI file editor (content assist, etc). When the modules get created in the simulation, parameters from both the NED and the INI file will take effect. Hope this will do it :)
2010-05-05 16:07   
@dynamic it is.