Bug 2265 - Energy module can not be used on mesh devices
Energy module can not be used on mesh devices
Product: ns-3
Classification: Unclassified
Component: mesh
All All
: P5 normal
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2016-01-13 15:44 EST by Tommaso Pecorella
Modified: 2016-02-05 01:58 EST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2016-01-13 15:44:33 EST
If one tries to use the WifiRadioEnergyModelHelper to install the Energy model on a Mesh device, the helper will crash.

The problem has been discussed in this thread:

The actual problem is that the "obvious" solution is not obvious at all. A MeshNetDevice can hide more than one WifiNetDevices. Should them all drain from the same energy source ?

In any case, the solution is straightforward: a new MeshRadioEnergyModelHelper, which could simply wrap the appropriate WifiRadioEnergyModelHelper and have it install the sources on all the net devices.
It is not a good idea to add the mesh code to the existing WifiRadioEnergyModelHelper because this would create a dependency.