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
Assigned Toandras 
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 {
       volatile int pktLength @unit(b);
       app: SimpleApp{
               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: line 95:
case cPar::LONG: *this = par.doubleValue(); break;

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

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

- Relationships

-  Notes
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 - 2022 MantisBT Team
Powered by Mantis Bugtracker