A Process Algebraic Framework for Estimating the Energy Consumption in Ad-hoc Wireless Sensor Networks