Perform the routing table of a topology in respect with the RPL algorithm.
[R] = NL_R_RPLRT(G,S,P)
Graph.
Root node.
Predecessor vector.
Routing table.
NL_R_RPLRT computes the shortest paths between all couples of distinct network nodes of the graph G composed by n nodes in respect with the RPL algorithm (IETF DRAFT). The paths are stored in the routing table matrix R. Thus the route between the nodes i and j can be read at the line of index (i-1)*n+j. The first column of R provides each path length.
n=80;//network size l=1000;//network squared area side d=150;//Locality radius [g]=NL_T_LocalityConnex(n,l,d);//topology generation ETX=5; [v] = NL_F_RandVector0nminus1(length(g.head),ETX);//update of weigth v=v+1; g.edge_weight=g.edge_length; g.edge_length=v; xc=l/2;//area center yc=l/2; [s]=NL_G_NodeClose2XY(g,xc,yc)//root node c=5;//5 possible routes [pred,dist,ra,DAG,DIO]=NL_R_RPL(g,s,c);//performance of RPL [go]=NL_R_RPLPlot(g,pred);//highlight RPL tree ind=1;//window index f=NL_G_ShowGraphN(go,ind);//graph visualization [rt]=NL_R_RPLRT(g,s,pred)//application of NL_R_RPLRT | ![]() | ![]() |