|
Bugzilla – Full Text Bug Listing |
| Summary: | Wifi doesn't fully stop when energy is depleted | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | wifi | Assignee: | sebastien.deronne |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | ns-3.27 | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 2807 | ||
| Bug Blocks: | |||
| Attachments: |
patch to energy examples
updated patch to energy examples |
||
Tommaso, thanks for reporting this issue. Is somebody already planning to work on this one? You're welcome. Not me, I'm already way behind my schedule to add features to ns-3, starting from the GSoC contributions. Cheers, T. (In reply to sebastien.deronne from comment #1) > Tommaso, thanks for reporting this issue. > Is somebody already planning to work on this one? OK, I will see whether somebody or myself can work on this. I guess this is a general bug though, and that not only wifi is not stopping when energy is depleted. Do you have knowledge which modules have this working correctly and which don't? Since only Wi-Fi is properly handling energy depletion, I fear that no other module can be used as a guideline. Sorry... (In reply to sebastien.deronne from comment #3) > OK, I will see whether somebody or myself can work on this. > > I guess this is a general bug though, and that not only wifi is not stopping > when energy is depleted. Do you have knowledge which modules have this > working correctly and which don't? I will work on this one asap. I am currently working on this. I will first deliver some changes in the mainstream to introduce a new off state, then I'll send a review for the changes themselves. I also wonder whether we should model the battery recharged, or whether this can be postponed? My suggestion is to postpone this. I already pushed some more obvious changes, I will soon send a review for the logic itself. Created attachment 2990 [details]
updated patch to energy examples
Added asserts in examples
I prepared a Rietveld issue with the code changes: http://codereview.appspot.com/332610043 Any comments on the proposal? I'd like to have this feature included in the upcoming release. It seems all ok for me. Just test it also with #2807 to be sure that energy doesn't go negative. Afterwards, feel free to push both. T. (In reply to sebastien.deronne from comment #10) > Any comments on the proposal? I'd like to have this feature included in the > upcoming release. Ok, thanks Tommaso. It's still working fine (just had to handle off state in GetTotalEnergyConsumption), I will push both patches. Note that the patch could also be later improved by handling energy recharged case. Any idea how to reproduce an energy recharged? If I have time, I'll work soon on that case. (In reply to sebastien.deronne from comment #12) > Ok, thanks Tommaso. > It's still working fine (just had to handle off state in > GetTotalEnergyConsumption), I will push both patches. > > Note that the patch could also be later improved by handling energy > recharged case. > Any idea how to reproduce an energy recharged? If I have time, I'll work > soon on that case. examples/energy/energy-model-with-harvesting-example.cc should do the trick. Thanks. I will push this, and try to find some time to handle later the energy recharged case. pushed in changeset 13273:6437fd5d3f98 |
Created attachment 2937 [details] patch to energy examples If one looks at the traces provided by the energy examples included, it is evident that there's a small issue. When the energy is depleted, the radio is put in sleep mode (WifiPhy::SLEEP). However, there is still a small energy consumption in sleep mode. As a consequence, the energy consumption count is wrong. There is the need for a real WifiPhy::OFF state, which should be reverted by the NotifyEnergyRecharged callback. As a matter of fact, even without the patch in #2807, calling GetTotalEnergyConsumption at the simulation end shows the erroneous behavior: 0.8J consumed when the energy source had just 0.1J at the beginning. The examples attached are meant to replace the existing energy examples, but I'd hold them until this bug is fixed.