title: How can I shutdown a node after energy depletion in NS-3?
body: <p>New to ns3, thanks!
  I added energyModel to my ns3 nodes, and they work well. But I found that when the remaining energy is 0 the node is still work (send and receive packet), I set the EnergyDepletionCallback but I don't how to shutdown the node or NetDevice in my callback.</p>
  <p>Here is my energy model:</p>
  <pre><code>Ptr&lt;BasicEnergySource&gt; energySource = CreateObject&lt;BasicEnergySource&gt;();
  Ptr&lt;WifiRadioEnergyModel&gt; energyModel = CreateObject&lt;WifiRadioEnergyModel&gt;();
  
  energySource-&gt;SetInitialEnergy (1);
  energyModel-&gt;SetEnergySource (energySource);
  energySource-&gt;AppendDeviceEnergyModel (energyModel);
  
  WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback = 
    MakeCallback (&amp;FqAodvExample::EnergyDepletionCallback, this);
  
  energyModel-&gt;SetEnergyDepletionCallback (callback);
  
  // aggregate energy source to node
  nodes.Get (i)-&gt;AggregateObject (energySource);
  </code></pre>