<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi llya!<br>
      I want to print the number of filled elements in queue in an
      interface in a specific time, not original (predefined) size of
      the queue. I think, i posted wrong title for my question :-)<br>
      I could not find related attribute in your suggested link. I found
      these attributes: <b style="color: rgb(0, 0, 0); font-family:
        'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size:
        12px; font-style: normal; font-variant: normal; letter-spacing:
        normal; line-height: 15px; orphans: auto; text-align: left;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);">Mode, </b><b
        style="color: rgb(0, 0, 0); font-family: 'Lucida Grande',
        Verdana, Geneva, Arial, sans-serif; font-size: 12px; font-style:
        normal; font-variant: normal; letter-spacing: normal;
        line-height: 15px; orphans: auto; text-align: left; text-indent:
        0px; text-transform: none; white-space: normal; widows: auto;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);">MaxPackets, </b><b
        style="color: rgb(0, 0, 0); font-family: 'Lucida Grande',
        Verdana, Geneva, Arial, sans-serif; font-size: 12px; font-style:
        normal; font-variant: normal; letter-spacing: normal;
        line-height: 15px; orphans: auto; text-align: left; text-indent:
        0px; text-transform: none; white-space: normal; widows: auto;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);">MaxBytes</b><br>
      <br>
      Is there any suggestion?<br>
      <br>
      <br>
      Thank you in advance.<br>
      <br>
      /Amin<br>
      <br>
      On 12/05/2013 07:59 ب.ظ, Ilya Moiseenko wrote:<br>
    </div>
    <blockquote cite="mid:47A853E0-017A-4981-8E20-B04905415746@ucla.edu"
      type="cite">
      <pre wrap="">Hi Amin

1) m_maxPackets is indeed private.
However, you can access this value by attribute named “MaxPackets"
See <a class="moz-txt-link-freetext" href="http://www.nsnam.org/docs/release/3.18/doxygen/classns3_1_1_drop_tail_queue.html">http://www.nsnam.org/docs/release/3.18/doxygen/classns3_1_1_drop_tail_queue.html</a> for details

2) Technically you can do this in NS3. And in real life routers can have different queue sizes. 


Ilya

On Dec 4, 2013, at 2:35 AM, Amin Karami <a class="moz-txt-link-rfc2396E" href="mailto:amin@ac.upc.edu"><amin@ac.upc.edu></a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Hi Alex,
I am going to print Queue length in a specific interface of a router. I wrote below function:

void PeriodicStatsPrinter (Ptr<Node> node, Time next)
Ptr<ndn::Pit> pit = node->GetObject<ndn::Pit> ();
Ptr<Channel> CH = node->GetDevice(2)->GetChannel(); \\ 2nd interface of the node
Ptr<NetDevice> toDev = CH->GetDevice (1); \\ access to its queue
PointerValue txQueue;
toDev->GetAttribute ("TxQueue", txQueue);
std::cout << Simulator::Now ().ToDouble (Time::S) << "\t"
<< Names::FindName (node) << "\t"
<< "Max Packets of Queue: " << txQueue.Get<DropTailQueue> ()->m_maxPackets << "\n";

1- But, i faced with this error:
../scratch/RTT/RTT.cc: In function ‘void PeriodicStatsPrinter(ns3::Ptr<ns3::Node>, ns3::Time)’:
../scratch/RTT/RTT.cc:44:6: error: expected primary-expression before ‘<<’ token
./ns3/drop-tail-queue.h:68:12: error: ‘uint32_t ns3::DropTailQueue::m_maxPackets’ is private
../scratch/RTT/RTT.cc:44:58: error: within this context

2- Could i define two Queue lengths for a specific interface in routers? from inside and outside of a link. Or both should be equal?


/Amin
_______________________________________________
ndnSIM mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a>
<a class="moz-txt-link-freetext" href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
  </body>
</html>