<< NL_R_RPLPlot NL_R: Routing NL_R_RT2ERT >>

NARVAL >> NL_R: Routing > NL_R_RPLRT

NL_R_RPLRT

Perform the routing table of a topology in respect with the RPL algorithm.

Calling Sequence

[R] = NL_R_RPLRT(G,S,P)

Arguments

G :

Graph.

S :

Root node.

P :

Predecessor vector.

R :

Routing table.

Description

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.

Examples

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

Dependency

NL_R_RPLCommonAncestor, NL_F_ReverseVector

Report an issue
<< NL_R_RPLPlot NL_R: Routing NL_R_RT2ERT >>