OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000799OMNeT++simulation kernelpublic2014-12-12 16:102015-03-04 09:52
normalminorhave not tried
0000799: @statistic: scalars computed from several signals are recorded in as many copies in the scalar file
Scalar recording via @statistic: when the expression uses multiple signals, there will be multiple copies in the scalar file.

An example NED file:

simple Sink
        @statistic[aplusb](source=a+b; record=last);

No tags attached.
patch omnetpp-46-fix799.patch (6,203) 2014-12-12 17:10
Issue History
2014-12-12 16:10andrasNew Issue
2014-12-12 16:13andrasNote Added: 0000964
2014-12-12 16:19andrasNote Added: 0000965
2014-12-12 16:19andrasStatusnew => resolved
2014-12-12 16:19andrasFixed in Version => 4.7
2014-12-12 16:19andrasResolutionopen => fixed
2014-12-12 16:19andrasAssigned To => andras
2014-12-12 17:10andrasFile Added: omnetpp-46-fix799.patch
2015-03-04 09:52rhornigFixed in Version4.7 => 5.0b1
2015-10-12 09:28ammmar1988Issue cloned: 0000863

2014-12-12 16:13   
Cause: results are recorded by going through the signal list of each module, and invoking finish() for the result listeners attached to them. Thus, result recorders will output an entry into the .sca file for each signal that occurs in the expression.
2014-12-12 16:19   
Fixed by adding a finishCalled flag to cResultRecorder. finish() needed to be wrapped into a callFinish() so we do the flag handling in cResultRecorder (and not in each concrete result recorder class).