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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Joe Kopena (tjkopena@cs.drexel.edu)
7
*/
8
9
#ifndef OMNET_DATA_OUTPUT_H
10
#define OMNET_DATA_OUTPUT_H
11
12
#include "
data-output-interface.h
"
13
14
#include "ns3/nstime.h"
15
16
namespace
ns3
17
{
18
19
//------------------------------------------------------------
20
//--------------------------------------------
21
/**
22
* \ingroup dataoutput
23
* \class OmnetDataOutput
24
* \brief Outputs data in a format compatible with OMNeT library and framework
25
*
26
*/
27
class
OmnetDataOutput
:
public
DataOutputInterface
28
{
29
public
:
30
OmnetDataOutput
();
31
~OmnetDataOutput
()
override
;
32
33
/**
34
* Register this type.
35
* \return The TypeId.
36
*/
37
static
TypeId
GetTypeId
();
38
39
void
Output
(
DataCollector
& dc)
override
;
40
41
protected
:
42
void
DoDispose
()
override
;
43
44
private
:
45
/**
46
* \ingroup dataoutput
47
*
48
* \brief Class to generate OMNeT output
49
*/
50
class
OmnetOutputCallback
:
public
DataOutputCallback
51
{
52
public
:
53
/**
54
* Constructor
55
* \param scalar the output stream
56
*/
57
OmnetOutputCallback
(std::ostream* scalar);
58
59
/**
60
* \brief Generates data statistics
61
* \param context the output context
62
* \param name the output name
63
* \param statSum the stats to print
64
*/
65
void
OutputStatistic
(std::string context,
66
std::string name,
67
const
StatisticalSummary
* statSum)
override
;
68
69
/**
70
* \brief Generates a single data output
71
* \param context the output context
72
* \param name the output name
73
* \param val the value
74
*/
75
void
OutputSingleton
(std::string context, std::string name,
int
val)
override
;
76
77
/**
78
* \brief Generates a single data output
79
* \param context the output context
80
* \param name the output name
81
* \param val the value
82
*/
83
void
OutputSingleton
(std::string context, std::string name,
uint32_t
val)
override
;
84
85
/**
86
* \brief Generates a single data output
87
* \param context the output context
88
* \param name the output name
89
* \param val the value
90
*/
91
void
OutputSingleton
(std::string context, std::string name,
double
val)
override
;
92
93
/**
94
* \brief Generates a single data output
95
* \param context the output context
96
* \param name the output name
97
* \param val the value
98
*/
99
void
OutputSingleton
(std::string context, std::string name, std::string val)
override
;
100
101
/**
102
* \brief Generates a single data output
103
* \param context the output context
104
* \param name the output name
105
* \param val the value
106
*/
107
void
OutputSingleton
(std::string context, std::string name,
Time
val)
override
;
108
109
private
:
110
std::ostream*
m_scalar
;
//!< output stream
111
// end class OmnetOutputCallback
112
};
113
114
// end class OmnetDataOutput
115
};
116
117
// end namespace ns3
118
};
// namespace ns3
119
120
#endif
/* OMNET_DATA_OUTPUT_H */
ns3::DataCollector
Collects data.
Definition
data-collector.h:39
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition
data-output-interface.h:73
ns3::DataOutputInterface
Abstract Data Output Interface class s.
Definition
data-output-interface.h:30
ns3::OmnetDataOutput::OmnetOutputCallback
Class to generate OMNeT output.
Definition
omnet-data-output.h:51
ns3::OmnetDataOutput::OmnetOutputCallback::OmnetOutputCallback
OmnetOutputCallback(std::ostream *scalar)
Constructor.
Definition
omnet-data-output.cc:138
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:191
ns3::OmnetDataOutput::OmnetOutputCallback::OutputStatistic
void OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum) override
Generates data statistics.
Definition
omnet-data-output.cc:145
ns3::OmnetDataOutput::OmnetOutputCallback::m_scalar
std::ostream * m_scalar
output stream
Definition
omnet-data-output.h:110
ns3::OmnetDataOutput
Outputs data in a format compatible with OMNeT library and framework.
Definition
omnet-data-output.h:28
ns3::OmnetDataOutput::OmnetDataOutput
OmnetDataOutput()
Definition
omnet-data-output.cc:26
ns3::OmnetDataOutput::DoDispose
void DoDispose() override
Destructor implementation.
Definition
omnet-data-output.cc:50
ns3::OmnetDataOutput::~OmnetDataOutput
~OmnetDataOutput() override
Definition
omnet-data-output.cc:33
ns3::OmnetDataOutput::Output
void Output(DataCollector &dc) override
Outputs information from the provided DataCollector.
Definition
omnet-data-output.cc:90
ns3::OmnetDataOutput::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
omnet-data-output.cc:40
ns3::StatisticalSummary
Abstract class for calculating statistical data.
Definition
data-calculator.h:40
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
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 Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0