9#ifndef DATA_CALCULATOR_H
10#define DATA_CALCULATOR_H
12#include "ns3/deprecated.h"
13#include "ns3/nstime.h"
14#include "ns3/object.h"
15#include "ns3/simulator.h"
20extern const
double NaN;
35class DataOutputCallback;
139 void SetKey(
const std::string key);
144 std::string
GetKey()
const;
161 virtual void Start(
const Time& startTime);
cairo_uint64_t x
_cairo_uint_96by64_32x64_divrem:
void SetContext(const std::string context)
Sets the DataCalculator context to the provided context.
virtual void Output(DataOutputCallback &callback) const =0
Outputs data based on the provided callback.
bool m_enabled
Descendant classes must check & respect m_enabled!
static TypeId GetTypeId()
Register this type.
virtual void Start(const Time &startTime)
Starts DataCalculator at a given time in the simulation.
~DataCalculator() override
virtual void Stop(const Time &stopTime)
Stops DataCalculator at a given time in the simulation.
bool GetEnabled() const
Returns whether the DataCalculator is enabled.
void Disable()
Disables DataCalculator when simulation stops.
std::string GetKey() const
Gets the DataCalculator key.
std::string m_context
Context value.
std::string m_key
Key value.
EventId m_stopEvent
Stop event.
void DoDispose() override
Destructor implementation.
void Enable()
Enables DataCalculator when simulation starts.
std::string GetContext() const
Gets the DataCalculator context.
void SetKey(const std::string key)
Sets the DataCalculator key to the provided key.
EventId m_startEvent
Start event.
Callback class for the DataOutput classes.
An identifier for simulation events.
Object()
Caller graph was not generated because of its size.
Abstract class for calculating statistical data.
virtual double getMax() const =0
Returns the maximum of the values.
virtual double getMean() const =0
Returns the mean of the (weighted) observations.
virtual double getStddev() const =0
Returns the standard deviation of the (weighted) observations.
virtual ~StatisticalSummary()
Destructor.
virtual double getVariance() const =0
Returns the variance of the (weighted) observations.
virtual long getCount() const =0
Returns the number of observations.
virtual double getMin() const =0
Returns the minimum of the values.
virtual double getSum() const =0
virtual double getSqrSum() const =0
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
#define NS_DEPRECATED_3_44(msg)
Tag for things deprecated in version ns-3.44.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const double NaN
Stored representation of NaN.
bool isNaN(double x)
true if x is NaN