Research Article

Multiconstraint-Aware Routing Mechanism for Wireless Body Sensor Networks

Algorithm 1

QoS-conscious next-hop selector algorithm.
Inputs: RT and DP
(1) START
(2)  for DP received at QoS-CNHS do
(3)   for each NN ε RT do
(4)    if WLQi,j ≥ WLQthre then
(5)     List NN into NHNWLQ
(6)    end if
(7)   end for
(8)   if NHNWLQ = NULL then
(9)    drop DP
(10)   else if DP ε CD !! DC ε DCD then
(11)    call delay-conscious procedure with inputs DP and NHNWLQ
(12)   else if DP ε RCD then
(13)    call reliability-conscious procedure with inputs DP and NHNWLQ
(14)   else
(15)    SNH ε NHNWLQ with minimum PTi,j,LC
(16)    forward DP towards NCQ
(17)   end if
(18)   end for
Delay-Conscious Procedure
 Inputs: NHNWLQ and DP
(19)   for each NN ε NHNWLQ do
(20)    if PDi,j, LC ≤ PDthre then
(21)     List NN into NHNPD
(22)    end if
(23)    if NHNPD = NULL then
(24)     drop DP
(25)    else if NHNPD = 1 then
(26)    SNH ε NHNPD
(27)     if CP ε DCD then
(28)      forward DP towards DCQ
(29)     else
(30)forward DP towards CDQ
(31)     end if
(32)    else if DP ε DCD hen
(33)     SNH ε NHNPD with minimum PTi,j,LC
(34)     forward DP toward DCQ
(35)    else
(36)     call reliability-conscious procedure with inputs DP and
(37)    end if
(38)   end for
 Reliability-Conscious Procedure
 Inputs: NHNWLQ or NHNPD or and DP
(39)   for each NN ε NHNWLQ !! NN ε NHNPD do
(40)    if PRi,j, LC ≥ PRthre then
(41)     List NN into NHNPR
(42)    end if
(43)    if NHNPR = NULL then
(44)     SNH ε NHNWLQ !! SNH ε NHNPD with maximum PRi,j,LC
(45)     if DP ε RCD then
(46)      forward DP towards RCQ
(47)     else
(48)      forward DP towards CDQ
(49)     end if
(50)    else if NHNPR = 1 then
(51)    SNH ε NHNPR
(52)     if DP ε RCD then
(53)forward DP towards RCQ
(54)     else
(55)      forward DP towards CDQ
(56)     end if
(57)    else
(58)     SNH ε NHNPR with minimum PTi,j,LC
(59)     if DP ε RCD then
(60)      forward DP towards RCQ
(61)     else
(62)      forward DP towards CDQ
(63)     end if
(64)    end if
(65)    end for
(66) END