fixed bug 1057 default tip
authorGiuseppe Piro <g.piro@poliba.it>
Thu Mar 24 20:25:00 2011 +0100 (14 months ago)
changeset 6883d2770ff543f7
parent 6882 7997b1b09abd
fixed bug 1057
src/lte/examples/lte-multiple-flows.cc
src/lte/model/lte-mac-header.cc
src/lte/model/simple-packet-scheduler.cc
src/wimax/model/ipcs-classifier-record.cc
     1.1 --- a/src/lte/examples/lte-multiple-flows.cc	Tue Mar 08 18:06:49 2011 +0100
     1.2 +++ b/src/lte/examples/lte-multiple-flows.cc	Thu Mar 24 20:25:00 2011 +0100
     1.3 @@ -126,27 +126,29 @@
     1.4  
     1.5    udpServer_1 = UdpServerHelper (100);
     1.6    serverApp_1 = udpServer_1.Install (ueNodes.Get (0));
     1.7 -  serverApp_1.Start (Seconds (0.02));
     1.8 -  serverApp_1.Stop (Seconds (2));
     1.9 +  serverApp_1.Start (Seconds (0.01));
    1.10 +  serverApp_1.Stop (Seconds (2.));
    1.11  
    1.12    udpClient_1 = UdpClientHelper (UEinterfaces.GetAddress (0), 100);
    1.13    udpClient_1.SetAttribute ("MaxPackets", UintegerValue (1200));
    1.14    udpClient_1.SetAttribute ("Interval", TimeValue (Seconds (0.12)));
    1.15 -  udpClient_1.SetAttribute ("PacketSize", UintegerValue (800));
    1.16 +  udpClient_1.SetAttribute ("PacketSize", UintegerValue (100));
    1.17    clientApp_1 = udpClient_1.Install (enbNodes.Get (0));
    1.18 -  clientApp_1.Start (Seconds (0.01));
    1.19 -  clientApp_1.Stop (Seconds (2));
    1.20 +  clientApp_1.Start (Seconds (0.2));
    1.21 +  clientApp_1.Stop (Seconds (2.));
    1.22  
    1.23    Ptr<RadioBearerInstance> bearer_1 = CreateObject<RadioBearerInstance> ();
    1.24    bearer_1->SetBearerDirection (RadioBearerInstance::DIRECTION_TYPE_DL);
    1.25    bearer_1->SetBearerType (RadioBearerInstance::BEARER_TYPE_DRB);
    1.26 -  IpcsClassifierRecord *ipcs_1 = new IpcsClassifierRecord (UEinterfaces.GetAddress (0),
    1.27 -                                                                     "255.255.255.0",
    1.28 -                                                                     ENBinterface.GetAddress (0),
    1.29 -                                                                     "255.255.255.0",
    1.30 -                                                                     100, 100, 0, 10000, 17, 1); 
    1.31 +
    1.32 +  IpcsClassifierRecord *ipcs_1 = new IpcsClassifierRecord (ENBinterface.GetAddress (0),
    1.33 +                                                           "255.255.255.0",
    1.34 +                                                           UEinterfaces.GetAddress (0),
    1.35 +                                                           "255.255.255.0",
    1.36 +                                                           0, 65535, 100, 100, 17, 1);  
    1.37 +
    1.38    bearer_1->SetIpcsClassifierRecord (ipcs_1);
    1.39 -  enb->GetRrcEntity ()->AddDownlinkNgbrBearer (bearer_1);
    1.40 +  enb->GetRrcEntity ()->AddDownlinkGbrBearer (bearer_1);
    1.41  
    1.42  
    1.43    
    1.44 @@ -160,27 +162,29 @@
    1.45  
    1.46    udpServer_2 = UdpServerHelper (100);
    1.47    serverApp_2 = udpServer_2.Install (ueNodes.Get (1));
    1.48 -  serverApp_2.Start (Seconds (0.02));
    1.49 +  serverApp_2.Start (Seconds (0.01));
    1.50    serverApp_2.Stop (Seconds (2));
    1.51  
    1.52    udpClient_2 = UdpClientHelper (UEinterfaces.GetAddress (1), 100);
    1.53    udpClient_2.SetAttribute ("MaxPackets", UintegerValue (1200));
    1.54    udpClient_2.SetAttribute ("Interval", TimeValue (Seconds (0.12)));
    1.55 -  udpClient_2.SetAttribute ("PacketSize", UintegerValue (800));
    1.56 +  udpClient_2.SetAttribute ("PacketSize", UintegerValue (200));
    1.57    clientApp_2 = udpClient_2.Install (enbNodes.Get (0));
    1.58 -  clientApp_2.Start (Seconds (0.011));
    1.59 +  clientApp_2.Start (Seconds (0.3));
    1.60    clientApp_2.Stop (Seconds (2));
    1.61  
    1.62    Ptr<RadioBearerInstance> bearer_2 = CreateObject<RadioBearerInstance> ();
    1.63    bearer_2->SetBearerDirection (RadioBearerInstance::DIRECTION_TYPE_DL);
    1.64    bearer_2->SetBearerType (RadioBearerInstance::BEARER_TYPE_DRB);
    1.65 -  IpcsClassifierRecord *ipcs_2 = new IpcsClassifierRecord (UEinterfaces.GetAddress (1),
    1.66 -                                                                     "255.255.255.0",
    1.67 -                                                                     ENBinterface.GetAddress (0),
    1.68 -                                                                     "255.255.255.0",
    1.69 -                                                                     100, 100, 0, 10000, 17, 1); 
    1.70 +
    1.71 +  IpcsClassifierRecord *ipcs_2 = new IpcsClassifierRecord (ENBinterface.GetAddress (0),
    1.72 +                                                           "255.255.255.0",
    1.73 +                                                           UEinterfaces.GetAddress (1),
    1.74 +                                                           "255.255.255.0",
    1.75 +                                                           0, 65535, 100, 100, 17, 1);
    1.76 +
    1.77    bearer_2->SetIpcsClassifierRecord (ipcs_2);
    1.78 -  enb->GetRrcEntity ()->AddDownlinkNgbrBearer (bearer_2);
    1.79 +  enb->GetRrcEntity ()->AddDownlinkGbrBearer (bearer_2);
    1.80  
    1.81  
    1.82  
    1.83 @@ -193,25 +197,27 @@
    1.84  
    1.85    udpServer_3 = UdpServerHelper (100);
    1.86    serverApp_3 = udpServer_3.Install (ueNodes.Get (2));
    1.87 -  serverApp_3.Start (Seconds (0.02));
    1.88 +  serverApp_3.Start (Seconds (0.01));
    1.89    serverApp_3.Stop (Seconds (2));
    1.90  
    1.91    udpClient_3 = UdpClientHelper (UEinterfaces.GetAddress (2), 100);
    1.92    udpClient_3.SetAttribute ("MaxPackets", UintegerValue (1200));
    1.93    udpClient_3.SetAttribute ("Interval", TimeValue (Seconds (0.12)));
    1.94 -  udpClient_3.SetAttribute ("PacketSize", UintegerValue (800));
    1.95 -  clientApp_3 = udpClient_2.Install (enbNodes.Get (0));
    1.96 -  clientApp_3.Start (Seconds (0.011));
    1.97 +  udpClient_3.SetAttribute ("PacketSize", UintegerValue (300));
    1.98 +  clientApp_3 = udpClient_3.Install (enbNodes.Get (0));
    1.99 +  clientApp_3.Start (Seconds (0.4));
   1.100    clientApp_3.Stop (Seconds (2));
   1.101  
   1.102    Ptr<RadioBearerInstance> bearer_3 = CreateObject<RadioBearerInstance> ();
   1.103    bearer_3->SetBearerDirection (RadioBearerInstance::DIRECTION_TYPE_DL);
   1.104    bearer_3->SetBearerType (RadioBearerInstance::BEARER_TYPE_DRB);
   1.105 -  IpcsClassifierRecord *ipcs_3 = new IpcsClassifierRecord (UEinterfaces.GetAddress (2),
   1.106 -                                                                     "255.255.255.0",
   1.107 -                                                                     ENBinterface.GetAddress (0),
   1.108 -                                                                     "255.255.255.0",
   1.109 -                                                                     100, 100, 0, 10000, 17, 1); 
   1.110 +
   1.111 +  IpcsClassifierRecord *ipcs_3 = new IpcsClassifierRecord (ENBinterface.GetAddress (0),
   1.112 +                                                           "255.255.255.0",
   1.113 +                                                           UEinterfaces.GetAddress (2),
   1.114 +                                                           "255.255.255.0",
   1.115 +                                                           0, 65535, 100, 100, 17, 1);
   1.116 +
   1.117    bearer_3->SetIpcsClassifierRecord (ipcs_3);
   1.118    enb->GetRrcEntity ()->AddDownlinkNgbrBearer (bearer_3);
   1.119  
     2.1 --- a/src/lte/model/lte-mac-header.cc	Tue Mar 08 18:06:49 2011 +0100
     2.2 +++ b/src/lte/model/lte-mac-header.cc	Thu Mar 24 20:25:00 2011 +0100
     2.3 @@ -48,7 +48,7 @@
     2.4  uint32_t
     2.5  LteMacHeader::GetSerializedSize (void) const
     2.6  {
     2.7 -  return 13;
     2.8 +  return 12;
     2.9  }
    2.10  
    2.11  
     3.1 --- a/src/lte/model/simple-packet-scheduler.cc	Tue Mar 08 18:06:49 2011 +0100
     3.2 +++ b/src/lte/model/simple-packet-scheduler.cc	Thu Mar 24 20:25:00 2011 +0100
     3.3 @@ -83,7 +83,6 @@
     3.4  
     3.5    
     3.6    //This scheduler takes one packet from each bearer
     3.7 -
     3.8    std::vector< Ptr<RadioBearerInstance> >::iterator it;
     3.9    
    3.10    //default bearer
    3.11 @@ -97,10 +96,10 @@
    3.12    for (it = enb->GetRrcEntity ()->GetDownlinkGbrBearers ()->begin (); 
    3.13        it != enb->GetRrcEntity ()->GetDownlinkGbrBearers ()->end (); it++)
    3.14      {
    3.15 -      if ((*it)->GetQueue ()->IsEmpty ())
    3.16 +      if (!(*it)->GetQueue ()->IsEmpty ())
    3.17          {
    3.18            // Get the first packet form the queue.
    3.19 -          Ptr<Packet> p = enb->GetRrcEntity ()->GetDownlinkNgbrBearers ()->at(0)->GetRlcEntity ()->Dequeue ();
    3.20 +          Ptr<Packet> p = (*it)->GetRlcEntity ()->Dequeue ();
    3.21            pb->AddPacket (p);
    3.22          }
    3.23      }
    3.24 @@ -109,10 +108,10 @@
    3.25    for (it = enb->GetRrcEntity ()->GetDownlinkNgbrBearers ()->begin (); 
    3.26        it != enb->GetRrcEntity ()->GetDownlinkNgbrBearers ()->end (); it++)
    3.27      {
    3.28 -      if ((*it)->GetQueue ()->IsEmpty ())
    3.29 +      if (!(*it)->GetQueue ()->IsEmpty ())
    3.30          {
    3.31            // Get the first packet form the queue.
    3.32 -          Ptr<Packet> p = enb->GetRrcEntity ()->GetDownlinkNgbrBearers ()->at(0)->GetRlcEntity ()->Dequeue ();
    3.33 +          Ptr<Packet> p = (*it)->GetRlcEntity ()->Dequeue ();
    3.34            pb->AddPacket (p);
    3.35          }
    3.36      }
     4.1 --- a/src/wimax/model/ipcs-classifier-record.cc	Tue Mar 08 18:06:49 2011 +0100
     4.2 +++ b/src/wimax/model/ipcs-classifier-record.cc	Thu Mar 24 20:25:00 2011 +0100
     4.3 @@ -224,7 +224,7 @@
     4.4    for (std::vector<struct ipv4Addr>::const_iterator iter = m_srcAddr.begin (); iter != m_srcAddr.end (); ++iter)
     4.5      {
     4.6        NS_LOG_INFO ("src addr check match: pkt=" << srcAddress << " cls=" << (*iter).Address << "/" << (*iter).Mask);
     4.7 -      if (srcAddress.CombineMask ((*iter).Mask) == (*iter).Address)
     4.8 +      if (srcAddress == (*iter).Address)
     4.9          {
    4.10            return true;
    4.11          }
    4.12 @@ -239,7 +239,7 @@
    4.13    for (std::vector<struct ipv4Addr>::const_iterator iter = m_dstAddr.begin (); iter != m_dstAddr.end (); ++iter)
    4.14      {
    4.15        NS_LOG_INFO ("dst addr check match: pkt=" << dstAddress << " cls=" << (*iter).Address << "/" << (*iter).Mask);
    4.16 -      if (dstAddress.CombineMask ((*iter).Mask) == (*iter).Address)
    4.17 +      if (dstAddress == (*iter).Address)
    4.18          {
    4.19            return true;
    4.20          }