OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000666OMNeT++simulation kernelpublic2013-07-25 16:312013-07-25 16:31
0000666: Accessing volatile parameters in two-way connections causing runtime error
When using the

gateA <--> {datarate = somevolatileparameter} <--> gateB

connection form, it is in fact a shorthand for

gateA$i <-- {datarate = somevolatileparameter} <-- gateB$o
gateA$o --> {datarate = somevolatileparameter} --> gateB$i

this means that 'somevolatileparameter' is accessed two times which may result in different values. The user intention is to have the same value.

It would be better if the channel would be created only once and then would be cloned for the opposite direction.
See the following code as example:

network net
        volatile string areaType = default("Area_Type1");
        volatile double interAreaRate = select(intuniform(0, 1), 10Mbps,100Mbps);
        area[areas]: <areaType> like IArea { }
    area[0].ethg++ <--> { datarate = interAreaRate; delay = 2.0ms; } <--> area[1].ethg++;
No tags attached.
Issue History
2013-07-25 16:31rhornigNew Issue

There are no notes attached to this issue.