Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1136)

Unified Diff: src/stats/model/collector.h

Issue 245260043: DCF collectors
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/stats/model/collector.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/stats/model/collector.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2015 Bucknell University
+ *
+ * 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: Li Li (ll024@bucknell.edu)
+ */
+
+#ifndef COLLECTOR_H
+#define COLLECTOR_H
+
+#include "ns3/object.h"
+#include "ns3/nstime.h"
+#include "ns3/data-collection-object.h"
+#include "ns3/event-id.h"
+#include "ns3/type-id.h"
+#include "ns3/sequence-number.h"
+#include "ns3/nstime.h"
buherman 2015/06/29 08:53:53 Duplicate include statement.
+
+namespace ns3 {
+
+class Collector : public DataCollectionObject
+{
+public:
+ static TypeId GetTypeId (void);
+
+ Collector ();
+ virtual ~Collector ();
+
+ /**
+ * \brief Collects the double values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkDouble (double oldValue, double newValue) = 0;
+
+ /**
+ * \brief Collects the boolean values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkBoolean (bool oldValue, bool newValue);
buherman 2015/06/29 08:53:54 This method will convert from "true" to 1.0, and f
+
+ /**
+ * \brief Collects the uint32_t values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkUinteger32 (uint32_t oldValue, uint32_t newValue);
+
+ /**
+ * \brief Collects the uint16_t values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkUinteger16 (uint16_t oldValue, uint16_t newValue);
+
+ /**
+ * \brief Collects the uint8_t values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkUinteger8 (uint8_t oldValue, uint8_t newValue);
buherman 2015/06/29 08:53:54 How about TraceSinkUinteger64?
+
+ /**
+ * \brief Collects the SequenceNumber32 values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkSequenceNumber32 (SequenceNumber32 &oldValue, SequenceNumber32 &newValue);
buherman 2015/06/29 08:53:54 SequenceNumber32 & -> const SequenceNumber32 &
+
+ /**
+ * \brief Collects the Time values produced by the upstream probes
+ *
+ * \param oldValue previous value produced by a Probe
+ * \param newValue new value produced by a Probe
+ */
+ virtual void TraceSinkTime (Time &oldValue, Time &newValue);
buherman 2015/06/29 08:53:54 Add a note here that the input Time values are con
buherman 2015/06/29 08:53:54 Time & -> const Time &
+
+
+};
+
+
+} // namespace ns3
+
+
+#endif // COLLECTOR_H

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b