author | Tommaso Pecorella <tommaso.pecorella@unifi.it> |
Sun, 15 Dec 2013 09:00:57 +0100 | |
changeset 10527 | 210b3b72062d |
parent 10426 | 11e80cad10f4 |
child 11432 | d2656819dd54 |
permissions | -rw-r--r-- |
3570 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2008 Drexel University |
|
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: Joe Kopena (tjkopena@cs.drexel.edu) |
|
19 |
*/ |
|
20 |
||
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7256
diff
changeset
|
21 |
#ifndef DATA_OUTPUT_INTERFACE_H |
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7256
diff
changeset
|
22 |
#define DATA_OUTPUT_INTERFACE_H |
3570 | 23 |
|
24 |
#include "ns3/object.h" |
|
25 |
#include "ns3/nstime.h" |
|
5502
04acce3f7133
Bug #645: fixes for opening stats file with OMNeT++
Andras Varga <andras@omnetpp.org>
parents:
4581
diff
changeset
|
26 |
#include "ns3/data-calculator.h" |
3570 | 27 |
|
28 |
namespace ns3 { |
|
29 |
||
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
30 |
class DataCollector; |
3570 | 31 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
32 |
//------------------------------------------------------------ |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
33 |
//-------------------------------------------- |
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7189
diff
changeset
|
34 |
/** |
10527
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
35 |
* \ingroup dataoutput |
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
36 |
* |
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
37 |
* \brief Abstract Data Output Interface class |
10527
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
38 |
s */ |
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
39 |
class DataOutputInterface : public Object { |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
40 |
public: |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
41 |
DataOutputInterface(); |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
42 |
virtual ~DataOutputInterface(); |
3570 | 43 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
44 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
45 |
* Outputs information from the provided DataCollector |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
46 |
* \param dc DataCollector object |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
47 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
48 |
virtual void Output (DataCollector &dc) = 0; |
3570 | 49 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
50 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
51 |
* Sets the DataOutputInterface prefix to the provided prefix |
10527
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
52 |
* \param prefix prefix as a string |
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
53 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
54 |
void SetFilePrefix (const std::string prefix); |
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
55 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
56 |
* Gets the file prefix of the DataOutputInterface |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
57 |
* \return File prefix as a string |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
58 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
59 |
std::string GetFilePrefix () const; |
4581 | 60 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
61 |
protected: |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
62 |
virtual void DoDispose (); |
3570 | 63 |
|
10527
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
64 |
std::string m_filePrefix; //!< File prefix for the DataOutputInterface |
4581 | 65 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
66 |
// end class DataOutputInterface |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
67 |
}; |
3570 | 68 |
|
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7189
diff
changeset
|
69 |
/** |
10527
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
70 |
* \ingroup dataoutput |
210b3b72062d
[Doxygen] Stats module doxygen warnings
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10426
diff
changeset
|
71 |
* |
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
72 |
* \brief Callback class for the DataOutput classes |
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7189
diff
changeset
|
73 |
* |
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7189
diff
changeset
|
74 |
*/ |
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
75 |
class DataOutputCallback { |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
76 |
public: |
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
77 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
78 |
* Destructor |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
79 |
*/ |
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
80 |
virtual ~DataOutputCallback() {} |
3570 | 81 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
82 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
83 |
* Outputs the data from the specified StatisticalSummary |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
84 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
85 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
86 |
* \param statSum Pointer to a StatisticalSummary object |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
87 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
88 |
virtual void OutputStatistic (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
89 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
90 |
const StatisticalSummary *statSum) = 0; |
5502
04acce3f7133
Bug #645: fixes for opening stats file with OMNeT++
Andras Varga <andras@omnetpp.org>
parents:
4581
diff
changeset
|
91 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
92 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
93 |
* Associates the integer value with the variable name for a specific output format |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
94 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
95 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
96 |
* \param val Value to be stored |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
97 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
98 |
virtual void OutputSingleton (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
99 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
100 |
int val) = 0; |
3570 | 101 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
102 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
103 |
* Associates the uint32_t value with the variable name for a specific output format |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
104 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
105 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
106 |
* \param val Value to be stored |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
107 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
108 |
virtual void OutputSingleton (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
109 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
110 |
uint32_t val) = 0; |
3570 | 111 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
112 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
113 |
* Associates the double value with the variable name for a specific output format |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
114 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
115 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
116 |
* \param val Value to be stored |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
117 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
118 |
virtual void OutputSingleton (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
119 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
120 |
double val) = 0; |
3570 | 121 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
122 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
123 |
* Associates the string value with the variable name for a specific output format |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
124 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
125 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
126 |
* \param val Value to be stored |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
127 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
128 |
virtual void OutputSingleton (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
129 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
130 |
std::string val) = 0; |
3570 | 131 |
|
10426
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
132 |
/** |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
133 |
* Associates the Time value with the variable name for a specific output format |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
134 |
* \param key Key value of a DataCalculator |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
135 |
* \param variable Name of the variable for which statistics are being provided |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
136 |
* \param val Value to be stored |
11e80cad10f4
doxygen warnings for stats module
Jared Ivey <j.ivey@gatech.edu>
parents:
7353
diff
changeset
|
137 |
*/ |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
138 |
virtual void OutputSingleton (std::string key, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
139 |
std::string variable, |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7241
diff
changeset
|
140 |
Time val) = 0; |
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
141 |
// end class DataOutputCallback |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
142 |
}; |
3570 | 143 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
144 |
// end namespace ns3 |
3570 | 145 |
}; |
146 |
||
147 |
||
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7256
diff
changeset
|
148 |
#endif /* DATA_OUTPUT_INTERFACE_H */ |