--- a/src/internet/model/check-throughput-collector.cc Tue Mar 03 00:44:48 2015 -0500
+++ b/src/internet/model/check-throughput-collector.cc Tue Mar 03 01:04:17 2015 -0500
@@ -35,7 +35,7 @@
CheckThroughputCollector::GetTypeId(void)
{
static TypeId tid = TypeId("ns3::CheckThroughputCollector")
- .SetParent<Collector> ()
+ .SetParent<TimeDrivenCollector> ()
.AddConstructor<CheckThroughputCollector> ()
.AddTraceSource("Output",
"Series packet output",
--- a/src/internet/model/check-throughput-collector.h Tue Mar 03 00:44:48 2015 -0500
+++ b/src/internet/model/check-throughput-collector.h Tue Mar 03 01:04:17 2015 -0500
@@ -22,7 +22,6 @@
#ifndef CHECK_THROUGHPUT_COLLECTOR_H
#define CHECK_THROUGHPUT_COLLECTOR_H
-#include "ns3/collector.h"
#include "ns3/object.h"
#include "ns3/type-id.h"
#include "ns3/traced-value.h"
@@ -74,15 +73,16 @@
void ReceivePacket (Ptr<Packet> oldPacket, Ptr<Packet> packet);
protected:
+
+
+private:
/**
* Reports data to downstream trace sinks.
* \brief Reports data to downstream trace sinks. This method overwrites
* the base class method.
* \return void
*/
- virtual void DoReportData(void);
-
-private:
+ void DoReportData(void);
// total number of bytes received
uint32_t bytesTotal;
// total number of packets received
--- a/src/lte/model/ul-scheduling-collector.cc Tue Mar 03 00:44:48 2015 -0500
+++ b/src/lte/model/ul-scheduling-collector.cc Tue Mar 03 01:04:17 2015 -0500
@@ -44,7 +44,7 @@
UlSchedulingCollector::GetTypeId(void)
{
static TypeId tid = TypeId("ns3::UlSchedulingCollector")
- .SetParent<Collector> ()
+ .SetParent<DataCollectionObject> ()
.AddConstructor<UlSchedulingCollector> ()
.AddTraceSource("Output",
"The output data generated from the UlScheduling Trace Source",
@@ -101,16 +101,18 @@
}
//================================================
-// Function: DoReportData()
+// Function: ReportData()
//
// Outputs the data to the trace source
//================================================
void
-UlSchedulingCollector::DoReportData(void)
+UlSchedulingCollector::ReportData(void)
{
NS_LOG_FUNCTION(this);
-
+ if (!IsEnabled()) {
+ return;
+ }
m_output(m_time, m_imsi, m_cellId, m_frameNo, m_subframeNo, m_rnti, m_mcs, m_size);
}
--- a/src/lte/model/ul-scheduling-collector.h Tue Mar 03 00:44:48 2015 -0500
+++ b/src/lte/model/ul-scheduling-collector.h Tue Mar 03 01:04:17 2015 -0500
@@ -22,13 +22,13 @@
#define UL_SCHEDULING_COLLECTOR_H
#include "ns3/object.h"
-#include "ns3/collector.h"
+#include "ns3/data-collection-object.h"
#include "ns3/type-id.h"
#include "ns3/traced-value.h"
#include "ns3/basic-data-calculators.h"
namespace ns3{
-class UlSchedulingCollector : public Collector
+class UlSchedulingCollector : public DataCollectionObject
{
public:
static TypeId GetTypeId (void);
@@ -45,9 +45,8 @@
uint16_t FindCellIdFromEnbMac (std::string path, uint16_t rnti);
-protected:
- virtual void DoReportData(void);
private:
+ void ReportData(void);
TracedCallback<double, double, double, double, double, double, double, double> m_output;
void setInstances(double time, double imsi, double cellId, double frameNo, double subframeNo, double rnti, double mcs, double size){
--- a/src/stats/helper/basicstatsplot-helper.cc Tue Mar 03 00:44:48 2015 -0500
+++ b/src/stats/helper/basicstatsplot-helper.cc Tue Mar 03 01:04:17 2015 -0500
@@ -25,7 +25,6 @@
#include "basicstatsplot-helper.h"
#include "ns3/object-factory.h"
#include "ns3/ptr.h"
-#include "ns3/collector.h"
#include "ns3/gnuplot-aggregator.h"
#include "ns3/time-series-adaptor.h"
#include "ns3/log.h"
--- a/src/stats/helper/basicstatsplot-helper.h Tue Mar 03 00:44:48 2015 -0500
+++ b/src/stats/helper/basicstatsplot-helper.h Tue Mar 03 01:04:17 2015 -0500
@@ -27,7 +27,6 @@
#include "ns3/object-factory.h"
#include "ns3/ptr.h"
#include "ns3/probe.h"
-#include "ns3/collector.h"
#include "ns3/gnuplot-aggregator.h"
#include "ns3/time-series-adaptor.h"
#include "ns3/collectorplot-helper.h"
--- a/src/stats/helper/collectorplot-helper.h Tue Mar 03 00:44:48 2015 -0500
+++ b/src/stats/helper/collectorplot-helper.h Tue Mar 03 01:04:17 2015 -0500
@@ -27,7 +27,6 @@
#include "ns3/object-factory.h"
#include "ns3/ptr.h"
#include "ns3/probe.h"
-#include "ns3/collector.h"
#include "ns3/gnuplot-aggregator.h"
#include "ns3/time-series-adaptor.h"
#include "ns3/data-collection-object.h"
--- a/src/stats/model/moving-average-collector.cc Tue Mar 03 00:44:48 2015 -0500
+++ b/src/stats/model/moving-average-collector.cc Tue Mar 03 01:04:17 2015 -0500
@@ -42,7 +42,7 @@
MovingAverageCollector::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::MovingAverageCollector")
- .SetParent<Collector> ()
+ .SetParent<SteadyStateCollector> ()
.AddConstructor<MovingAverageCollector> ()
.AddAttribute("WindowSize", "The number of points (n) that are used to calculate the new mean.",
UintegerValue(3),
--- a/src/stats/model/moving-average-collector.h Tue Mar 03 00:44:48 2015 -0500
+++ b/src/stats/model/moving-average-collector.h Tue Mar 03 01:04:17 2015 -0500
@@ -25,7 +25,6 @@
#include "ns3/steady-state-collector.h"
#include "ns3/nstime.h"
#include "ns3/traced-value.h"
-#include "ns3/collector.h"
namespace ns3 {