title: How to calculate total energy consumption using Cooja
body: <p>I'm working with wireless sensor network lead to evaluate its performance in my work.  I want to measure the latency and  total energy consumption to find the remaining energy in each node. So my problem is that I have some values of <code>tx rx cpu cpu_idle</code>  and I don't how to use them to calculate what I need. I found some rules that take the calculation but i don't understand exactly how to apply it in my case.</p>
  
  <p>Energy consumed in communication:
  <img src="https://i.stack.imgur.com/1qKgY.png" alt=" "></p>
  
  <p>Energy consumed by CPU:</p>
  
  <p><img src="https://i.stack.imgur.com/EtfEC.png" alt=""></p>
  
  <p>What is the meaning of 32768, and why do we use this number? Is it a standard value?</p>