A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
23
#include "
data-output-interface.h
"
24
25
#include "ns3/nstime.h"
26
27
namespace
ns3
28
{
29
30
//------------------------------------------------------------
31
//--------------------------------------------
32
/**
33
* \ingroup dataoutput
34
* \class OmnetDataOutput
35
* \brief Outputs data in a format compatible with OMNeT library and framework
36
*
37
*/
38
class
OmnetDataOutput
:
public
DataOutputInterface
39
{
40
public
:
41
OmnetDataOutput
();
42
~OmnetDataOutput
()
override
;
43
44
/**
45
* Register this type.
46
* \return The TypeId.
47
*/
48
static
TypeId
GetTypeId
();
49
50
void
Output
(
DataCollector
& dc)
override
;
51
52
protected
:
53
void
DoDispose
()
override
;
54
55
private
:
56
/**
57
* \ingroup dataoutput
58
*
59
* \brief Class to generate OMNeT output
60
*/
61
class
OmnetOutputCallback
:
public
DataOutputCallback
62
{
63
public
:
64
/**
65
* Constructor
66
* \param scalar the output stream
67
*/
68
OmnetOutputCallback
(std::ostream* scalar);
69
70
/**
71
* \brief Generates data statistics
72
* \param context the output context
73
* \param name the output name
74
* \param statSum the stats to print
75
*/
76
void
OutputStatistic
(std::string context,
77
std::string name,
78
const
StatisticalSummary
* statSum)
override
;
79
80
/**
81
* \brief Generates a single data output
82
* \param context the output context
83
* \param name the output name
84
* \param val the value
85
*/
86
void
OutputSingleton
(std::string context, std::string name,
int
val)
override
;
87
88
/**
89
* \brief Generates a single data output
90
* \param context the output context
91
* \param name the output name
92
* \param val the value
93
*/
94
void
OutputSingleton
(std::string context, std::string name,
uint32_t
val)
override
;
95
96
/**
97
* \brief Generates a single data output
98
* \param context the output context
99
* \param name the output name
100
* \param val the value
101
*/
102
void
OutputSingleton
(std::string context, std::string name,
double
val)
override
;
103
104
/**
105
* \brief Generates a single data output
106
* \param context the output context
107
* \param name the output name
108
* \param val the value
109
*/
110
void
OutputSingleton
(std::string context, std::string name, std::string val)
override
;
111
112
/**
113
* \brief Generates a single data output
114
* \param context the output context
115
* \param name the output name
116
* \param val the value
117
*/
118
void
OutputSingleton
(std::string context, std::string name,
Time
val)
override
;
119
120
private
:
121
std::ostream*
m_scalar
;
//!< output stream
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 */
ns3::DataCollector
Collects data.
Definition:
data-collector.h:50
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition:
data-output-interface.h:84
ns3::DataOutputInterface
Abstract Data Output Interface class s.
Definition:
data-output-interface.h:41
ns3::OmnetDataOutput::OmnetOutputCallback
Class to generate OMNeT output.
Definition:
omnet-data-output.h:62
ns3::OmnetDataOutput::OmnetOutputCallback::OutputSingleton
void OutputSingleton(std::string context, std::string name, int val) override
Generates a single data output.
Definition:
omnet-data-output.cc:202
ns3::OmnetDataOutput::OmnetOutputCallback::OutputStatistic
void OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum) override
Generates data statistics.
Definition:
omnet-data-output.cc:156
ns3::OmnetDataOutput::OmnetOutputCallback::m_scalar
std::ostream * m_scalar
output stream
Definition:
omnet-data-output.h:121
ns3::OmnetDataOutput
Outputs data in a format compatible with OMNeT library and framework.
Definition:
omnet-data-output.h:39
ns3::OmnetDataOutput::OmnetDataOutput
OmnetDataOutput()
Definition:
omnet-data-output.cc:37
ns3::OmnetDataOutput::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
omnet-data-output.cc:61
ns3::OmnetDataOutput::~OmnetDataOutput
~OmnetDataOutput() override
Definition:
omnet-data-output.cc:44
ns3::OmnetDataOutput::Output
void Output(DataCollector &dc) override
Outputs information from the provided DataCollector.
Definition:
omnet-data-output.cc:101
ns3::OmnetDataOutput::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
omnet-data-output.cc:51
ns3::StatisticalSummary
Abstract class for calculating statistical data.
Definition:
data-calculator.h:51
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
data-output-interface.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
stats
model
omnet-data-output.h
Generated on Tue May 28 2024 23:39:29 for ns-3 by
1.9.6