[ndnSIM] Energy Model ns3

Xee 1839750381 at qq.com
Mon Apr 22 22:13:44 PDT 2013


Hi Alex


I am using the code below:


 Ptr<BasicEnergySource> basicSourcePtr = DynamicCast<BasicEnergySource> (sources.Get (1));  
  basicSourcePtr->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback (&RemainingEnergy));
  // device energy model
  Ptr<DeviceEnergyModel> basicRadioModelPtr =
    basicSourcePtr->FindDeviceEnergyModels ("ns3::WifiRadioEnergyModel").Get (0); 
  NS_ASSERT (basicRadioModelPtr != NULL);
  basicRadioModelPtr->TraceConnectWithoutContext ("TotalEnergyConsumption", MakeCallback (&TotalEnergy));



The node number 0 and 1 both are consumer nodes in simulation, but for producers it give error when I run simulation.


rgd
-Xee
------------------ Original ------------------
From:  "Alex Afanasyev"<alexander.afanasyev at ucla.edu>;
Date:  Apr 23, 2013
To:  "Xee"<1839750381 at qq.com>; 
Cc:  "ndnsim"<ndnsim at lists.cs.ucla.edu>; 
Subject:  Re: [ndnSIM] Energy Model ns3



Hi Xee,

You should give me more input to understand the problem.  Can you give me a simple scenario to debug?

---
Alex

On Apr 22, 2013, at 8:51 PM, "Xee" <1839750381 at qq.com> wrote:

> Hi Alex
> 
> I am able to use the energy consumption model for ndn nodes, but it working only with the consumer nodes. When I try with producer nodes it terminates with error while compiling. Please advise to how I remove the error and get the energy consumption of all nodes in the topology. 
> 
> rgd
> -Xee
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130423/e21d1951/attachment.html>


More information about the ndnSIM mailing list