OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000098OMNeT++simulation kernelpublic2009-08-27 14:192010-05-26 19:59
Reporterrhornig 
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.0 
Target VersionFixed in Version4.1rc1 
Summary0000098: Assignment of a compound module parameter in a submodule does not assign the unit
DescriptionI ran into some problems using the @unit property for integer
parameters of compound modules and was hoping for some feedback to
clear up my confusion or confirmation that there's something wrong.

Here are the important parts of the simple module definition:
simple SimpleApp {
   volatile int msgLength @unit(b) = default(1024b);
}

and of the compound module:
module StumpNode {
   parameters:
       volatile int pktLength @unit(b);
   submodules:
       app: SimpleApp{
           parameters:
               msgLength = pktLength;
       }
}

In omnetpp.ini I have:
**.pktLength = 2048b

Running the simulation yields the following error:
Error evaluating parameter `msgLength': Cannot convert unit none to
'b' (bit)

After some debugging, I found that if I change the following code:
cdynamicexpression.cc line 95:
case cPar::LONG: *this = par.doubleValue(); break;

to
case cPar::LONG: *this = par.doubleValue(); dblunit = par.getUnit();
break;

Then, it works as expected. Also, changing the compound module
parameter type to double fixes the problem.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000307)
andras (administrator)
2010-05-26 19:59

Fixed as recommended in the description.

- Issue History
Date Modified Username Field Change
2009-08-27 14:19 rhornig New Issue
2010-05-26 19:59 andras Note Added: 0000307
2010-05-26 19:59 andras Status new => resolved
2010-05-26 19:59 andras Fixed in Version => 4.1rc1
2010-05-26 19:59 andras Resolution open => fixed
2010-05-26 19:59 andras Assigned To => andras


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker