OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000824OMNeT++simulation kernelpublic2015-04-25 14:432015-04-25 14:43
Reporterwoife 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformx86_64OSLinuxOS VersionKubuntu 14.10
Product Version4.6 
Target VersionFixed in Version 
Summary0000824: Error in prefix conversion for @unit parameters
DescriptionHaving a parameter with @unit(ns) and assigning a value of 100us leads to an incorrect value of 99999ns.

Steps To ReproduceExample:

Testmodule.ned:

simple TestModule
{
    int Interval @unit(ns) = default(100us);
}

Testmodule.cc:

#include "TestModule.h"

Define_Module(TestModule);

void TestModule::initialize()
{
    cPar& p = par("Interval");
    ev << "parameter: " << p.getName() << "\n";
    ev << " type:" << cPar::getTypeName(p.getType()) << "\n";
    ev << " contains:" << p.str() << "\n";
}

void TestModule::handleMessage(cMessage *msg)
{
}

OMNeT output:

** Initializing network
Initializing module TestSimulation, stage 0
TestSimulation.testModule: Initializing module TestSimulation.testModule, stage 0
TestSimulation.testModule: parameter: Interval
TestSimulation.testModule: type:long
TestSimulation.testModule: contains:99999


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-04-25 14:43 woife New Issue
2015-10-12 09:28 ammmar1988 Issue cloned: 0000850


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker