Bug 2265

Summary: Energy module can not be used on mesh devices
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: meshAssignee: ns-bugs <ns-bugs>
Status: PATCH WANTED ---    
Severity: normal CC: tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

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:
https://groups.google.com/forum/#!topic/ns-3-users/a4zMuLBD-SU

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.