|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_RESULTFILTERS_H
17 #define __OMNETPP_RESULTFILTERS_H
20 #include "omnetpp/simkerneldefs.h"
21 #include "omnetpp/cresultfilter.h"
22 #include "omnetpp/csimulation.h"
23 #include "omnetpp/cstatistic.h"
51 virtual std::string str()
const override;
68 std::map<std::string, int> labelToDelegateStartIndexMap;
70 int getDelegateStartIndexByLabel(
cObject *details);
81 virtual std::string str()
const override;
101 intval_t getCount()
const {
return count;}
102 virtual double getInitialDoubleValue()
const override {
return getCount();}
103 virtual std::string str()
const override;
138 double getConstant()
const {
return c;}
139 virtual double getInitialDoubleValue()
const override {
return c;}
140 virtual std::string str()
const override;
216 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override {
return !std::isnan(value);}
225 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
236 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
239 intval_t getCount()
const {
return count;}
240 virtual double getInitialDoubleValue()
const override {
return getCount();}
241 virtual std::string str()
const override;
252 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
255 double getSum()
const {
return sum;}
256 virtual double getInitialDoubleValue()
const override {
return getSum();}
257 virtual std::string str()
const override;
268 bool timeWeighted =
false;
270 double lastValue = NAN;
272 double weightedSum = 0;
275 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
278 virtual void init(
Context *ctx)
override;
279 double getMean()
const;
280 virtual std::string str()
const override;
292 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
295 double getMin()
const {
return min;}
296 virtual std::string str()
const override;
308 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
311 double getMax()
const {
return max;}
312 virtual std::string str()
const override;
325 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
328 double getAverage()
const {
return sum/count;}
329 virtual std::string str()
const override;
339 double lastValue = NAN;
341 double weightedSum = 0;
344 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
347 double getTimeAverage()
const;
348 virtual std::string str()
const override;
359 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
362 double getLastValue()
const {
return prev;}
363 virtual std::string str()
const override;
375 using cObjectResultFilter::receiveSignal;
387 using cObjectResultFilter::receiveSignal;
399 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
402 double getSumPerDuration()
const;
403 virtual double getInitialDoubleValue()
const override {
return getSumPerDuration();}
404 virtual std::string str()
const override;
Filter that expects a cPacket and outputs its length in bytes (getByteLength()). Null (nullptr) value...
Definition: resultfilters.h:370
This class is a no-op filter.
Definition: resultfilters.h:184
const typedef simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition: simtime_t.h:48
Base class for filters that expect to receive an object.
Definition: cresultfilter.h:147
Result filter that replaces every value with zero.
Definition: resultfilters.h:146
Filter that raises a runtime error if it sees a NaN in the input.
Definition: resultfilters.h:222
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
Result filter that computes the arithmetic mean of signal values. NaN values in the input are ignored...
Definition: resultfilters.h:319
Result filter that computes the (time-weighted or unweighted) mean of signal values....
Definition: resultfilters.h:265
Result filter that demultiplexes its input to several outputs. The selector (a.ka....
Definition: resultfilters.h:64
Filter that outputs the sum of signal values. NaN values in the input are ignored.
Definition: resultfilters.h:247
Filter that counts NaN values in the input.
Definition: resultfilters.h:231
Result filter for counting the input values, including NaN and nullptr values.
Definition: resultfilters.h:87
Filter that removes (filters out) NaNs, and lets through all other values.
Definition: resultfilters.h:213
Filter that outputs the sum of signal values divided by the measurement interval (simtime minus warmu...
Definition: resultfilters.h:394
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
uint64_t uintval_t
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the libr...
Definition: simkerneldefs.h:109
Result filter that absorbs input values during the configured warm-up period (see warmup-period confi...
Definition: resultfilters.h:39
cSimulation * getSimulation()
Returns the currently active simulation, or nullptr if there is none.
Definition: csimulation.h:608
Result filter that removes repeated values.
Definition: resultfilters.h:354
Result filter that computes the minimum of signal values. NaN values in the input are ignored.
Definition: resultfilters.h:287
Base class for filters that expect to receive an numeric value.
Definition: cresultfilter.h:123
Result filter that computes the time average of signal values. NaN values in the input denote interva...
Definition: resultfilters.h:336
Filter that expects a cPacket and outputs its length in bits (getBitLength()). Null (nullptr) values ...
Definition: resultfilters.h:382
Filter that merges several inputs into one output.
Definition: resultfilters.h:201
simtime_t_cref getWarmupPeriod() const
Definition: csimulation.h:422
Result filter that computes the maximum of signal values. NaN values in the input are ignored.
Definition: resultfilters.h:303
#define SIMTIME_ZERO
Zero simulation time.
Definition: simtime_t.h:70
int64_t intval_t
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the librar...
Definition: simkerneldefs.h:101
Definition: cresultfilter.h:78
Base class for result filters.
Definition: cresultfilter.h:72
Result filter that yields the time of emitting the signal.
Definition: resultfilters.h:167
Result filter for counting signals. Signal values do not need to be numeric to be counted....
Definition: resultfilters.h:110
Result filter that replaces every value with 1.0.
Definition: resultfilters.h:155
Common abstract base class for result filters and result recorders.
Definition: cresultlistener.h:34
Result filter that replaces every value with a constant. Signal values do not need to be numeric.
Definition: resultfilters.h:124