Listing 1. Node sleep time basic decision algorithm using ENO |
int ENO_algorithm (int Vscap, int Pcell, |
int Tsleep max, int Tsleep min) |
{ |
if (Vscap>4.5 V & Pcell >=0.2*Pcell_max) |
Tsleep = (eq 22); |
else |
Tsleep = Tsleep / rho; |
if (Tsleep > Tsleep_max) |
Tsleep=Tsleep max; |
else |
if (Tsleep < Tsleep_min) |
Tsleep=Tsleep min; |
return (Tsleep); |
} |