OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000982OMNeT++simulation kernelpublic2017-01-11 15:222017-03-02 13:01
till 
andras 
normalmajoralways
resolvedno change required 
x86-64macOS10.12
 
5.1 
0000982: ${resultdir} variable gone or inaccessible?
I cannot access the resultdir variable anymore. Was it removed?

Error in the ini with my custom vectormanager:
Could not read option checkoutputvectormanager-reportfile= from the configuration: No such variable: ${resultdir}
No tags attached.
Issue History
2017-01-11 15:22tillNew Issue
2017-02-01 14:21rhornigNote Added: 0001282
2017-02-01 14:21rhornigAssigned To => rhornig
2017-02-01 14:21rhornigStatusnew => feedback
2017-02-01 14:46tillNote Added: 0001288
2017-02-01 14:46tillStatusfeedback => assigned
2017-02-01 15:15tillNote Added: 0001292
2017-02-01 15:20tillNote Added: 0001294
2017-02-01 17:40tillNote Deleted: 0001294
2017-02-01 17:41tillNote Edited: 0001288bug_revision_view_page.php?bugnote_id=1288#r20
2017-02-01 17:59tillNote Edited: 0001292bug_revision_view_page.php?bugnote_id=1292#r22
2017-02-03 14:16andrasAssigned Torhornig => andras
2017-02-03 14:16andrasStatusassigned => feedback
2017-02-03 14:25andrasNote Added: 0001308
2017-02-03 14:51tillNote Added: 0001309
2017-02-03 14:51tillStatusfeedback => assigned
2017-02-03 14:51tillNote Edited: 0001309bug_revision_view_page.php?bugnote_id=1309#r24
2017-02-05 10:35rhornigStatusassigned => feedback
2017-02-07 10:34andrasNote Added: 0001310
2017-03-02 13:01andrasNote Added: 0001331
2017-03-02 13:01andrasStatusfeedback => resolved
2017-03-02 13:01andrasFixed in Version => 5.1
2017-03-02 13:01andrasResolutionopen => no change required

Notes
(0001282)
rhornig   
2017-02-01 14:21   
It should be still available. How do you read the configuration option in the custom vector manager?
(0001288)
till   
2017-02-01 14:46   
(edited on: 2017-02-01 17:41)
I register the option like this:
Register_PerRunConfigOption(CFGID_CHECKOUTPUTVECTORMANAGER_REPORTFILE, "checkoutputvectormanager-reportfile",
        CFG_FILENAME, "${resultdir}/${configname}-${runnumber}-constraintReport.csv", "TBD");

and use it like this:
reportFilename = omnetpp::getEnvir()->getConfig()->getAsFilename(CFGID_CHECKOUTPUTVECTORMANAGER_REPORTFILE);

Until 5.0 this works. Problem occurs with preview 2:

<!> Error: Could not read option checkoutputvectormanager-reportfile= from the configuration: No such variable: ${resultdir}

(0001292)
till   
2017-02-01 15:15   
(edited on: 2017-02-01 17:59)
Hmmm, Is it a problem to read the config in the constructor of the result manager?

It looks like the variables are not initialized then. But it must have something todo with changes for 5.1!

(0001308)
andras   
2017-02-03 14:25   
It's not a good idea to read the option in the constructor. It is a per-run option, but the object is is created only once (and reused for all runs). When read in the constructor, different settings for each run will not take effect.

It is better to read the option e.g. in the startRun() method.
(0001309)
till   
2017-02-03 14:51   
Understood!

What would be the correct place for an EventLogManager? startRecording()?

(0001310)
andras   
2017-02-07 10:34   
The built-in eventlog manager EventlogFileManager (envir/eventlogfilemgr.cc/h) does such things in configure(), called from the LF_PRE_NETWORK_SETUP lifecycle event.
(0001331)
andras   
2017-03-02 13:01   
Seems like it's been clarified... (Please reopen if not)