author | Josh Pelkey <jpelkey@gatech.edu> |
Fri, 13 May 2011 14:59:56 -0400 | |
changeset 7189 | a3a61f7d66ef |
parent 6855 | 104f16f72979 |
child 7241 | 0a7a16b599e8 |
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 |
||
21 |
#ifndef __DATA_OUTPUT_INTERFACE_H__ |
|
22 |
#define __DATA_OUTPUT_INTERFACE_H__ |
|
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 |
//-------------------------------------------- |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
34 |
class DataOutputInterface : public Object { |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
35 |
public: |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
36 |
DataOutputInterface(); |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
37 |
virtual ~DataOutputInterface(); |
3570 | 38 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
39 |
virtual void Output(DataCollector &dc) = 0; |
3570 | 40 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
41 |
void SetFilePrefix(const std::string prefix); |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
42 |
std::string GetFilePrefix() const; |
4581 | 43 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
44 |
protected: |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
45 |
virtual void DoDispose(); |
3570 | 46 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
47 |
std::string m_filePrefix; |
4581 | 48 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
49 |
// end class DataOutputInterface |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
50 |
}; |
3570 | 51 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
52 |
class DataOutputCallback { |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
53 |
public: |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
54 |
virtual ~DataOutputCallback() {} |
3570 | 55 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
56 |
virtual void OutputStatistic(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
57 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
58 |
const StatisticalSummary *statSum) = 0; |
5502
04acce3f7133
Bug #645: fixes for opening stats file with OMNeT++
Andras Varga <andras@omnetpp.org>
parents:
4581
diff
changeset
|
59 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
60 |
virtual void OutputSingleton(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
61 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
62 |
int val) = 0; |
3570 | 63 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
64 |
virtual void OutputSingleton(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
65 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
66 |
uint32_t val) = 0; |
3570 | 67 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
68 |
virtual void OutputSingleton(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
69 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
70 |
double val) = 0; |
3570 | 71 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
72 |
virtual void OutputSingleton(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
73 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
74 |
std::string val) = 0; |
3570 | 75 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
76 |
virtual void OutputSingleton(std::string key, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
77 |
std::string variable, |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
78 |
Time val) = 0; |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
79 |
// end class DataOutputCallback |
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
80 |
}; |
3570 | 81 |
|
7189
a3a61f7d66ef
stats coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6855
diff
changeset
|
82 |
// end namespace ns3 |
3570 | 83 |
}; |
84 |
||
85 |
||
86 |
#endif // __DATA_OUTPUT_INTERFACE_H__ |