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
time-data-calculators.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 TIME_DATA_CALCULATORS_H
10
#define TIME_DATA_CALCULATORS_H
11
12
#include "
data-calculator.h
"
13
#include "
data-output-interface.h
"
14
15
#include "ns3/nstime.h"
16
17
namespace
ns3
18
{
19
20
//------------------------------------------------------------
21
//--------------------------------------------
22
/**
23
* \ingroup stats
24
*
25
* Unfortunately, templating the base MinMaxAvgTotalCalculator to
26
* operate over Time values isn't straightforward. The main issues
27
* are setting the maximum value, which can be worked around easily
28
* as it done here, and dividing to get the average, which is not as
29
* easily worked around.
30
*/
31
class
TimeMinMaxAvgTotalCalculator
:
public
DataCalculator
32
{
33
public
:
34
TimeMinMaxAvgTotalCalculator
();
35
~TimeMinMaxAvgTotalCalculator
()
override
;
36
37
/**
38
* Register this type.
39
* \return The TypeId.
40
*/
41
static
TypeId
GetTypeId
();
42
43
/**
44
* Updates all variables of TimeMinMaxAvgTotalCalculator
45
* \param i value of type Time to use for updating the calculator
46
*/
47
void
Update
(
const
Time
i);
48
49
/**
50
* Outputs data based on the provided callback
51
* \param callback
52
*/
53
void
Output
(
DataOutputCallback
& callback)
const override
;
54
55
protected
:
56
void
DoDispose
()
override
;
57
58
uint32_t
m_count
;
//!< Count value of TimeMinMaxAvgTotalCalculator
59
Time
m_total
;
//!< Total value of TimeMinMaxAvgTotalCalculator
60
Time
m_min
;
//!< Minimum value of TimeMinMaxAvgTotalCalculator
61
Time
m_max
;
//!< Maximum value of TimeMinMaxAvgTotalCalculator
62
63
// end class TimeMinMaxAvgTotalCalculator
64
};
65
66
// end namespace ns3
67
};
// namespace ns3
68
69
#endif
/* TIME_DATA_CALCULATORS_H */
ns3::DataCalculator
Calculates data during a simulation.
Definition
data-calculator.h:107
ns3::DataOutputCallback
Callback class for the DataOutput classes.
Definition
data-output-interface.h:73
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TimeMinMaxAvgTotalCalculator
Unfortunately, templating the base MinMaxAvgTotalCalculator to operate over Time values isn't straigh...
Definition
time-data-calculators.h:32
ns3::TimeMinMaxAvgTotalCalculator::m_total
Time m_total
Total value of TimeMinMaxAvgTotalCalculator.
Definition
time-data-calculators.h:59
ns3::TimeMinMaxAvgTotalCalculator::Update
void Update(const Time i)
Updates all variables of TimeMinMaxAvgTotalCalculator.
Definition
time-data-calculators.cc:53
ns3::TimeMinMaxAvgTotalCalculator::DoDispose
void DoDispose() override
Destructor implementation.
Definition
time-data-calculators.cc:44
ns3::TimeMinMaxAvgTotalCalculator::Output
void Output(DataOutputCallback &callback) const override
Outputs data based on the provided callback.
Definition
time-data-calculators.cc:85
ns3::TimeMinMaxAvgTotalCalculator::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
time-data-calculators.cc:34
ns3::TimeMinMaxAvgTotalCalculator::m_count
uint32_t m_count
Count value of TimeMinMaxAvgTotalCalculator.
Definition
time-data-calculators.h:58
ns3::TimeMinMaxAvgTotalCalculator::m_min
Time m_min
Minimum value of TimeMinMaxAvgTotalCalculator.
Definition
time-data-calculators.h:60
ns3::TimeMinMaxAvgTotalCalculator::TimeMinMaxAvgTotalCalculator
TimeMinMaxAvgTotalCalculator()
Definition
time-data-calculators.cc:20
ns3::TimeMinMaxAvgTotalCalculator::~TimeMinMaxAvgTotalCalculator
~TimeMinMaxAvgTotalCalculator() override
Definition
time-data-calculators.cc:27
ns3::TimeMinMaxAvgTotalCalculator::m_max
Time m_max
Maximum value of TimeMinMaxAvgTotalCalculator.
Definition
time-data-calculators.h:61
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
data-calculator.h
data-output-interface.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
stats
model
time-data-calculators.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0