Register_PerRunConfigOption

16 views
Skip to first unread message

alfonso....@gmail.com

unread,
Mar 7, 2017, 12:26:48 PM3/7/17
to OMNeT++ Users
Hi all,

This is my first participation in this forum.
My name is Alfonso and I would like to see if anybody could help me someway.
I am sorry for my english in advance, I will try to do my best...

I am coding my particular Random Number Generator from the cRNG class.
All is working ok, but I have a simple problem with the macro to lookup a new key in the omnetpp.ini.
The following line code line is included in the *.cc:

Register_PerRunConfigOption( CFGID_SEED_CG, "seed-%-cg", CFG_STRING, "330eabcd1234", "When LCG is selected as random "
        "number generator: seed (330eabcd1234 as default) for RNG number k. (Substitute k for '%' in the key.)" );

I wonder if there is a way to avoid the error that appears in the omnetpp.ini for this key as "Unknown configuration option".
The program is running without problems, the key from the ini file is read correctly.
Obviously is not a compiling or execution problem.
However when editing is a bit annoying to see the red mark..., I would like to fix this.
I guess that for any reason the grammatical parsing of the ini file is not considering the new key.
But a question raise to me: if the source code of the omnetpp uses these macros, am I forgetting something...?

Salutations, and thank you very much!

Michael Kirsche

unread,
Mar 7, 2017, 4:49:20 PM3/7/17
to OMNeT++ Users
Hi Alfonso,

you defined your own configuration option, correct?
In short, the ini-editor in the IDE will always complain about custom or user-defined configuration options.
They work fine in the code and you can set them in the omnetpp.ini, but the IDE does only know configuration options that are pre-included in the Java code of the INI editor module.
There is no live-parsing to include custom/user defined ones.
I discussed this shortly in a bug tracker item: https://dev.omnetpp.org/bugs/view.php?id=998

So you are not forgetting anything, that's just how things are at the moment.

Best,
Michael

alfonso....@gmail.com

unread,
Mar 9, 2017, 1:57:14 AM3/9/17
to OMNeT++ Users
I appreciate your response Michael,thanks,
Best regards,
Alfonso
Reply all
Reply to author
Forward
0 new messages