<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi Spyros,<br /> <br /> We intend to access the SINR/SNR in the forwarding strategy.<br /> <br /> 1) As i was going through the <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5">links</a> Spyros sent, i noticed that they use an interest or data object with API setTag. But we don't have access to those objects in the PHY (wifi) layer. So i'm not sure as to which object i should use the SetTag API. <strong>Should we pursue this line of thoughts?</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong>We also looked at</strong> <strong>ns3 related posts.</strong><br /> 2) So, we looked at ns3 related posts, which suggest that we need to attach the SNR value to the Packet in the PHY layer.<br /> We added a SINR packet tag in the src/wifi/model/wifi-phy.cc EndReceive() method using the following snippet:<br /> <br />   SnrTag tag;<br /> <br />   tag.Set(signalNoise.signal - signalNoise.noise);<br /> <br />   if (! packet->PeekPacketTag (tag)){<br /> <br />      packet->AddPacketTag (tag);<br /> <br />   }</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /> The implementation of the SINR packet tag is available at src/wifi/model/snr-tag.cc.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">But we get an error during reading this Tag in the forwarding strategy:</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>(); <strong>//(line of concern)</strong>                                     <br />ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                     <br />ns3::SnrTag tag;                                                                                      <br />if(packet->PeekPacketTag(tag)){                                                                      <br />        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br />       </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br />                                                                                                           <br />}</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong>Note: I think we get to get the right socket (check line of concern) using something similar to what they do in the application layer in ns3 (GetObject<OnOffApplication> ()->GetSocket ())</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Can you assist please? Let me know if you need more info.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks,</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Raj</div>
</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">-------------------------------------------------------------------<br /> FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@cs.ucla.edu</a>] <br /> SENT: Monday, July 23, 2018 9:43 PM<br /> TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu">tteixeira@umass.edu</a>><br /> CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a>><br /> SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5 <br /> <br /> Hi Thiago,<br /> <br /> I think we have converted our NS-3 tags to NDN Link Protocol (LP) tags.<br /> For more details, take a look at these commits (HopCount tag): <br /> <br /> <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4</a><br /> <br /> <br /> <a href="https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br /> <br /> <br /> Thanks, <br /> <br /> Spyridon (Spyros) Mastorakis<br /> Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" target="_blank" rel="noreferrer">http://cs.ucla.edu/~mastorakis/</a><br /> Internet Research Laboratory<br /> Computer Science Department<br /> UCLA <br /> <br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu">tteixeira@umass.edu</a>><br /> wrote:
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi Spyros,<br /> <br /> We intend to access the SINR/SNR in the forwarding strategy.<br /> <br /> 1) As i was going through the <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5">links</a> Spyros sent, i noticed that they use an interest or data object with API setTag. But we don't have access to those objects in the PHY (wifi) layer. So i'm not sure as to which object i should use the SetTag API.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /> <br /> 2) So, we looked at ns3 related posts, which suggest that we need to attach the SNR value to the Packet in the PHY layer.<br /> We added a SINR packet tag in the src/wifi/model/wifi-phy.cc EndReceive() method using the following snippet:<br /> <br />   SnrTag tag;<br /> <br />   tag.Set(signalNoise.signal - signalNoise.noise);<br /> <br />   if (! packet->PeekPacketTag (tag)){<br /> <br />      packet->AddPacketTag (tag);<br /> <br />   }</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /> The implementation of the SINR packet tag is available at src/wifi/model/snr-tag.cc.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">But we get an error during reading this Tag in the forwarding strategy:</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>();                                     <br />ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                     <br />ns3::SnrTag tag;                                                                                      <br />if(packet->PeekPacketTag(tag)){                                                                      <br />        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br />       </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br />                                                                                                           <br />}</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong>Note: I think we get to get the right socket using something similar to what they do in the application layer in ns3 (GetObject<OnOffApplication> ()->GetSocket ())</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Can you assist please?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks,</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Raj</div>
</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">-------------------------------------------------------------------<br /> FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@cs.ucla.edu</a>] <br /> SENT: Monday, July 23, 2018 9:43 PM<br /> TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu">tteixeira@umass.edu</a>><br /> CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a>><br /> SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5 <br /> <br /> Hi Thiago,<br /> <br /> I think we have converted our NS-3 tags to NDN Link Protocol (LP) tags.<br /> For more details, take a look at these commits (HopCount tag): <br /> <br /> <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4</a><br /> <br /> <br /> <a href="https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br /> <br /> <br /> Thanks, <br /> <br /> Spyridon (Spyros) Mastorakis<br /> Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" target="_blank" rel="noreferrer">http://cs.ucla.edu/~mastorakis/</a><br /> Internet Research Laboratory<br /> Computer Science Department<br /> UCLA <br /> <br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu">tteixeira@umass.edu</a>><br /> wrote: <br /> <br /> Hi all, <br /> <br /> We added a SINR packet tag in the src/wifi/model/wifi-phy.cc [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer">1</a>]<br /> EndReceive() method using the following snippet: <br /> <br /> SnrTag tag; <br /> <br /> tag.Set(signalNoise.signal - signalNoise.noise); <br /> <br /> if (! packet->PeekPacketTag (tag)){ <br /> <br /> packet->AddPacketTag (tag); <br /> <br /> } <br /> <br /> The implementation of the SINR packet tag is available at<br /> src/wifi/model/snr-tag.cc [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer">2</a>]. <br /> <br /> We would like to get the value of the tag in the forwarding strategy.<br /> Before ndnSIM 2.3, we could just use something like this: <br /> <br /> SnrTag tag; <br /> <br /> Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload()); <br /> <br /> payload->PeekPacketTag (tag); <br /> <br /> but in ndnSIM 2.5 we could not find an equivalent method. I think we<br /> need to convert the SINR tag to type ns3::ndn::ns3PacketTag, is that<br /> correct? <br /> <br /> Can you assist please? <br /> <br /> Thanks, <br /> <br /> Thiago <br /> <br /> _______________________________________________<br /> ndnSIM mailing list<br /> <a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br /> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a> [<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">3</a>]</blockquote>
<br />   <br /> <br /> Links:<br /> ------<br /> [1] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541</a><br /> [2] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br /> [3] <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div>
<br /> <br /> Hi all, <br /> <br /> We added a SINR packet tag in the src/wifi/model/wifi-phy.cc [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer">1</a>]<br /> EndReceive() method using the following snippet: <br /> <br /> SnrTag tag; <br /> <br /> tag.Set(signalNoise.signal - signalNoise.noise); <br /> <br /> if (! packet->PeekPacketTag (tag)){ <br /> <br /> packet->AddPacketTag (tag); <br /> <br /> } <br /> <br /> The implementation of the SINR packet tag is available at<br /> src/wifi/model/snr-tag.cc [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer">2</a>]. <br /> <br /> We would like to get the value of the tag in the forwarding strategy.<br /> Before ndnSIM 2.3, we could just use something like this: <br /> <br /> SnrTag tag; <br /> <br /> Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload()); <br /> <br /> payload->PeekPacketTag (tag); <br /> <br /> but in ndnSIM 2.5 we could not find an equivalent method. I think we<br /> need to convert the SINR tag to type ns3::ndn::ns3PacketTag, is that<br /> correct? <br /> <br /> Can you assist please? <br /> <br /> Thanks, <br /> <br /> Thiago <br /> <br /> _______________________________________________<br /> ndnSIM mailing list<br /> <a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br /> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a> [<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">3</a>]</blockquote>
<br />   <br /> <br /> Links:<br /> ------<br /> [1] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541</a><br /> [2] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br /> [3] <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div>
</blockquote>
</body></html>