Research Article

An Efficient Anycast Mechanism for 802.15.4-TSCH to Improve QoS in IIoT

Algorithm 2

Route list creation in the proposed method.
1:  Inputs:
     links: List of all links in the topology
     nodes: List of all nodes in topology
2:  Outputs:
     routesList: List of all routes to root, respectively
3:routesList ← ()
4:  fornodenodesdo
5:    route ← ()
6:    depthgetDepth(node)
7:    route.insert(node)
8:    fori ← 1,depthdo
9:      parentroute(-1)
10:     nodegetParent(parent)
11:     route.insert(node)
12:   end for
13:   routeList.insert(route)
14:  End for
15:  Returnsort(routeList)