<div dir="ltr">This is not general enough to write a patch, as one can define the topology in either way (i.e. through a topology file or Config). Note AnnotatedTopologyReader does not use Config to set up the topology.<div>A better solution would be finding the latency of attached links through the node, itself.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 6, 2018 at 1:55 PM Klaus Schneider <<a href="mailto:klaus@cs.arizona.edu">klaus@cs.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you use the AnnotatedTopologyReader, you can just set the metric to <br>
the same value as the delay.<br>
<br>
Here's an example from <a href="http://ndnsim.net/current/examples.html" rel="noreferrer" target="_blank">http://ndnsim.net/current/examples.html</a><br>
<br>
> <br>
> # link section defines point-to-point links between nodes and characteristics of these links<br>
> link<br>
> <br>
> # Each line should be in the following format (only first two are required, the rest can be omitted)<br>
> # srcNode   dstNode     bandwidth   metric  delay   queue<br>
> # bandwidth: link bandwidth<br>
> # metric: routing metric<br>
> # delay:  link delay<br>
> # queue:  MaxPackets for transmission queue on the link (both directions)<br>
> Node0       Node1       1Mbps       1       10ms    10<br>
> Node0       Node3       1Mbps       1       10ms    10<br>
<br>
<br>
Moreover, there's the GetAttribute() function: <br>
<a href="https://www.nsnam.org/docs/manual/html/attributes.html" rel="noreferrer" target="_blank">https://www.nsnam.org/docs/manual/html/attributes.html</a><br>
<br>
<br>
Best regards,<br>
Klaus<br>
<br>
<br>
<br>
On 06/09/18 11:02, Chavoosh Ghasemi wrote:<br>
> Is there any way to get the delay of links?<br>
> It seems you cannot get it through PointToPointChannel as GetDelay <br>
> method is protected.<br>
> <br>
> <br>
> P.S. The following code does not work<br>
>      auto t = <br>
> dynamic_cast<ns3::PointToPointChannel*>(&(*(transport->GetNetDevice()->GetChannel())));<br>
>      t->GetDelay();<br>
> <br>
> <br>
> <br>
> On Wed, Sep 5, 2018 at 2:00 PM Alex Afanasyev <<a href="mailto:aa@cs.fiu.edu" target="_blank">aa@cs.fiu.edu</a> <br>
> <mailto:<a href="mailto:aa@cs.fiu.edu" target="_blank">aa@cs.fiu.edu</a>>> wrote:<br>
> <br>
>     It calculates based on the Face "metric", which by default set to 1<br>
>     for each Face (= incidentally, resulting in hop count).  If you<br>
>     update Face metric with latency related metric represented as an<br>
>     integert (unfortunately, we don't have anything that is already<br>
>     available; patches welcome), you will get latency-based calculation<br>
>     of routes.<br>
> <br>
>     --<br>
>     Alex<br>
> <br>
>>     On Sep 5, 2018, at 4:47 PM, chavoosh ghasemi<br>
>>     <<a href="mailto:chavoosh.ghasemi.off@gmail.com" target="_blank">chavoosh.ghasemi.off@gmail.com</a><br>
>>     <mailto:<a href="mailto:chavoosh.ghasemi.off@gmail.com" target="_blank">chavoosh.ghasemi.off@gmail.com</a>>> wrote:<br>
>><br>
>>     Hi,<br>
>><br>
>>     Apparently, ndnGlobalRoutingHelper::CalculateRoutes() uses *hop<br>
>>     count* as a metric to compute the shortest paths (correct me if I<br>
>>     am wrong).<br>
>>     If that's the case, do we have any module (e.g. a helper) in<br>
>>     ndnSIM that calculates shortest paths based on link latency?<br>
>><br>
>>     Thanks,<br>
>>     /- Chavoosh/<br>
>><br>
>>     -- <br>
>>     /*Chavoosh Ghasemi*/<br>
>><br>
>>     Ph.D. Student in Computer Networking<br>
>>     University of Arizona - Computer Science Department*/<br>
>>     /*<br>
>>     */Address: Gould-Simpson 721B, /**/1040 E. 4th Street,<br>
>>     /*<br>
>>     */                 Tucson, AZ 85721<br>
>><br>
>>     "The /quieter/ you become, the /more you can hear"//*<br>
>>     _______________________________________________<br>
>>     ndnSIM mailing list<br>
>>     <a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a> <mailto:<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a>><br>
>>     <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
> <br>
>     ______________<br>
>     Alex Afanasyev<br>
>     Assistant Professor, SCIS, Florida International University<br>
>     11200 SW 8th Street, PG6 Room 140D, Miami, FL 33199<br>
>     phone: +1.305.348.4960 (office); email: <a href="mailto:aa@cs.fiu.edu" target="_blank">aa@cs.fiu.edu</a><br>
>     <mailto:<a href="mailto:aa@cs.fiu.edu" target="_blank">aa@cs.fiu.edu</a>><br>
>     web: <a href="https://users.cs.fiu.edu/~afanasyev/" rel="noreferrer" target="_blank">https://users.cs.fiu.edu/~afanasyev/</a><br>
>     <<a href="https://users.cs.fiu.edu/%7Eafanasyev/" rel="noreferrer" target="_blank">https://users.cs.fiu.edu/%7Eafanasyev/</a>><br>
> <br>
> <br>
> <br>
> <br>
> -- <br>
> /*Chavoosh Ghasemi*/<br>
> <br>
> Ph.D. Student in Computer Networking<br>
> University of Arizona - Computer Science Department*/<br>
> /*<br>
> */Address: Gould-Simpson 718, /**/1040 E. 4th Street,<br>
> /*<br>
> */                 Tucson, AZ 85721<br>
> <br>
> "The /quieter/ you become, the /more you can hear"//*<br>
> <br>
> <br>
> _______________________________________________<br>
> ndnSIM mailing list<br>
> <a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
> <br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><font color="#888888"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr" style="color:rgb(34,34,34)"><font color="#888888"><span style="color:rgb(0,0,153);font-family:georgia,serif"><i style="color:rgb(0,0,0)"><b>Chavoosh Ghasemi</b></i><br><span style="color:rgb(153,153,0)"><br><span style="color:rgb(153,0,0)">Ph.D. Student in Computer Networking</span></span></span></font><span style="color:rgb(153,0,0)"><span style="font-family:georgia,serif"> </span><span style="font-family:georgia,serif"><br>University of Arizona - Computer Science Department</span><font size="1"><b><i><br></i></b></font></span></div><div style="color:rgb(34,34,34)"><span style="color:rgb(204,0,0)"><font size="1"><b><i>Address: Gould-Simpson 718, </i></b></font><font size="1"><b><i>1040 E. 4th Street,<br></i></b></font></span></div><div dir="ltr" style="color:rgb(34,34,34)"><span style="color:rgb(153,0,0)"><font size="1"><b><i><span style="color:rgb(204,0,0)">                 Tucson, AZ 85721</span><br><br>"The <i>quieter</i> you become, the <i>more you can hear"</i></i></b></font></span></div></div></div></div></div>
</font></span>
</div></div></div></div></div></div>