A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
stats
model
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
//--------------------------------------------
39
class
OmnetDataOutput
:
public
DataOutputInterface
{
40
public
:
41
OmnetDataOutput
();
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
:
61
class
OmnetOutputCallback
:
public
DataOutputCallback
{
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 */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::DataOutputInterface
Abstract Data Output Interface class s
Definition:
data-output-interface.h:39
ns3::OmnetDataOutput
Outputs data in a format compatible with OMNeT library and framework.
Definition:
omnet-data-output.h:39
ns3::StatisticalSummary
Abstract class for calculating statistical data.
Definition:
data-calculator.h:46
ns3::OmnetDataOutput::OmnetOutputCallback::m_scalar
std::ostream * m_scalar
output stream
Definition:
omnet-data-output.h:130
ns3::OmnetDataOutput::Output
virtual void Output(DataCollector &dc)
Outputs information from the provided DataCollector.
Definition:
omnet-data-output.cc:97
ns3::OmnetDataOutput::~OmnetDataOutput
virtual ~OmnetDataOutput()
Definition:
omnet-data-output.cc:43
ns3::OmnetDataOutput::OmnetOutputCallback::OmnetOutputCallback
OmnetOutputCallback(std::ostream *scalar)
Constructor.
Definition:
omnet-data-output.cc:151
ns3::OmnetDataOutput::OmnetOutputCallback::OutputStatistic
void OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum)
Generates data statistics.
Definition:
omnet-data-output.cc:158
ns3::OmnetDataOutput::OmnetOutputCallback
Class to generate OMNeT output.
Definition:
omnet-data-output.h:61
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::OmnetDataOutput::OmnetDataOutput
OmnetDataOutput()
Definition:
omnet-data-output.cc:37
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition:
data-output-interface.h:81
ns3::OmnetDataOutput::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
omnet-data-output.cc:49
data-output-interface.h
ns3::DataCollector
Collects data.
Definition:
data-collector.h:49
ns3::OmnetDataOutput::OmnetOutputCallback::OutputSingleton
void OutputSingleton(std::string context, std::string name, int val)
Generates a single data output.
Definition:
omnet-data-output.cc:186
ns3::OmnetDataOutput::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
omnet-data-output.cc:60
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:10 for ns-3 by
1.8.14