Discussion:
Energy Model in Mac layer
'Mahdi Faghih Imani' via ns-3-users
2018-11-22 11:55:04 UTC
Permalink
Hi,

I saw the energy samples in examples folder. How can I access the energy
model and read the energy remaining in mac-low layer for wifi nodes? In the
other words, How can I access in the following lines in mac-low layer?

Ptr<BasicEnergySource> basicSourcePtr = DynamicCast<BasicEnergySource>
(sources.Get (1));
basicSourcePtr->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback
(&RemainingEnergy));

Regards.
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Loading...