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 
48  static TypeId GetTypeId (void);
49 
50  virtual void Output (DataCollector &dc);
51 
52 protected:
53  virtual void DoDispose ();
54 
55 private:
62 public:
67  OmnetOutputCallback(std::ostream *scalar);
68 
75  void OutputStatistic (std::string context,
76  std::string name,
77  const StatisticalSummary *statSum);
78 
85  void OutputSingleton (std::string context,
86  std::string name,
87  int val);
88 
95  void OutputSingleton (std::string context,
96  std::string name,
97  uint32_t val);
98 
105  void OutputSingleton (std::string context,
106  std::string name,
107  double val);
108 
115  void OutputSingleton (std::string context,
116  std::string name,
117  std::string val);
118 
125  void OutputSingleton (std::string context,
126  std::string name,
127  Time val);
128 
129 private:
130  std::ostream *m_scalar;
131  // end class OmnetOutputCallback
132  };
133 
134  // end class OmnetDataOutput
135 };
136 
137 // end namespace ns3
138 };
139 
140 
141 #endif /* OMNET_DATA_OUTPUT_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
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.
static TypeId GetTypeId(void)
Register this type.
Collects data.
void OutputSingleton(std::string context, std::string name, int val)
Generates a single data output.
virtual void DoDispose()
Destructor implementation.
a unique identifier for an interface.
Definition: type-id.h:58