--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/packet-burst.cc Thu Jun 03 13:34:09 2010 +0200
@@ -0,0 +1,125 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007,2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
+ */
+
+#include <stdint.h>
+#include <list>
+#include "ns3/packet.h"
+#include "packet-burst.h"
+#include "ns3/log.h"
+
+NS_LOG_COMPONENT_DEFINE ("PacketBurst");
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED ( PacketBurst);
+
+TypeId
+PacketBurst::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::PacketBurst")
+ .SetParent<Object> ()
+ .AddConstructor<PacketBurst> ()
+ ;
+ return tid;
+}
+
+PacketBurst::PacketBurst (void)
+{
+}
+
+PacketBurst::~PacketBurst (void)
+{
+ for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
+ != m_packets.end (); ++iter)
+ {
+ (*iter)->Unref ();
+
+ }
+}
+
+void
+PacketBurst::DoDispose (void)
+{
+ m_packets.clear ();
+}
+
+Ptr<PacketBurst> PacketBurst::Copy (void) const
+{
+ Ptr<PacketBurst> burst = Create<PacketBurst> ();
+
+ for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
+ != m_packets.end (); ++iter)
+ {
+ Ptr<Packet> packet = (*iter)->Copy ();
+ burst->AddPacket (packet);
+ }
+ return burst;
+}
+
+void
+PacketBurst::AddPacket (Ptr<Packet> packet)
+{
+ if (packet)
+ {
+ m_packets.push_back (packet);
+ }
+}
+
+std::list<Ptr<Packet> >
+PacketBurst::GetPackets (void) const
+{
+ return m_packets;
+}
+
+uint32_t
+PacketBurst::GetNPackets (void) const
+{
+ return m_packets.size ();
+}
+
+uint32_t
+PacketBurst::GetSize (void) const
+{
+ uint32_t size = 0;
+ for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
+ != m_packets.end (); ++iter)
+ {
+ Ptr<Packet> packet = *iter;
+ size += packet->GetSize ();
+ }
+ return size;
+}
+
+std::list<Ptr<Packet> >::const_iterator
+PacketBurst::Begin (void) const
+{
+ return m_packets.begin ();
+}
+
+std::list<Ptr<Packet> >::const_iterator
+PacketBurst::End (void) const
+{
+ return m_packets.end ();
+}
+
+
+} // namespace ns3
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/packet-burst.h Thu Jun 03 13:34:09 2010 +0200
@@ -0,0 +1,71 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007,2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
+ */
+
+#ifndef PACKET_BURST_H
+#define PACKET_BURST_H
+
+#include <stdint.h>
+#include <list>
+#include "ns3/object.h"
+
+namespace ns3 {
+
+class Packet;
+
+class PacketBurst : public Object
+{
+ /**
+ * \brief this class implement a burst as a list of packets
+ */
+public:
+ static TypeId GetTypeId (void);
+ PacketBurst (void);
+ virtual ~PacketBurst (void);
+ /**
+ * \return a copy the packetBurst
+ */
+ Ptr<PacketBurst> Copy (void) const;
+ /**
+ * \brief add a packet to the list of packet
+ * \param packet the packet to add
+ */
+ void AddPacket (Ptr<Packet> packet);
+ /**
+ * \return the list of packet of this burst
+ */
+ std::list<Ptr<Packet> > GetPackets (void) const;
+ /**
+ * \return the number of packet in the burst
+ */
+ uint32_t GetNPackets (void) const;
+ /**
+ * \return the size of the burst in byte (the size of all packets)
+ */
+ uint32_t GetSize (void) const;
+
+ std::list<Ptr<Packet> >::const_iterator Begin (void) const;
+ std::list<Ptr<Packet> >::const_iterator End (void) const;
+private:
+ void DoDispose (void);
+ std::list<Ptr<Packet> > m_packets;
+};
+} // namespace ns3
+
+#endif /* PACKET_BURST */
--- a/src/common/wscript Wed Jun 02 11:14:06 2010 -0400
+++ b/src/common/wscript Thu Jun 03 13:34:09 2010 +0200
@@ -7,6 +7,7 @@
'packet-metadata.cc',
'packet-metadata-test.cc',
'packet.cc',
+ 'packet-burst.cc',
'chunk.cc',
'header.cc',
'trailer.cc',
@@ -36,6 +37,7 @@
'header.h',
'trailer.h',
'packet.h',
+ 'packet-burst.h',
'packet-metadata.h',
'data-rate.h',
'error-model.h',
--- a/src/devices/wimax/bs-net-device.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-net-device.cc Thu Jun 03 13:34:09 2010 +0200
@@ -26,7 +26,7 @@
#include "bs-uplink-scheduler.h"
#include "bs-net-device.h"
#include "wimax-phy.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "ss-record.h"
#include "bs-scheduler.h"
#include "wimax-mac-queue.h"
--- a/src/devices/wimax/bs-scheduler-rtps.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler-rtps.cc Thu Jun 03 13:34:09 2010 +0200
@@ -22,7 +22,7 @@
#include "bs-scheduler-rtps.h"
#include "ns3/simulator.h"
#include "bs-net-device.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "cid.h"
#include "wimax-mac-header.h"
#include "ss-record.h"
--- a/src/devices/wimax/bs-scheduler-rtps.h Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler-rtps.h Thu Jun 03 13:34:09 2010 +0200
@@ -27,7 +27,7 @@
#include <list>
#include "ns3/packet.h"
#include "wimax-phy.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "dl-mac-messages.h"
#include "bs-scheduler.h"
--- a/src/devices/wimax/bs-scheduler-simple.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler-simple.cc Thu Jun 03 13:34:09 2010 +0200
@@ -21,7 +21,7 @@
#include "bs-scheduler-simple.h"
#include "ns3/simulator.h"
#include "bs-net-device.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "cid.h"
#include "wimax-mac-header.h"
#include "ss-record.h"
--- a/src/devices/wimax/bs-scheduler-simple.h Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler-simple.h Thu Jun 03 13:34:09 2010 +0200
@@ -26,7 +26,7 @@
#include <list>
#include "ns3/packet.h"
#include "wimax-phy.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "dl-mac-messages.h"
#include "bs-scheduler.h"
--- a/src/devices/wimax/bs-scheduler.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler.cc Thu Jun 03 13:34:09 2010 +0200
@@ -21,7 +21,7 @@
#include "bs-scheduler.h"
#include "ns3/simulator.h"
#include "bs-net-device.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "cid.h"
#include "wimax-mac-header.h"
#include "ss-record.h"
--- a/src/devices/wimax/bs-scheduler.h Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/bs-scheduler.h Thu Jun 03 13:34:09 2010 +0200
@@ -26,7 +26,7 @@
#include <list>
#include "ns3/packet.h"
#include "wimax-phy.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "dl-mac-messages.h"
#include "service-flow.h"
--- a/src/devices/wimax/packet-burst.cc Wed Jun 02 11:14:06 2010 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007,2008 INRIA
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
- */
-
-#include <stdint.h>
-#include <list>
-#include "ns3/packet.h"
-#include "packet-burst.h"
-#include "ns3/log.h"
-
-NS_LOG_COMPONENT_DEFINE ("PacketBurst");
-
-namespace ns3 {
-
-NS_OBJECT_ENSURE_REGISTERED ( PacketBurst);
-
-TypeId
-PacketBurst::GetTypeId (void)
-{
- static TypeId tid = TypeId ("ns3::PacketBurst")
- .SetParent<Object> ()
- .AddConstructor<PacketBurst> ()
- ;
- return tid;
-}
-
-PacketBurst::PacketBurst (void)
-{
-}
-
-PacketBurst::~PacketBurst (void)
-{
- for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
- != m_packets.end (); ++iter)
- {
- (*iter)->Unref ();
-
- }
-}
-
-void
-PacketBurst::DoDispose (void)
-{
- m_packets.clear ();
-}
-
-Ptr<PacketBurst> PacketBurst::Copy (void) const
-{
- Ptr<PacketBurst> burst = Create<PacketBurst> ();
-
- for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
- != m_packets.end (); ++iter)
- {
- Ptr<Packet> packet = (*iter)->Copy ();
- burst->AddPacket (packet);
- }
- return burst;
-}
-
-void
-PacketBurst::AddPacket (Ptr<Packet> packet)
-{
- if (packet)
- {
- m_packets.push_back (packet);
- }
-}
-
-std::list<Ptr<Packet> >
-PacketBurst::GetPackets (void) const
-{
- return m_packets;
-}
-
-uint32_t
-PacketBurst::GetNPackets (void) const
-{
- return m_packets.size ();
-}
-
-uint32_t
-PacketBurst::GetSize (void) const
-{
- uint32_t size = 0;
- for (std::list<Ptr<Packet> >::const_iterator iter = m_packets.begin (); iter
- != m_packets.end (); ++iter)
- {
- Ptr<Packet> packet = *iter;
- size += packet->GetSize ();
- }
- return size;
-}
-
-std::list<Ptr<Packet> >::const_iterator
-PacketBurst::Begin (void) const
-{
- return m_packets.begin ();
-}
-
-std::list<Ptr<Packet> >::const_iterator
-PacketBurst::End (void) const
-{
- return m_packets.end ();
-}
-
-
-} // namespace ns3
-
-
--- a/src/devices/wimax/packet-burst.h Wed Jun 02 11:14:06 2010 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007,2008 INRIA
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
- */
-
-#ifndef PACKET_BURST_H
-#define PACKET_BURST_H
-
-#include <stdint.h>
-#include <list>
-#include "ns3/object.h"
-
-namespace ns3 {
-
-class Packet;
-
-class PacketBurst : public Object
-{
- /**
- * \brief this class implement a burst as a list of packets
- */
-public:
- static TypeId GetTypeId (void);
- PacketBurst (void);
- virtual ~PacketBurst (void);
- /**
- * \return a copy the packetBurst
- */
- Ptr<PacketBurst> Copy (void) const;
- /**
- * \brief add a packet to the list of packet
- * \param packet the packet to add
- */
- void AddPacket (Ptr<Packet> packet);
- /**
- * \return the list of packet of this burst
- */
- std::list<Ptr<Packet> > GetPackets (void) const;
- /**
- * \return the number of packet in the burst
- */
- uint32_t GetNPackets (void) const;
- /**
- * \return the size of the burst in byte (the size of all packets)
- */
- uint32_t GetSize (void) const;
-
- std::list<Ptr<Packet> >::const_iterator Begin (void) const;
- std::list<Ptr<Packet> >::const_iterator End (void) const;
-private:
- void DoDispose (void);
- std::list<Ptr<Packet> > m_packets;
-};
-} // namespace ns3
-
-#endif /* PACKET_BURST */
--- a/src/devices/wimax/send-params.h Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/send-params.h Thu Jun 03 13:34:09 2010 +0200
@@ -57,7 +57,7 @@
#define OFDM_SEND_PARAMS_H
#include <stdint.h>
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
namespace ns3 {
--- a/src/devices/wimax/simple-ofdm-wimax-phy.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/simple-ofdm-wimax-phy.cc Thu Jun 03 13:34:09 2010 +0200
@@ -28,7 +28,7 @@
#include "wimax-net-device.h"
#include "simple-ofdm-wimax-phy.h"
#include "wimax-channel.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "wimax-mac-header.h"
#include "simple-ofdm-wimax-channel.h"
#include "ns3/trace-source-accessor.h"
--- a/src/devices/wimax/ss-net-device.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/ss-net-device.cc Thu Jun 03 13:34:09 2010 +0200
@@ -25,7 +25,7 @@
#include "ns3/node.h"
#include "ss-net-device.h"
#include "wimax-phy.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include <algorithm>
#include "dl-mac-messages.h"
#include "ul-mac-messages.h"
--- a/src/devices/wimax/ss-scheduler.h Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/ss-scheduler.h Thu Jun 03 13:34:09 2010 +0200
@@ -25,7 +25,7 @@
#include <stdint.h>
#include "ns3/packet.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "wimax-phy.h"
#include "wimax-mac-header.h"
--- a/src/devices/wimax/wimax-net-device.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/wimax-net-device.cc Thu Jun 03 13:34:09 2010 +0200
@@ -27,7 +27,7 @@
#include "ns3/packet.h"
#include "wimax-net-device.h"
#include "wimax-channel.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "burst-profile-manager.h"
#include <list>
#include "send-params.h"
--- a/src/devices/wimax/wimax-phy.cc Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/wimax-phy.cc Thu Jun 03 13:34:09 2010 +0200
@@ -24,7 +24,7 @@
#include "wimax-net-device.h"
#include "wimax-phy.h"
#include "wimax-channel.h"
-#include "packet-burst.h"
+#include "ns3/packet-burst.h"
#include "ns3/trace-source-accessor.h"
#include "ns3/pointer.h"
#include "ns3/uinteger.h"
--- a/src/devices/wimax/wscript Wed Jun 02 11:14:06 2010 -0400
+++ b/src/devices/wimax/wscript Thu Jun 03 13:34:09 2010 +0200
@@ -8,7 +8,6 @@
'bs-net-device.cc',
'ss-net-device.cc',
'wimax-mac-header.cc',
- 'packet-burst.cc',
'wimax-phy.cc',
'wimax-channel.cc',
'ofdm-downlink-frame-prefix.cc',
@@ -79,7 +78,6 @@
'simple-ofdm-wimax-channel.h',
'send-params.h',
'service-flow.h',
- 'packet-burst.h',
'ss-manager.h',
'connection-manager.h',
'wimax-mac-header.h',