<< NL_R_RPLMultiPath NL_R: Routing NL_R_RPLPlot >>

NARVAL >> NL_R: Routing > NL_R_RPLPath

NL_R_RPLPath

Perform the path between a node and the DAG root in respect with the RPL algorithm.

Calling Sequence

[R] = NL_R_RPLPath(S,D,P)

Arguments

S :

RPL root.

D :

Destination node.

P :

Predecessor vector.

R :

Path.

Description

NL_R_RPLPath performs the path R between the node D and the DAG root S in respect with the RPL algorithm. The predecessor vector P is generated by the RPL algorithm started from the root S.

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);//RPL tree construction
[go]=NL_R_RPLPlot(g,pred);//highlight RPL tree
ind=1;//window index
f=NL_G_ShowGraphN(go,ind);//graph visualization
[n1,n2]=NL_F_RandIntNiNj(g.node_number)//selection of two nodes
[p1]=NL_R_RPLPath(s,n1,pred)//application of NL_R_RPLPath 
[p2]=NL_R_RPLPath(s,n2,pred)//application of NL_R_RPLPath

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