A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
omnet-data-output.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 Drexel University
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Joe Kopena (tjkopena@cs.drexel.edu)
18 */
19
20#ifndef OMNET_DATA_OUTPUT_H
21#define OMNET_DATA_OUTPUT_H
22
24
25#include "ns3/nstime.h"
26
27namespace ns3
28{
29
30//------------------------------------------------------------
31//--------------------------------------------
39{
40 public:
42 ~OmnetDataOutput() override;
43
48 static TypeId GetTypeId();
49
50 void Output(DataCollector& dc) override;
51
52 protected:
53 void DoDispose() override;
54
55 private:
62 {
63 public:
68 OmnetOutputCallback(std::ostream* scalar);
69
76 void OutputStatistic(std::string context,
77 std::string name,
78 const StatisticalSummary* statSum) override;
79
86 void OutputSingleton(std::string context, std::string name, int val) override;
87
94 void OutputSingleton(std::string context, std::string name, uint32_t val) override;
95
102 void OutputSingleton(std::string context, std::string name, double val) override;
103
110 void OutputSingleton(std::string context, std::string name, std::string val) override;
111
118 void OutputSingleton(std::string context, std::string name, Time val) override;
119
120 private:
121 std::ostream* m_scalar;
122 // end class OmnetOutputCallback
123 };
124
125 // end class OmnetDataOutput
126};
127
128// end namespace ns3
129}; // namespace ns3
130
131#endif /* OMNET_DATA_OUTPUT_H */
Collects data.
Callback class for the DataOutput classes.
Abstract Data Output Interface class s.
Class to generate OMNeT output.
void OutputSingleton(std::string context, std::string name, int val) override
Generates a single data output.
void OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum) override
Generates data statistics.
Outputs data in a format compatible with OMNeT library and framework.
void DoDispose() override
Destructor implementation.
void Output(DataCollector &dc) override
Outputs information from the provided DataCollector.
static TypeId GetTypeId()
Register this type.
Abstract class for calculating statistical data.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.