OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000998OMNeT++documentationpublic2017-02-20 20:382017-03-02 12:51
0000998: Configuration option manual part is inconsistent with actual code
Stumbled upon this while testing out the registration of additional config options...

In the manual - Chapter 17.2 ( [^]) - it is stated that:

"Per-Object options can be specified in any section (i.e. both in [General] and in [Config <name>] sections). They are specific to an object or group of objects and their name must not contain a hypen (-) character."

While in the actual source code there's an error check that the name contains a hyphen, from cconfigoption.c

// per-object config option names must contain hyphen, except for "typename" (named so for consistency with NED)
    if (strchr(name,'-')==nullptr && strcmp(name, "typename")!=0)
        throw opp_runtime_error("Per-object config option name must contain hyphen, check Register_PerObjectConfigOption() macros: %s", name);"

Also, the description of the different Register_... options is not consistent, as the per object config option expects a "KIND" parameter:
I am also wondering, if the user-defined config options are able to be parsed and used in the omnetpp.ini.
One can insert a new config option in the source code, set it there and use it.
But the Eclipse editor does not recognize the new options in the omnetpp.ini and reports back errors when setting the options in the ini-file.
No tags attached.
Issue History
2017-02-20 20:38mkirscheNew Issue
2017-02-20 21:43mkirscheNote Added: 0001326
2017-03-02 12:51andrasNote Added: 0001329
2017-03-02 12:51andrasStatusnew => resolved
2017-03-02 12:51andrasFixed in Version => 5.1
2017-03-02 12:51andrasResolutionopen => fixed
2017-03-02 12:51andrasAssigned To => andras

2017-02-20 21:43   
Okay, answered my question from the "additional information" myself, the existing (global) options are registered in the Java sources of Eclipse for the IDE to display (and be used). So new configuration options would have to be added to the Java sources for the INI file editor to be able to parse them.
2017-03-02 12:51   
I fixed the description in the manual.

It's true that custom config options are not recognized by the IDE, because it doesn't know about them. (Parsing them out of the source code is not realistic.)
 Someday the IDE will contain some mechanism (dialog or config file) for entering custom options.