<div dir="ltr"><div>Hi,<br></div>I forgot to mention I am using ndnSIM version 1.0<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 10:12 PM, Ayush Agarwal <span dir="ltr"><<a href="mailto:ayush0071@gmail.com" target="_blank">ayush0071@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello everyone,<br><br></div>I am using the following code to get hold of the queue object inside the forwarding strategy, OnData(....) function.<br><br>Ptr<NetDeviceFace> netDeviceFace = DynamicCast<NetDeviceFace> (inFace);<br>if (netDeviceFace == NULL) {  }<br>Ptr<NetDevice> nd = netDeviceFace->GetNetDevice ();<br>if (nd == NULL) {  }<br>PointerValue txQueueAttribute;<br>nd->GetAttribute ("TxQueue", txQueueAttribute);<br>Ptr<ns3::Queue> txQueue = txQueueAttribute.Get<ns3::Queue> ();<br>if (txQueue == 0) {    }<br><br></div>But I am getting a segmentation fault SIGSEV error while fetching the NetDevice object and the following errors for accessing queue.<br><br>../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:238:3: error: ‘PointerValue’ was not declared in this scope<br>    PointerValue txQueueAttribute;<br>   ^<br>../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:239:32: error: ‘txQueueAttribute’ was not declared in this scope<br>   nd->GetAttribute ("TxQueue", txQueueAttribute);<br>                                ^<br>../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:243:50: error: expected primary-expression before ‘>’ token<br>   Ptr<Queue> txQueue = txQueueAttribute.Get<Queue> ();<br>                                                  ^<br>../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:243:53: error: expected primary-expression before ‘)’ token<br>   Ptr<Queue> txQueue = txQueueAttribute.Get<Queue> ();<br><br><br></div>Can you please point me out where I am going wrong.<br><br><br></div><b>Thanks & Regards,</b><br><b style="font-size:12.8px">Ayush Agarwal<br></b><div style="font-size:12.8px"><b>Reseach Scholar, Computer Science<br></b></div><b style="font-size:12.8px">National Institute of Technology, Karnataka<br>Surathkal, India</b><br></div>
</blockquote></div><br></div>