View | Details | Raw Unified | Return to bug 938
Collapse All | Expand All

(-)a/src/core/helper/event-garbage-collector.h (-1 / +1 lines)
 Lines 27-33    Link Here 
27
namespace ns3 {
27
namespace ns3 {
28
28
29
/**
29
/**
30
 * \ingroup tools
30
 * \ingroup events
31
 *
31
 *
32
 * \brief An object that tracks scheduled events and automatically
32
 * \brief An object that tracks scheduled events and automatically
33
 * cancels them when it is destroyed.  It is useful in situations
33
 * cancels them when it is destroyed.  It is useful in situations
(-)a/src/stats/helper/file-helper.h (-11 / +11 lines)
 Lines 32-37    Link Here 
32
namespace ns3 {
32
namespace ns3 {
33
33
34
/**
34
/**
35
 * \ingroup stats
35
 * \brief Helper class used to put data values into a file.
36
 * \brief Helper class used to put data values into a file.
36
 **/
37
 **/
37
class FileHelper
38
class FileHelper
 Lines 304-320    Link Here 
304
  /// Heading line for the outputfile.
305
  /// Heading line for the outputfile.
305
  std::string m_heading;
306
  std::string m_heading;
306
307
307
  /// Format strings for C-style sprintf() function.
308
  std::string m_1dFormat;  //!< Format string for 1D format C-style sprintf() function.
308
  std::string m_1dFormat;
309
  std::string m_2dFormat;  //!< Format string for 2D format C-style sprintf() function.
309
  std::string m_2dFormat;
310
  std::string m_3dFormat;  //!< Format string for 3D format C-style sprintf() function.
310
  std::string m_3dFormat;
311
  std::string m_4dFormat;  //!< Format string for 4D format C-style sprintf() function.
311
  std::string m_4dFormat;
312
  std::string m_5dFormat;  //!< Format string for 5D format C-style sprintf() function.
312
  std::string m_5dFormat;
313
  std::string m_6dFormat;  //!< Format string for 6D format C-style sprintf() function.
313
  std::string m_6dFormat;
314
  std::string m_7dFormat;  //!< Format string for 7D format C-style sprintf() function.
314
  std::string m_7dFormat;
315
  std::string m_8dFormat;  //!< Format string for 8D format C-style sprintf() function.
315
  std::string m_8dFormat;
316
  std::string m_9dFormat;  //!< Format string for 9D format C-style sprintf() function.
316
  std::string m_9dFormat;
317
  std::string m_10dFormat; //!< Format string for 10D format C-style sprintf() function.
317
  std::string m_10dFormat;
318
318
319
}; // class FileHelper
319
}; // class FileHelper
320
320
(-)a/src/stats/helper/gnuplot-helper.h (+1 lines)
 Lines 33-38    Link Here 
33
namespace ns3 {
33
namespace ns3 {
34
34
35
/**
35
/**
36
 * \ingroup gnuplot
36
 * \brief Helper class used to make gnuplot plots.
37
 * \brief Helper class used to make gnuplot plots.
37
 **/
38
 **/
38
class GnuplotHelper
39
class GnuplotHelper
(-)a/src/stats/model/average.h (-9 / +5 lines)
 Lines 30-41    Link Here 
30
namespace ns3 {
30
namespace ns3 {
31
31
32
/**
32
/**
33
 * \defgroup tools Tools
33
 * \ingroup stats
34
 *
35
 */
36
37
/**
38
 * \ingroup tools
39
 *
34
 *
40
 * Simple average, min, max and std. deviation calculator
35
 * Simple average, min, max and std. deviation calculator
41
 *
36
 *
 Lines 106-114    Link Here 
106
  //\}
101
  //\}
107
102
108
private:
103
private:
109
  uint32_t m_size;
104
  uint32_t m_size; //!< Number of sampled data.
110
  T      m_min, m_max;
105
  T m_min; //!< Minimum value observed.
111
  MinMaxAvgTotalCalculator<double> m_varianceCalculator;
106
  T m_max; //!< Maximum value observed.
107
  MinMaxAvgTotalCalculator<double> m_varianceCalculator; //!< Variance calculator.
112
};
108
};
113
109
114
/// Print avg (err) [min, max]
110
/// Print avg (err) [min, max]
(-)a/src/stats/model/basic-data-calculators.h (-16 / +11 lines)
 Lines 27-37    Link Here 
27
namespace ns3 {
27
namespace ns3 {
28
28
29
/**
29
/**
30
 * \defgroup stats Statistics
31
 *
32
 */
33
34
/**
35
 * \ingroup stats
30
 * \ingroup stats
36
 * \class MinMaxAvgTotalCalculator
31
 * \class MinMaxAvgTotalCalculator
37
 * \brief Template class MinMaxAvgTotalCalculator
32
 * \brief Template class MinMaxAvgTotalCalculator
 Lines 102-120    Link Here 
102
protected:
97
protected:
103
  virtual void DoDispose (void);
98
  virtual void DoDispose (void);
104
99
105
  uint32_t m_count;      /// Count value of MinMaxAvgTotalCalculator
100
  uint32_t m_count;      //!< Count value of MinMaxAvgTotalCalculator
106
101
107
  T m_total;             /// Total value of MinMaxAvgTotalCalculator
102
  T m_total;             //!< Total value of MinMaxAvgTotalCalculator
108
  T m_squareTotal;       /// Sum of squares value of MinMaxAvgTotalCalculator
103
  T m_squareTotal;       //!< Sum of squares value of MinMaxAvgTotalCalculator
109
  T m_min;               /// Minimum value of MinMaxAvgTotalCalculator
104
  T m_min;               //!< Minimum value of MinMaxAvgTotalCalculator
110
  T m_max;               /// Maximum value of MinMaxAvgTotalCalculator
105
  T m_max;               //!< Maximum value of MinMaxAvgTotalCalculator
111
106
112
  double m_meanCurr;     /// Current mean of MinMaxAvgTotalCalculator
107
  double m_meanCurr;     //!< Current mean of MinMaxAvgTotalCalculator
113
  double m_sCurr;        /// Current s of MinMaxAvgTotalCalculator
108
  double m_sCurr;        //!< Current s of MinMaxAvgTotalCalculator
114
  double m_varianceCurr; /// Current variance of MinMaxAvgTotalCalculator
109
  double m_varianceCurr; //!< Current variance of MinMaxAvgTotalCalculator
115
110
116
  double m_meanPrev;     /// Previous mean of MinMaxAvgTotalCalculator
111
  double m_meanPrev;     //!< Previous mean of MinMaxAvgTotalCalculator
117
  double m_sPrev;        /// Previous s of MinMaxAvgTotalCalculator
112
  double m_sPrev;        //!< Previous s of MinMaxAvgTotalCalculator
118
113
119
  // end MinMaxAvgTotalCalculator
114
  // end MinMaxAvgTotalCalculator
120
};
115
};
 Lines 279-285    Link Here 
279
protected:
274
protected:
280
  virtual void DoDispose (void);
275
  virtual void DoDispose (void);
281
276
282
  T m_count; /// Count value of CounterCalculator
277
  T m_count; //!< Count value of CounterCalculator
283
278
284
  // end CounterCalculator
279
  // end CounterCalculator
285
};
280
};
(-)a/src/stats/model/boolean-probe.h (-1 / +7 lines)
 Lines 34-39    Link Here 
34
namespace ns3 {
34
namespace ns3 {
35
35
36
/**
36
/**
37
 * \ingroup probes
38
 *
37
 * This class is designed to probe an underlying ns3 TraceSource exporting
39
 * This class is designed to probe an underlying ns3 TraceSource exporting
38
 * a bool.  This probe exports a trace source "Output" of type bool.
40
 * a bool.  This probe exports a trace source "Output" of type bool.
39
 * The Output trace source emits a value when either the trace source
41
 * The Output trace source emits a value when either the trace source
 Lines 45-50    Link Here 
45
class BooleanProbe : public Probe
47
class BooleanProbe : public Probe
46
{
48
{
47
public:
49
public:
50
  /**
51
   * \brief Get the type ID.
52
   * \return the object TypeId
53
   */
48
  static TypeId GetTypeId ();
54
  static TypeId GetTypeId ();
49
  BooleanProbe ();
55
  BooleanProbe ();
50
  virtual ~BooleanProbe ();
56
  virtual ~BooleanProbe ();
 Lines 97-103    Link Here 
97
   */
103
   */
98
  void TraceSink (bool oldData, bool newData);
104
  void TraceSink (bool oldData, bool newData);
99
105
100
  TracedValue<bool> m_output;
106
  TracedValue<bool> m_output; //!< Output trace source.
101
};
107
};
102
108
103
} // namespace ns3
109
} // namespace ns3
(-)a/src/stats/model/data-calculator.h (-6 / +6 lines)
 Lines 26-32    Link Here 
26
#include "ns3/simulator.h"
26
#include "ns3/simulator.h"
27
27
28
namespace ns3 {
28
namespace ns3 {
29
extern const double NaN; /// Stored representation of NaN
29
extern const double NaN; //!< Stored representation of NaN
30
30
31
/**
31
/**
32
 * \brief true if x is NaN
32
 * \brief true if x is NaN
 Lines 166-181    Link Here 
166
  virtual void Output (DataOutputCallback &callback) const = 0;
166
  virtual void Output (DataOutputCallback &callback) const = 0;
167
167
168
protected:
168
protected:
169
  bool m_enabled;    /// Descendant classes *must* check & respect m_enabled!
169
  bool m_enabled;    //!< Descendant classes *must* check & respect m_enabled!
170
170
171
  std::string m_key;      /// Key value
171
  std::string m_key;      //!< Key value
172
  std::string m_context;  /// Context value
172
  std::string m_context;  //!< Context value
173
173
174
  virtual void DoDispose (void);
174
  virtual void DoDispose (void);
175
175
176
private:
176
private:
177
  EventId m_startEvent;
177
  EventId m_startEvent; //!< Start event
178
  EventId m_stopEvent;
178
  EventId m_stopEvent;  //!< Stop event
179
179
180
  // end class DataCalculator
180
  // end class DataCalculator
181
};
181
};
(-)a/src/stats/model/data-collection-object.h (+6 lines)
 Lines 27-32    Link Here 
27
namespace ns3 {
27
namespace ns3 {
28
28
29
/**
29
/**
30
 * \ingroup aggregator
31
 *
30
 * Base class for data collection framework objects.
32
 * Base class for data collection framework objects.
31
 *
33
 *
32
 * All data collection objects have 1) a string name, and 2) enabled
34
 * All data collection objects have 1) a string name, and 2) enabled
 Lines 35-40    Link Here 
35
class DataCollectionObject : public Object
37
class DataCollectionObject : public Object
36
{
38
{
37
public:
39
public:
40
  /**
41
   * \brief Get the type ID.
42
   * \return the object TypeId
43
   */
38
  static TypeId GetTypeId ();
44
  static TypeId GetTypeId ();
39
45
40
  DataCollectionObject ();
46
  DataCollectionObject ();
(-)a/src/stats/model/data-collector.h (-12 / +8 lines)
 Lines 28-37    Link Here 
28
28
29
namespace ns3 {
29
namespace ns3 {
30
30
31
/**
32
 * \ingroup stats
33
 *
34
 */
35
class DataCalculator;
31
class DataCalculator;
36
32
37
//------------------------------------------------------------
33
//------------------------------------------------------------
 Lines 46-52    Link Here 
46
typedef std::list<std::pair<std::string, std::string> > MetadataList;
42
typedef std::list<std::pair<std::string, std::string> > MetadataList;
47
43
48
/**
44
/**
49
 * \ingroup stats
45
 * \ingroup dataoutput
50
 * \class DataCollector
46
 * \class DataCollector
51
 * \brief Collects data 
47
 * \brief Collects data 
52
 */
48
 */
 Lines 144-157    Link Here 
144
  virtual void DoDispose ();
140
  virtual void DoDispose ();
145
141
146
private:
142
private:
147
  std::string m_experimentLabel;
143
  std::string m_experimentLabel; //!< Experiment label
148
  std::string m_strategyLabel;
144
  std::string m_strategyLabel;   //!< Strategy label
149
  std::string m_inputLabel;
145
  std::string m_inputLabel;      //!< Input label
150
  std::string m_runLabel;
146
  std::string m_runLabel;        //!< Run label
151
  std::string m_description;
147
  std::string m_description;     //!< Description label
152
148
153
  MetadataList m_metadata;
149
  MetadataList m_metadata;       //!< List of experiment metadata
154
  DataCalculatorList m_calcList;
150
  DataCalculatorList m_calcList; //!< List of data calculators
155
151
156
  // end class DataCollector
152
  // end class DataCollector
157
};
153
};
(-)a/src/stats/model/data-output-interface.h (-8 / +7 lines)
 Lines 32-42    Link Here 
32
//------------------------------------------------------------
32
//------------------------------------------------------------
33
//--------------------------------------------
33
//--------------------------------------------
34
/**
34
/**
35
 * \ingroup stats
35
 * \ingroup dataoutput
36
 * \class DataCollector
36
 *
37
 * \brief Abstract Data Output Interface class
37
 * \brief Abstract Data Output Interface class
38
 *
38
s */
39
 */
40
class DataOutputInterface : public Object {
39
class DataOutputInterface : public Object {
41
public:
40
public:
42
  DataOutputInterface();
41
  DataOutputInterface();
 Lines 50-56    Link Here 
50
49
51
  /**
50
  /**
52
   * Sets the DataOutputInterface prefix to the provided prefix
51
   * Sets the DataOutputInterface prefix to the provided prefix
53
   * \param File prefix as a string
52
   * \param prefix prefix as a string
54
   */
53
   */
55
  void SetFilePrefix (const std::string prefix);
54
  void SetFilePrefix (const std::string prefix);
56
  /**
55
  /**
 Lines 62-75    Link Here 
62
protected:
61
protected:
63
  virtual void DoDispose ();
62
  virtual void DoDispose ();
64
63
65
  std::string m_filePrefix; /// File prefix for the DataOutputInterface
64
  std::string m_filePrefix; //!< File prefix for the DataOutputInterface
66
65
67
  // end class DataOutputInterface
66
  // end class DataOutputInterface
68
};
67
};
69
68
70
/**
69
/**
71
 * \ingroup stats
70
 * \ingroup dataoutput
72
 * \class DataOutputCallback
71
 *
73
 * \brief Callback class for the DataOutput classes
72
 * \brief Callback class for the DataOutput classes
74
 *
73
 *
75
 */
74
 */
(-)a/src/stats/model/double-probe.h (-3 / +7 lines)
 Lines 34-39    Link Here 
34
namespace ns3 {
34
namespace ns3 {
35
35
36
/**
36
/**
37
 * \ingroup probes
38
 *
37
 * This class is designed to probe an underlying ns3 TraceSource exporting
39
 * This class is designed to probe an underlying ns3 TraceSource exporting
38
 * a double.  This probe exports a trace source "Output" of type double.
40
 * a double.  This probe exports a trace source "Output" of type double.
39
 * The Output trace source emits a value when either the trace source
41
 * The Output trace source emits a value when either the trace source
 Lines 45-50    Link Here 
45
class DoubleProbe : public Probe
47
class DoubleProbe : public Probe
46
{
48
{
47
public:
49
public:
50
  /**
51
   * \brief Get the type ID.
52
   * \return the object TypeId
53
   */
48
  static TypeId GetTypeId ();
54
  static TypeId GetTypeId ();
49
  DoubleProbe ();
55
  DoubleProbe ();
50
  virtual ~DoubleProbe ();
56
  virtual ~DoubleProbe ();
 Lines 92-103    Link Here 
92
   *
98
   *
93
   * \param oldData previous value of the double
99
   * \param oldData previous value of the double
94
   * \param newData new value of the double
100
   * \param newData new value of the double
95
   *
96
   * \internal
97
   */
101
   */
98
  void TraceSink (double oldData, double newData);
102
  void TraceSink (double oldData, double newData);
99
103
100
  TracedValue<double> m_output;
104
  TracedValue<double> m_output; //!< Output trace source.
101
};
105
};
102
106
103
} // namespace ns3
107
} // namespace ns3
(-)a/src/stats/model/file-aggregator.h (-11 / +16 lines)
 Lines 32-37    Link Here 
32
namespace ns3 {
32
namespace ns3 {
33
33
34
/**
34
/**
35
 * \ingroup aggregator
36
 *
35
 * This aggregator sends values it receives to a file.
37
 * This aggregator sends values it receives to a file.
36
 **/
38
 **/
37
class FileAggregator : public DataCollectionObject
39
class FileAggregator : public DataCollectionObject
 Lines 46-51    Link Here 
46
    TAB_SEPARATED
48
    TAB_SEPARATED
47
  };
49
  };
48
50
51
  /**
52
   * \brief Get the type ID.
53
   * \return the object TypeId
54
   */
49
  static TypeId GetTypeId ();
55
  static TypeId GetTypeId ();
50
56
51
  /**
57
  /**
 Lines 364-380    Link Here 
364
  /// Heading line for the outputfile.
370
  /// Heading line for the outputfile.
365
  std::string m_heading;
371
  std::string m_heading;
366
372
367
  /// Format strings for C-style sprintf() function.
373
  std::string m_1dFormat;  //!< Format string for 1D C-style sprintf() function.
368
  std::string m_1dFormat;
374
  std::string m_2dFormat;  //!< Format string for 2D C-style sprintf() function.
369
  std::string m_2dFormat;
375
  std::string m_3dFormat;  //!< Format string for 3D C-style sprintf() function.
370
  std::string m_3dFormat;
376
  std::string m_4dFormat;  //!< Format string for 4D C-style sprintf() function.
371
  std::string m_4dFormat;
377
  std::string m_5dFormat;  //!< Format string for 5D C-style sprintf() function.
372
  std::string m_5dFormat;
378
  std::string m_6dFormat;  //!< Format string for 6D C-style sprintf() function.
373
  std::string m_6dFormat;
379
  std::string m_7dFormat;  //!< Format string for 7D C-style sprintf() function.
374
  std::string m_7dFormat;
380
  std::string m_8dFormat;  //!< Format string for 8D C-style sprintf() function.
375
  std::string m_8dFormat;
381
  std::string m_9dFormat;  //!< Format string for 9D C-style sprintf() function.
376
  std::string m_9dFormat;
382
  std::string m_10dFormat; //!< Format string for 10D C-style sprintf() function.
377
  std::string m_10dFormat;
378
383
379
}; // class FileAggregator
384
}; // class FileAggregator
380
385
(-)a/src/stats/model/gnuplot-aggregator.h (+5 lines)
 Lines 32-37    Link Here 
32
namespace ns3 {
32
namespace ns3 {
33
33
34
/**
34
/**
35
 * \ingroup aggregator
35
 * This aggregator produces output used to make gnuplot plots.
36
 * This aggregator produces output used to make gnuplot plots.
36
 **/
37
 **/
37
class GnuplotAggregator : public DataCollectionObject
38
class GnuplotAggregator : public DataCollectionObject
 Lines 46-51    Link Here 
46
    KEY_BELOW
47
    KEY_BELOW
47
  };
48
  };
48
49
50
  /**
51
   * \brief Get the type ID.
52
   * \return the object TypeId
53
   */
49
  static TypeId GetTypeId ();
54
  static TypeId GetTypeId ();
50
55
51
  /**
56
  /**
(-)a/src/stats/model/gnuplot.cc (-11 / +55 lines)
 Lines 27-43    Link Here 
27
27
28
// --- GnuplotDataset::Data ------------------------------------------------ //
28
// --- GnuplotDataset::Data ------------------------------------------------ //
29
29
30
/**
31
 * \ingroup gnuplot
32
 *
33
 * Structure storing the data to plot.
34
 * Derived classes subclass this struct and add their own data fields.
35
 */
30
struct GnuplotDataset::Data
36
struct GnuplotDataset::Data
31
{
37
{
32
  // *** Data Variables ***
38
  // *** Data Variables ***
33
39
34
  unsigned int m_references;
40
  unsigned int m_references; //!< ref/unref counter for garbage collection
35
41
36
  std::string m_title;
42
  std::string m_title; //!< Dataset title
37
  std::string m_extra;
43
  std::string m_extra; //!< Extra parameters for the plot
38
44
39
  /**
45
  /**
40
   * Initializes the reference counter to 1 and sets m_title and m_extra.
46
   * Initializes the reference counter to 1 and sets m_title and m_extra.
47
   * \param title Dataset title
41
   */
48
   */
42
  Data(const std::string& title);
49
  Data(const std::string& title);
43
50
 Lines 45-51    Link Here 
45
  virtual ~Data();
52
  virtual ~Data();
46
53
47
  /**
54
  /**
48
   * Returns "plot" or "splot".
55
   * \brief Returns the plot type ("plot" or "splot").
56
   * \returns the plot type ("plot" or "splot").
49
   */
57
   */
50
  virtual std::string GetCommand () const = 0;
58
  virtual std::string GetCommand () const = 0;
51
59
 Lines 57-62    Link Here 
57
   * If more than one output file is being generated, i.e. separate
65
   * If more than one output file is being generated, i.e. separate
58
   * data and control files, then the index for the current dataset
66
   * data and control files, then the index for the current dataset
59
   * and the name for the data file are also included.
67
   * and the name for the data file are also included.
68
   *
69
   * \param os Output stream
70
   * \param generateOneOutputFile If true, generate only one output file.
71
   * \param dataFileDatasetIndex Dataset Index
72
   * \param dataFileName Dataset file name
60
   */
73
   */
61
  virtual void PrintExpression (std::ostream &os,
74
  virtual void PrintExpression (std::ostream &os,
62
                                bool generateOneOutputFile,
75
                                bool generateOneOutputFile,
 Lines 66-71    Link Here 
66
  /**
79
  /**
67
   * Print the inline data file contents trailing the plot command. Empty for
80
   * Print the inline data file contents trailing the plot command. Empty for
68
   * functions.
81
   * functions.
82
   *
83
   * \param os Output stream
84
   * \param generateOneOutputFile If true, generate only one output file.
69
   */
85
   */
70
  virtual void PrintDataFile (std::ostream &os, bool generateOneOutputFile) const = 0;
86
  virtual void PrintDataFile (std::ostream &os, bool generateOneOutputFile) const = 0;
71
87
 Lines 140-156    Link Here 
140
156
141
// --- Gnuplot2dDataset::Data2d -------------------------------------------- //
157
// --- Gnuplot2dDataset::Data2d -------------------------------------------- //
142
158
159
/**
160
 * \ingroup gnuplot
161
 *
162
 * Structure storing the data to for a 2D plot.
163
 */
143
struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data
164
struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data
144
{
165
{
145
  // *** Data Variables ***
166
  // *** Data Variables ***
146
167
147
  enum Style  m_style;
168
  enum Style  m_style; //!< The plotting style to use for this dataset.
148
  enum ErrorBars m_errorBars;
169
  enum ErrorBars m_errorBars; //!< Whether errorbars should be used for this dataset.
149
170
150
  PointSet    m_pointset;
171
  PointSet    m_pointset; //!< The set of points in this data set
151
172
152
  /**
173
  /**
153
   * Initializes with the values from m_defaultStyle and m_defaultErrorBars.
174
   * Initializes with the values from m_defaultStyle and m_defaultErrorBars.
175
   * \param title Dataset title
154
   */
176
   */
155
  Data2d(const std::string& title);
177
  Data2d(const std::string& title);
156
178
 Lines 386-399    Link Here 
386
408
387
// --- Gnuplot2dFunction::Function2d --------------------------------------- //
409
// --- Gnuplot2dFunction::Function2d --------------------------------------- //
388
410
411
/**
412
 * \ingroup gnuplot
413
 *
414
 * Structure storing the function to be used for a 2D plot.
415
 */
389
struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data
416
struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data
390
{
417
{
391
  // *** Data Variables ***
418
  // *** Data Variables ***
392
419
393
  std::string m_function;
420
  std::string m_function; //!< Function to use
394
421
395
  /**
422
  /**
396
   * Initializes with the function and title.
423
   * Initializes with the function and title.
424
   *
425
   * \param title Title of the plot
426
   * \param function Function to plot
397
   */
427
   */
398
  Function2d(const std::string& title, const std::string& function);
428
  Function2d(const std::string& title, const std::string& function);
399
429
 Lines 459-474    Link Here 
459
489
460
// --- Gnuplot3dDataset::Data3d -------------------------------------------- //
490
// --- Gnuplot3dDataset::Data3d -------------------------------------------- //
461
491
492
/**
493
 * \ingroup gnuplot
494
 *
495
 * Structure storing the data for a 3D plot.
496
 */
462
struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data
497
struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data
463
{
498
{
464
  // *** Data Variables ***
499
  // *** Data Variables ***
465
500
466
  std::string   m_style;
501
  std::string   m_style; //!< The plotting style to use for this dataset.
467
502
468
  PointSet      m_pointset;
503
  PointSet      m_pointset; //!< The set of points in this data set
469
504
470
  /**
505
  /**
471
   * Initializes with value from m_defaultStyle.
506
   * Initializes with value from m_defaultStyle.
507
   * \param title Dataset title
472
   */
508
   */
473
  Data3d(const std::string& title);
509
  Data3d(const std::string& title);
474
510
 Lines 574-587    Link Here 
574
610
575
// --- Gnuplot3dFunction::Function3d --------------------------------------- //
611
// --- Gnuplot3dFunction::Function3d --------------------------------------- //
576
612
613
/**
614
 * \ingroup gnuplot
615
 *
616
 * Structure storing the function to be used for a 3D plot.
617
 */
577
struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data
618
struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data
578
{
619
{
579
  // *** Data Variables ***
620
  // *** Data Variables ***
580
621
581
  std::string m_function;
622
  std::string m_function; //!< Function to use
582
623
583
  /**
624
  /**
584
   * Initializes with the function and title.
625
   * Initializes with the function and title.
626
   *
627
   * \param title Title of the plot
628
   * \param function Function to plot
585
   */
629
   */
586
  Function3d(const std::string& title, const std::string& function);
630
  Function3d(const std::string& title, const std::string& function);
587
631
(-)a/src/stats/model/gnuplot.h (-23 / +47 lines)
 Lines 28-34    Link Here 
28
namespace ns3 {
28
namespace ns3 {
29
29
30
/**
30
/**
31
 * \ingroup tools
31
 * \ingroup gnuplot
32
 *
32
 *
33
 * \brief Abstract class to store a plot line to be used by ns3::Gnuplot.
33
 * \brief Abstract class to store a plot line to be used by ns3::Gnuplot.
34
 *
34
 *
 Lines 104-109    Link Here 
104
};
104
};
105
105
106
/**
106
/**
107
 * \ingroup gnuplot
108
 *
107
 * \class Gnuplot2dDataset
109
 * \class Gnuplot2dDataset
108
 * \brief Class to represent a 2D points plot. Set the line or points style
110
 * \brief Class to represent a 2D points plot. Set the line or points style
109
 * using SetStyle() and set points using Add().
111
 * using SetStyle() and set points using Add().
 Lines 205-228    Link Here 
205
207
206
private:
208
private:
207
209
210
  /**
211
   * A point in a 2D plot
212
   */
208
  struct Point {
213
  struct Point {
209
    bool empty;
214
    bool empty; //!< the point is empty
210
    double x;
215
    double x; //!< X coordinate
211
    double y;
216
    double y; //!< Y coordinate
212
    double dx;
217
    double dx; //!< X error delta
213
    double dy;
218
    double dy; //!< Y error delta
214
  };
219
  };
215
220
221
  /// The set of points in the dataset
216
  typedef std::vector<struct Point> PointSet;
222
  typedef std::vector<struct Point> PointSet;
217
223
218
  static enum Style m_defaultStyle;
224
  static enum Style m_defaultStyle; //!< default plot style
219
  static enum ErrorBars m_defaultErrorBars;
225
  static enum ErrorBars m_defaultErrorBars;  //!< default error bars type
220
226
221
  /// Forward declaration of the internal data class.
227
  /// Forward declaration of the internal data class.
222
  struct Data2d;
228
  struct Data2d;
223
};
229
};
224
230
225
/**
231
/**
232
 * \ingroup gnuplot
233
 *
226
 * \brief Class to represent a 2D function expression plot.
234
 * \brief Class to represent a 2D function expression plot.
227
 *
235
 *
228
 * Since the function expression is not escaped, styles and extras could just
236
 * Since the function expression is not escaped, styles and extras could just
 Lines 252-257    Link Here 
252
};
260
};
253
261
254
/**
262
/**
263
 * \ingroup gnuplot
264
 *
255
 * \brief Class to represent a 3D points plot. Set the line or points style
265
 * \brief Class to represent a 3D points plot. Set the line or points style
256
 * using SetStyle() and set points using Add().
266
 * using SetStyle() and set points using Add().
257
 */
267
 */
 Lines 294-313    Link Here 
294
304
295
private:
305
private:
296
306
307
  /**
308
   * A point in a 3D plot
309
   */
297
  struct Point {
310
  struct Point {
298
    bool empty;
311
    bool empty; //!< the point is empty
299
    double x, y, z;
312
    double x; //!< X coordinate
313
    double y; //!< Y coordinate
314
    double z; //!< Z coordinate
300
  };
315
  };
301
316
317
  /// The set of points in the dataset
302
  typedef std::vector<struct Point> PointSet;
318
  typedef std::vector<struct Point> PointSet;
303
319
304
  static std::string m_defaultStyle;
320
  static std::string m_defaultStyle; //!< default plot style
305
321
306
  /// Forward declaration of the internal data class.
322
  /// Forward declaration of the internal data class.
307
  struct Data3d;
323
  struct Data3d;
308
};
324
};
309
325
310
/**
326
/**
327
 * \ingroup gnuplot
328
 *
311
 * \brief Class to represent a 3D function expression plot.
329
 * \brief Class to represent a 3D function expression plot.
312
 *
330
 *
313
 * Since the function expression is not escaped, styles and extras could just as
331
 * Since the function expression is not escaped, styles and extras could just as
 Lines 338-343    Link Here 
338
};
356
};
339
357
340
/**
358
/**
359
 * \ingroup gnuplot
360
 *
341
 * \brief a simple class to generate gnuplot-ready plotting commands
361
 * \brief a simple class to generate gnuplot-ready plotting commands
342
 *        from a set of datasets.
362
 *        from a set of datasets.
343
 *
363
 *
 Lines 436-459    Link Here 
436
  void SetDataFileDatasetIndex (unsigned int index);
456
  void SetDataFileDatasetIndex (unsigned int index);
437
457
438
private:
458
private:
459
  /// Type for Datasets to be used in plots
439
  typedef std::vector<GnuplotDataset> Datasets;
460
  typedef std::vector<GnuplotDataset> Datasets;
440
461
441
  std::string m_outputFilename;
462
  std::string m_outputFilename; //!< Output file name
442
  std::string m_terminal;
463
  std::string m_terminal; //!< Gnuplot "terminal" to use
443
464
444
  Datasets m_datasets;
465
  Datasets m_datasets; //!< Data sets
445
466
446
  std::string m_title;
467
  std::string m_title; //!< Plot title
447
  std::string m_xLegend;
468
  std::string m_xLegend; //!< X axis legend
448
  std::string m_yLegend;
469
  std::string m_yLegend; //!< Y axis legend
449
  std::string m_extra;
470
  std::string m_extra; //!< extra parameters for the plot
450
471
451
  bool m_generateOneOutputFile;
472
  bool m_generateOneOutputFile; //!< true if only one plot will be generated
452
473
453
  unsigned int m_dataFileDatasetIndex;
474
  unsigned int m_dataFileDatasetIndex; //!< Data set index to plot
454
};
475
};
455
476
456
/**
477
/**
478
 * \ingroup gnuplot
479
 *
457
 * \brief a simple class to group together multiple gnuplots into one file,
480
 * \brief a simple class to group together multiple gnuplots into one file,
458
 * e.g. for PDF multi-page output terminals.
481
 * e.g. for PDF multi-page output terminals.
459
 */
482
 */
 Lines 505-516    Link Here 
505
                       std::string dataFileName);
528
                       std::string dataFileName);
506
529
507
private:
530
private:
531
  /// Type of the Gnuplot collection
508
  typedef std::vector<Gnuplot> Plots;
532
  typedef std::vector<Gnuplot> Plots;
509
533
510
  std::string m_outputFilename;
534
  std::string m_outputFilename; //!< Output file name
511
  std::string m_terminal;
535
  std::string m_terminal; //!< Gnuplot "terminal" to use
512
536
513
  Plots       m_plots;
537
  Plots       m_plots; //!< Plots in the collection
514
};
538
};
515
539
516
} // namespace ns3
540
} // namespace ns3
(-)a/src/stats/model/omnet-data-output.h (-2 / +47 lines)
 Lines 31-37    Link Here 
31
//------------------------------------------------------------
31
//------------------------------------------------------------
32
//--------------------------------------------
32
//--------------------------------------------
33
/**
33
/**
34
 * \ingroup stats
34
 * \ingroup dataoutput
35
 * \class OmnetDataOutput
35
 * \class OmnetDataOutput
36
 * \brief Outputs data in a format compatible with OMNeT library and framework
36
 * \brief Outputs data in a format compatible with OMNeT library and framework
37
 *
37
 *
 Lines 47-82    Link Here 
47
  virtual void DoDispose ();
47
  virtual void DoDispose ();
48
48
49
private:
49
private:
50
  /**
51
   * \ingroup dataoutput
52
   *
53
   * \brief Class to generate OMNeT output
54
   */
50
  class OmnetOutputCallback : public DataOutputCallback {
55
  class OmnetOutputCallback : public DataOutputCallback {
51
public:
56
public:
57
    /**
58
     * Constructor
59
     * \param scalar the output stream
60
     */
52
    OmnetOutputCallback(std::ostream *scalar);
61
    OmnetOutputCallback(std::ostream *scalar);
53
62
63
    /**
64
     * \brief Generates data statistics
65
     * \param context the output context
66
     * \param name the output name
67
     * \param statSum the stats to print
68
     */
54
    void OutputStatistic (std::string context,
69
    void OutputStatistic (std::string context,
55
                          std::string name,
70
                          std::string name,
56
                          const StatisticalSummary *statSum);
71
                          const StatisticalSummary *statSum);
57
72
73
    /**
74
     * \brief Generates a single data output
75
     * \param context the output context
76
     * \param name the output name
77
     * \param val the value
78
     */
58
    void OutputSingleton (std::string context,
79
    void OutputSingleton (std::string context,
59
                          std::string name,
80
                          std::string name,
60
                          int val);
81
                          int val);
61
82
83
    /**
84
     * \brief Generates a single data output
85
     * \param context the output context
86
     * \param name the output name
87
     * \param val the value
88
     */
62
    void OutputSingleton (std::string context,
89
    void OutputSingleton (std::string context,
63
                          std::string name,
90
                          std::string name,
64
                          uint32_t val);
91
                          uint32_t val);
65
92
93
    /**
94
     * \brief Generates a single data output
95
     * \param context the output context
96
     * \param name the output name
97
     * \param val the value
98
     */
66
    void OutputSingleton (std::string context,
99
    void OutputSingleton (std::string context,
67
                          std::string name,
100
                          std::string name,
68
                          double val);
101
                          double val);
69
102
103
    /**
104
     * \brief Generates a single data output
105
     * \param context the output context
106
     * \param name the output name
107
     * \param val the value
108
     */
70
    void OutputSingleton (std::string context,
109
    void OutputSingleton (std::string context,
71
                          std::string name,
110
                          std::string name,
72
                          std::string val);
111
                          std::string val);
73
112
113
    /**
114
     * \brief Generates a single data output
115
     * \param context the output context
116
     * \param name the output name
117
     * \param val the value
118
     */
74
    void OutputSingleton (std::string context,
119
    void OutputSingleton (std::string context,
75
                          std::string name,
120
                          std::string name,
76
                          Time val);
121
                          Time val);
77
122
78
private:
123
private:
79
    std::ostream *m_scalar;
124
    std::ostream *m_scalar; //!< output stream
80
    // end class OmnetOutputCallback
125
    // end class OmnetOutputCallback
81
  };
126
  };
82
127
(-)a/src/stats/model/probe.h (+6 lines)
 Lines 28-33    Link Here 
28
namespace ns3 {
28
namespace ns3 {
29
29
30
/**
30
/**
31
 * \ingroup probes
32
 *
31
 * Base class for probes.
33
 * Base class for probes.
32
 *
34
 *
33
 * This class provides general functionality to control each
35
 * This class provides general functionality to control each
 Lines 37-42    Link Here 
37
class Probe : public DataCollectionObject
39
class Probe : public DataCollectionObject
38
{
40
{
39
public:
41
public:
42
  /**
43
   * \brief Get the type ID.
44
   * \return the object TypeId
45
   */
40
  static TypeId GetTypeId ();
46
  static TypeId GetTypeId ();
41
  Probe ();
47
  Probe ();
42
  virtual ~Probe ();
48
  virtual ~Probe ();
(-)a/src/stats/model/sqlite-data-output.h (-4 / +56 lines)
 Lines 34-40    Link Here 
34
//------------------------------------------------------------
34
//------------------------------------------------------------
35
//--------------------------------------------
35
//--------------------------------------------
36
/**
36
/**
37
 * \ingroup stats
37
 * \ingroup dataoutput
38
 * \class SqliteDataOutput
38
 * \class SqliteDataOutput
39
 * \brief Outputs data in a format compatible with SQLite
39
 * \brief Outputs data in a format compatible with SQLite
40
 */
40
 */
 Lines 49-91    Link Here 
49
  virtual void DoDispose ();
49
  virtual void DoDispose ();
50
50
51
private:
51
private:
52
  /**
53
   * \ingroup dataoutput
54
   *
55
   * \brief Class to generate OMNeT output
56
   */
52
  class SqliteOutputCallback : public DataOutputCallback {
57
  class SqliteOutputCallback : public DataOutputCallback {
53
public:
58
public:
59
    /**
60
     * Constructor
61
     * \param owner pointer to the instance this object belongs to
62
     * \param run experiment descriptor
63
     */
54
    SqliteOutputCallback(Ptr<SqliteDataOutput> owner, std::string run);
64
    SqliteOutputCallback(Ptr<SqliteDataOutput> owner, std::string run);
55
65
66
    /**
67
     * \brief Generates data statistics
68
     * \param key the SQL key to use
69
     * \param variable the variable name
70
     * \param statSum the stats to print
71
     */
56
    void OutputStatistic (std::string key,
72
    void OutputStatistic (std::string key,
57
                          std::string variable,
73
                          std::string variable,
58
                          const StatisticalSummary *statSum);
74
                          const StatisticalSummary *statSum);
59
75
76
    /**
77
     * \brief Generates a single data output
78
     * \param key the SQL key to use
79
     * \param variable the variable name
80
     * \param val the value
81
     */
60
    void OutputSingleton (std::string key,
82
    void OutputSingleton (std::string key,
61
                          std::string variable,
83
                          std::string variable,
62
                          int val);
84
                          int val);
63
85
86
    /**
87
     * \brief Generates a single data output
88
     * \param key the SQL key to use
89
     * \param variable the variable name
90
     * \param val the value
91
     */
64
    void OutputSingleton (std::string key,
92
    void OutputSingleton (std::string key,
65
                          std::string variable,
93
                          std::string variable,
66
                          uint32_t val);
94
                          uint32_t val);
67
95
96
    /**
97
     * \brief Generates a single data output
98
     * \param key the SQL key to use
99
     * \param variable the variable name
100
     * \param val the value
101
     */
68
    void OutputSingleton (std::string key,
102
    void OutputSingleton (std::string key,
69
                          std::string variable,
103
                          std::string variable,
70
                          double val);
104
                          double val);
71
105
106
    /**
107
     * \brief Generates a single data output
108
     * \param key the SQL key to use
109
     * \param variable the variable name
110
     * \param val the value
111
     */
72
    void OutputSingleton (std::string key,
112
    void OutputSingleton (std::string key,
73
                          std::string variable,
113
                          std::string variable,
74
                          std::string val);
114
                          std::string val);
75
115
116
    /**
117
     * \brief Generates a single data output
118
     * \param key the SQL key to use
119
     * \param variable the variable name
120
     * \param val the value
121
     */
76
    void OutputSingleton (std::string key,
122
    void OutputSingleton (std::string key,
77
                          std::string variable,
123
                          std::string variable,
78
                          Time val);
124
                          Time val);
79
125
80
private:
126
private:
81
    Ptr<SqliteDataOutput> m_owner;
127
    Ptr<SqliteDataOutput> m_owner; //!< the instance this object belongs to
82
    std::string m_runLabel;
128
    std::string m_runLabel; //!< Run label
83
129
84
    // end class SqliteOutputCallback
130
    // end class SqliteOutputCallback
85
  };
131
  };
86
132
87
133
88
  sqlite3 *m_db;
134
  sqlite3 *m_db; //!< pointer to the SQL database
135
136
  /**
137
   * \brief Execute a sqlite3 query
138
   * \param exe the query to execute
139
   * \return sqlite return code.
140
   */
89
  int Exec (std::string exe);
141
  int Exec (std::string exe);
90
142
91
  // end class SqliteDataOutput
143
  // end class SqliteDataOutput
(-)a/src/stats/model/stats.h (+78 lines)
Line 0    Link Here 
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
 * Copyright (c) 2013 Universita' di Firenze
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License version 2 as
7
 * published by the Free Software Foundation;
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
18
 * Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
19
 */
20
21
#ifndef STATS_H
22
#define STATS_H
23
24
// Header file used only to define the stats group in Doxygen
25
26
/**
27
 * \defgroup stats Statistics
28
 *
29
 * The statistics module includes some useful features to ease data collection from experiments.
30
 * In particular the following features are included:
31
 * <ul>
32
 * <li> The core framework and two basic data collectors: A counter, and a min/max/avg/total observer.</li>
33
 * <li> Extensions of those to easily work with times and packets.</li>
34
 * <li> Plaintext output formatted for OMNet++.</li>
35
 * <li> Database output using SQLite, a standalone, lightweight, high performance SQL engine.</li>
36
 * <li> Mandatory and open ended metadata for describing and working with runs.</li>
37
 * </ul>
38
 *
39
 * See the manual for a complete documentation.
40
 */
41
42
/**
43
 * \ingroup stats
44
 * \defgroup aggregator Data Aggregators
45
 *
46
 * Data aggregators are classes used to collect data and produce output
47
 * specialized for various purpose, e.g., Gnuplot, file output, etc.
48
 */
49
50
/**
51
 * \ingroup stats
52
 * \defgroup probes Probes
53
 *
54
 * Probes are used to probe an underlying ns3 TraceSource exporting
55
 * its value.  This probe usually exports a trace source "Output".
56
 * The Output trace source emits a value when either the trace source
57
 * emits a new value, or when SetValue () is called.
58
 *
59
 * Probes are a special kind of Data Aggregator
60
 */
61
62
/**
63
 * \ingroup stats
64
 * \defgroup gnuplot Gnuplot
65
 *
66
 * Classes in Gnuplot group are used to collect and prepare and output data
67
 * for subsequent processing by Gnuplot.
68
 */
69
70
/**
71
 * \ingroup stats
72
 * \defgroup dataoutput Data Output
73
 *
74
 * Classes in Data Output group are used to collect and prepare and output data
75
 * for subsequent ouput in a specific format, e.g., Omnet++, SQLite, etc.
76
 */
77
78
#endif /* STATS_H */
(-)a/src/stats/model/time-data-calculators.h (-4 / +4 lines)
 Lines 59-68    Link Here 
59
protected:
59
protected:
60
  virtual void DoDispose (void);
60
  virtual void DoDispose (void);
61
61
62
  uint32_t m_count; /// Count value of TimeMinMaxAvgTotalCalculator
62
  uint32_t m_count; //!< Count value of TimeMinMaxAvgTotalCalculator
63
  Time m_total;     /// Total value of TimeMinMaxAvgTotalCalculator
63
  Time m_total;     //!< Total value of TimeMinMaxAvgTotalCalculator
64
  Time m_min;       /// Minimum value of TimeMinMaxAvgTotalCalculator
64
  Time m_min;       //!< Minimum value of TimeMinMaxAvgTotalCalculator
65
  Time m_max;       /// Maximum value of TimeMinMaxAvgTotalCalculator
65
  Time m_max;       //!< Maximum value of TimeMinMaxAvgTotalCalculator
66
66
67
  // end class TimeMinMaxAvgTotalCalculator
67
  // end class TimeMinMaxAvgTotalCalculator
68
};
68
};
(-)a/src/stats/model/time-series-adaptor.h (-1 / +7 lines)
 Lines 29-34    Link Here 
29
namespace ns3 {
29
namespace ns3 {
30
30
31
/**
31
/**
32
 * \ingroup aggregator
33
 *
32
 * \brief Takes probed values of different types and outputs the
34
 * \brief Takes probed values of different types and outputs the
33
 * current time plus the value with both converted to doubles.
35
 * current time plus the value with both converted to doubles.
34
 *
36
 *
 Lines 46-51    Link Here 
46
class TimeSeriesAdaptor : public DataCollectionObject
48
class TimeSeriesAdaptor : public DataCollectionObject
47
{
49
{
48
public:
50
public:
51
  /**
52
   * \brief Get the type ID.
53
   * \return the object TypeId
54
   */
49
  static TypeId GetTypeId (void);
55
  static TypeId GetTypeId (void);
50
56
51
  TimeSeriesAdaptor ();
57
  TimeSeriesAdaptor ();
 Lines 107-113    Link Here 
107
  void TraceSinkUinteger32 (uint32_t oldData, uint32_t newData);
113
  void TraceSinkUinteger32 (uint32_t oldData, uint32_t newData);
108
114
109
private:
115
private:
110
  TracedCallback<double, double> m_output;
116
  TracedCallback<double, double> m_output; //!< output trace
111
};
117
};
112
118
113
} // namespace ns3
119
} // namespace ns3
(-)a/src/stats/model/uinteger-16-probe.h (-3 / +7 lines)
 Lines 31-36    Link Here 
31
namespace ns3 {
31
namespace ns3 {
32
32
33
/**
33
/**
34
 * \ingroup probes
35
 *
34
 * This class is designed to probe an underlying ns3 TraceSource exporting
36
 * This class is designed to probe an underlying ns3 TraceSource exporting
35
 * an uint16_t.  This probe exports a trace source "Output" of type uint16_t.
37
 * an uint16_t.  This probe exports a trace source "Output" of type uint16_t.
36
 * The Output trace source emits a value when either the trace source
38
 * The Output trace source emits a value when either the trace source
 Lines 41-46    Link Here 
41
class Uinteger16Probe : public Probe
43
class Uinteger16Probe : public Probe
42
{
44
{
43
public:
45
public:
46
  /**
47
   * \brief Get the type ID.
48
   * \return the object TypeId
49
   */
44
  static TypeId GetTypeId ();
50
  static TypeId GetTypeId ();
45
  Uinteger16Probe ();
51
  Uinteger16Probe ();
46
  virtual ~Uinteger16Probe ();
52
  virtual ~Uinteger16Probe ();
 Lines 88-99    Link Here 
88
   *
94
   *
89
   * \param oldData previous value of the uint16_t
95
   * \param oldData previous value of the uint16_t
90
   * \param newData new value of the uint16_t
96
   * \param newData new value of the uint16_t
91
   *
92
   * \internal
93
   */
97
   */
94
  void TraceSink (uint16_t oldData, uint16_t newData);
98
  void TraceSink (uint16_t oldData, uint16_t newData);
95
99
96
  TracedValue<uint16_t> m_output;
100
  TracedValue<uint16_t> m_output; //!< Output trace source.
97
};
101
};
98
102
99
} // namespace ns3
103
} // namespace ns3
(-)a/src/stats/model/uinteger-32-probe.h (-3 / +7 lines)
 Lines 31-36    Link Here 
31
namespace ns3 {
31
namespace ns3 {
32
32
33
/**
33
/**
34
 * \ingroup probes
35
 *
34
 * This class is designed to probe an underlying ns3 TraceSource exporting
36
 * This class is designed to probe an underlying ns3 TraceSource exporting
35
 * an uint32_t.  This probe exports a trace source "Output" of type uint32_t.
37
 * an uint32_t.  This probe exports a trace source "Output" of type uint32_t.
36
 * The Output trace source emits a value when either the trace source
38
 * The Output trace source emits a value when either the trace source
 Lines 41-46    Link Here 
41
class Uinteger32Probe : public Probe
43
class Uinteger32Probe : public Probe
42
{
44
{
43
public:
45
public:
46
  /**
47
   * \brief Get the type ID.
48
   * \return the object TypeId
49
   */
44
  static TypeId GetTypeId ();
50
  static TypeId GetTypeId ();
45
  Uinteger32Probe ();
51
  Uinteger32Probe ();
46
  virtual ~Uinteger32Probe ();
52
  virtual ~Uinteger32Probe ();
 Lines 88-99    Link Here 
88
   *
94
   *
89
   * \param oldData previous value of the uint32_t
95
   * \param oldData previous value of the uint32_t
90
   * \param newData new value of the uint32_t
96
   * \param newData new value of the uint32_t
91
   *
92
   * \internal
93
   */
97
   */
94
  void TraceSink (uint32_t oldData, uint32_t newData);
98
  void TraceSink (uint32_t oldData, uint32_t newData);
95
99
96
  TracedValue<uint32_t> m_output;
100
  TracedValue<uint32_t> m_output; //!< Output trace source.
97
};
101
};
98
102
99
} // namespace ns3
103
} // namespace ns3
(-)a/src/stats/model/uinteger-8-probe.h (-3 / +7 lines)
 Lines 31-36    Link Here 
31
namespace ns3 {
31
namespace ns3 {
32
32
33
/**
33
/**
34
 * \ingroup probes
35
 *
34
 * This class is designed to probe an underlying ns3 TraceSource exporting
36
 * This class is designed to probe an underlying ns3 TraceSource exporting
35
 * an uint8_t.  This probe exports a trace source "Output" of type uint8_t.
37
 * an uint8_t.  This probe exports a trace source "Output" of type uint8_t.
36
 * The Output trace source emits a value when either the trace source
38
 * The Output trace source emits a value when either the trace source
 Lines 41-46    Link Here 
41
class Uinteger8Probe : public Probe
43
class Uinteger8Probe : public Probe
42
{
44
{
43
public:
45
public:
46
  /**
47
   * \brief Get the type ID.
48
   * \return the object TypeId
49
   */
44
  static TypeId GetTypeId ();
50
  static TypeId GetTypeId ();
45
  Uinteger8Probe ();
51
  Uinteger8Probe ();
46
  virtual ~Uinteger8Probe ();
52
  virtual ~Uinteger8Probe ();
 Lines 88-99    Link Here 
88
   *
94
   *
89
   * \param oldData previous value of the uint8_t
95
   * \param oldData previous value of the uint8_t
90
   * \param newData new value of the uint8_t
96
   * \param newData new value of the uint8_t
91
   *
92
   * \internal
93
   */
97
   */
94
  void TraceSink (uint8_t oldData, uint8_t newData);
98
  void TraceSink (uint8_t oldData, uint8_t newData);
95
99
96
  TracedValue<uint8_t> m_output;
100
  TracedValue<uint8_t> m_output; //!< Output trace source.
97
};
101
};
98
102
99
} // namespace ns3
103
} // namespace ns3

Return to bug 938