The Scientific World Journal / 2014 / Article / Alg 1

Research Article

An Adaptive Framework for Real-Time ECG Transmission in Mobile Environments

Algorithm 1

Layer-based EDF scheduling algorithm.
(1) : deadline of packet
(2) : timeout value of packet
(3) : current time
(4) : set of packets in the transmission buffers of the sensor
(5) for every time-slots do
(6)  for     do
(7)   if     then
(8)    Remove the packet from the transmission buffer
(9)   end if
(10) end for
(11) Select packet with the lowest layer and the earliest deadline
(12) Send to the BS
(13)  .
(14) if the sensor gets an ACK of from the BS within   then
(15)   Remove
(16) else
(17)   Move into retransmission buffer
(18) end if
(19) end for