A Discrete-Event Network Simulator
API
omnet-data-output.h
Go to the documentation of this file.
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 OMNET_DATA_OUTPUT_H
22 #define OMNET_DATA_OUTPUT_H
23 
24 #include "ns3/nstime.h"
25 
26 #include "data-output-interface.h"
27 
28 namespace ns3 {
29 
30 
31 //------------------------------------------------------------
32 //--------------------------------------------
40 public:
42  virtual ~OmnetDataOutput();
43 
44  virtual void Output (DataCollector &dc);
45 
46 protected:
47  virtual void DoDispose ();
48 
49 private:
56 public:
61  OmnetOutputCallback(std::ostream *scalar);
62 
69  void OutputStatistic (std::string context,
70  std::string name,
71  const StatisticalSummary *statSum);
72 
79  void OutputSingleton (std::string context,
80  std::string name,
81  int val);
82 
89  void OutputSingleton (std::string context,
90  std::string name,
91  uint32_t val);
92 
99  void OutputSingleton (std::string context,
100  std::string name,
101  double val);
102 
109  void OutputSingleton (std::string context,
110  std::string name,
111  std::string val);
112 
119  void OutputSingleton (std::string context,
120  std::string name,
121  Time val);
122 
123 private:
124  std::ostream *m_scalar;
125  // end class OmnetOutputCallback
126  };
127 
128  // end class OmnetDataOutput
129 };
130 
131 // end namespace ns3
132 };
133 
134 
135 #endif /* OMNET_DATA_OUTPUT_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Abstract Data Output Interface class s.
Outputs data in a format compatible with OMNeT library and framework.
Abstract class for calculating statistical data.
virtual void Output(DataCollector &dc)
Outputs information from the provided DataCollector.
OmnetOutputCallback(std::ostream *scalar)
Constructor.
void OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum)
Generates data statistics.
Class to generate OMNeT output.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback class for the DataOutput classes.
Collects data.
void OutputSingleton(std::string context, std::string name, int val)
Generates a single data output.
virtual void DoDispose()
Destructor implementation.