An ad hoc network is characterized by the fact that there is no fixed topology due to the mobility of nodes, interference, multipath propagation and path loss. Execution of applications in such kind of networks typically consists of a number of successive phases such as network reprogramming, localization, power monitoring, and parameter updates. Termination detection of a phase is there...