Anonymous | Login | 2022-05-27 19:53 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0001011 | OMNeT++ | simulation kernel | public | 2017-05-04 22:53 | 2017-05-04 22:53 | ||||||||
Reporter | paolinux | ||||||||||||
Assigned To | |||||||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | x86 | OS | Windows | OS Version | 10 | ||||||||
Product Version | 5.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0001011: Name is not unique within its component, | ||||||||||||
Description | I'm not sure if this is a bug or a feature but I've noticed the following change when moving from 5.0 to 5.1. In the previous version, the following NED declaration was fine: switch: Switch if numClients > 10 { parameters: pkRate = 1.5*numClients; } switch: Switch if numClients <= 10 { parameters: pkRate = 2.5*numClients; } My understanding was that as long as the two conditions ("numClients > 10" and "numClinents <=10") were mutually exclusive, the declaration was correct as only one instance of Switch would be created. However, when running this code under 5.1, I get the following error <!> Error: Name 'switch' is not unique within its component, at omnetpp-5.1\samples\dyna\ClientServer.ned:31 Is this the intended behavior or is indeed a bug? I find the former behavior rather handy when I want to change the type of a given sub-module based on the value of a parameter. | ||||||||||||
Steps To Reproduce | Change the ClientServer.ned in samples/dyna as follows network ClientServer { parameters: int numClients @prompt("Number of clients") = default(4); submodules: server: Server { parameters: @display("p=210,70"); } switch: Switch if numClients > 10 { parameters: pkRate = 1.5*numClients; // pkRate should be >= numClients, otherwise switch will become the bottleneck queueMaxLen = 20; // buffer max 20 packets @display("p=210,170"); gates: port[numClients+1]; } switch: Switch if numClients <= 10 { parameters: pkRate = 2.5*numClients; // pkRate should be >= numClients, otherwise switch will become the bottleneck queueMaxLen = 20; // buffer max 20 packets @display("p=210,170"); gates: port[numClients+1]; } client[numClients]: Client { parameters: timeout = 5s; @display("p=70,270,m,10,80"); } connections: for i=0..numClients-1 { client[i].port <--> { delay = 10ms; } <--> switch.port[i]; } server.port <--> { delay = 10ms; } <--> switch.port[numClients]; } | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2017-05-04 22:53 | paolinux | New Issue |
Copyright © 2000 - 2022 MantisBT Team |