137    if (mode == QueueSizeUnit::BYTES)
 
  140        qSize = qSize * modeSize;
 
  146        "Verify that we can actually set the attribute MaxSize");
 
  149                          "Verify that we can actually set the attribute Burst");
 
  152                          "Verify that we can actually set the attribute Mtu");
 
  155                          "Verify that we can actually set the attribute Rate");
 
  158                          "Verify that we can actually set the attribute PeakRate");
 
  176                          "There should be no packets in there");
 
  180                          "There should be one packet in there");
 
  184                          "There should be two packets in there");
 
  188                          "There should be three packets in there");
 
  192                          "There should be four packets in there");
 
  196                          "There should still be four packets in there as this enqueue cannot " 
  197                          "happen since QueueLimit will be exceeded");
 
  202                          "The first token bucket should be full");
 
  203    item = queue->Dequeue();
 
  207                          "There should be three packets in there");
 
  211                          "The number of tokens in the first bucket should be one pktSize lesser");
 
  213    item = queue->Dequeue();
 
  217                          "There should be two packets in there");
 
  220                          "Was this the second packet ?");
 
  223                          "The number of tokens in the first bucket should be two pktSizes lesser");
 
  225    item = queue->Dequeue();
 
  229                          "There should be one packet in there");
 
  232        queue->GetFirstBucketTokens(),
 
  234        "The number of tokens in the first bucket should be three pktSizes lesser");
 
  236    item = queue->Dequeue();
 
  240                          "There should be zero packet in there");
 
  243                          "Was this the fourth packet ?");
 
  245        queue->GetFirstBucketTokens(),
 
  247        "The number of tokens in the first bucket should be four pktSizes lesser");
 
  259    if (mode == QueueSizeUnit::BYTES)
 
  262        qSize = qSize * modeSize;
 
  268        "Verify that we can actually set the attribute MaxSize");
 
  271                          "Verify that we can actually set the attribute Burst");
 
  274                          "Verify that we can actually set the attribute Mtu");
 
  277                          "Verify that we can actually set the attribute Rate");
 
  280                          "Verify that we can actually set the attribute PeakRate");
 
  284    for (
uint32_t i = 1; i <= nPkt; i++)
 
  294    for (
uint32_t i = 1; i <= nPkt; i++)
 
  301                            "No packet should be blocked");
 
  321    txDevA->SetChannel(channelA);
 
  322    rxDevA->SetChannel(channelA);
 
  323    txDevA->SetNode(nodesA.
Get(0));
 
  324    rxDevA->SetNode(nodesA.
Get(1));
 
  326    dest = txDevA->GetAddress();
 
  330    tcA->SetRootQueueDiscOnDevice(txDevA, queue);
 
  338    if (mode == QueueSizeUnit::BYTES)
 
  341        qSize = qSize * modeSize;
 
  347        "Verify that we can actually set the attribute MaxSize");
 
  350                          "Verify that we can actually set the attribute Burst");
 
  353                          "Verify that we can actually set the attribute Mtu");
 
  356                          "Verify that we can actually set the attribute Rate");
 
  359                          "Verify that we can actually set the attribute PeakRate");
 
  362    for (
uint32_t i = 1; i <= nPkt; i++)
 
  372    for (
uint32_t i = 1; i <= nPkt; i++)
 
  381                                "10th packet should be blocked");
 
  390                                "This packet should not be blocked");
 
  415    txDevB->SetChannel(channelB);
 
  416    rxDevB->SetChannel(channelB);
 
  417    txDevB->SetNode(nodesB.
Get(0));
 
  418    rxDevB->SetNode(nodesB.
Get(1));
 
  420    dest = txDevB->GetAddress();
 
  424    tcB->SetRootQueueDiscOnDevice(txDevB, queue);
 
  433    if (mode == QueueSizeUnit::BYTES)
 
  436        qSize = qSize * modeSize;
 
  442        "Verify that we can actually set the attribute MaxSize");
 
  445                          "Verify that we can actually set the attribute Burst");
 
  448                          "Verify that we can actually set the attribute Mtu");
 
  451                          "Verify that we can actually set the attribute Rate");
 
  454                          "Verify that we can actually set the attribute PeakRate");
 
  458    for (
uint32_t i = 1; i <= nPkt; i++)
 
  477    double nextDelay = (2 * delay) + 0.02; 
 
  478    for (
uint32_t i = 1; i <= nPkt; i++)
 
  487                                "1st packet should not be blocked");
 
  497                                "This packet should be blocked");