OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000998OMNeT++documentationpublic2017-02-20 20:382017-03-02 12:51
Reportermkirsche 
Assigned Toandras 
PrioritylowSeveritytextReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version5.1 
Summary0000998: Configuration option manual part is inconsistent with actual code
DescriptionStumbled upon this while testing out the registration of additional config options...

In the manual - Chapter 17.2 (https://omnetpp.org/doc/omnetpp/manual/#sec:plugin-exts:configoption [^]) - 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:
Register_PerObjectConfigOption(ID, NAME, KIND, TYPE, DEFAULTVALUE, DESCRIPTION)
Additional InformationI 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001326)
mkirsche (reporter)
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.
(0001329)
andras (administrator)
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.

- Issue History
Date Modified Username Field Change
2017-02-20 20:38 mkirsche New Issue
2017-02-20 21:43 mkirsche Note Added: 0001326
2017-03-02 12:51 andras Note Added: 0001329
2017-03-02 12:51 andras Status new => resolved
2017-03-02 12:51 andras Fixed in Version => 5.1
2017-03-02 12:51 andras Resolution open => fixed
2017-03-02 12:51 andras Assigned To => andras


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker