Research Article

Runtime Estimation of the Number of Active Devices in IEEE 802.15.4 Slotted CSMA/CA Networks with Deferred Transmission and No Acknowledgment Using ARMA Filters

Algorithm 1

Pseudocode of the proposed runtime estimation for and in IEEE 802.15.4 slotted CSMA/CA.
;
;
;
// number of superframes
// length of data frame in slots
for each in , reset();
for to do
;
for each in do
for each in , move element from to if ;
if new device(s) is(are) ready to transmit () and then
;
;
for each in do
if then
;
else
if and remaining time in this CAP then
;
else if then
if then
;
;
if then
;
else
;
if remaining time in this CAP and two consecutive slots before the current slot are idle then
;
if then
;
if then
for each in, reset();
for each in , move element from to;
// end of for each in do
for each in do
if then
;
reset();
;
;
function reset()
;
according to and ;
;