18 #ifndef __OMNETPP_RESULTFILTERS_H 19 #define __OMNETPP_RESULTFILTERS_H 22 #include "omnetpp/simkerneldefs.h" 23 #include "omnetpp/cresultfilter.h" 24 #include "omnetpp/csimulation.h" 25 #include "omnetpp/cstatistic.h" 29 class SIM_API WarmupPeriodFilter :
public cResultFilter
32 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
bool b, cObject *details)
override;
33 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
long l, cObject *details)
override;
34 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
unsigned long l, cObject *details)
override;
35 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
double d, cObject *details)
override;
36 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
const SimTime& v, cObject *details)
override;
37 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t,
const char *s, cObject *details)
override;
38 virtual void receiveSignal(cResultFilter *prev,
simtime_t_cref t, cObject *obj, cObject *details)
override;
41 virtual std::string str()
const override;
61 long getCount()
const {
return count;}
62 virtual double getInitialDoubleValue()
const override {
return getCount();}
63 virtual std::string str()
const override;
98 double getConstant()
const {
return c;}
99 virtual std::string str()
const override;
146 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override {
return true;}
155 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override {
return !std::isnan(value);}
164 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
175 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
178 long getCount()
const {
return count;}
179 virtual double getInitialDoubleValue()
const override {
return getCount();}
180 virtual std::string str()
const override;
191 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
194 double getSum()
const {
return sum;}
195 virtual double getInitialDoubleValue()
const override {
return getSum();}
196 virtual std::string str()
const override;
207 bool timeWeighted =
false;
209 double lastValue = NAN;
211 double weightedSum = 0;
214 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
218 double getMean()
const;
219 virtual std::string str()
const override;
231 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
234 double getMin()
const {
return min;}
235 virtual std::string str()
const override;
247 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
250 double getMax()
const {
return max;}
251 virtual std::string str()
const override;
264 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
267 double getAverage()
const {
return sum/count;}
268 virtual std::string str()
const override;
278 double lastValue = NAN;
280 double weightedSum = 0;
283 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
286 double getTimeAverage()
const;
287 virtual std::string str()
const override;
298 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
301 double getLastValue()
const {
return prev;}
302 virtual std::string str()
const override;
314 using cObjectResultFilter::receiveSignal;
326 using cObjectResultFilter::receiveSignal;
338 virtual bool process(
simtime_t& t,
double& value,
cObject *details)
override;
341 double getSumPerDuration()
const;
342 virtual double getInitialDoubleValue()
const override {
return getSumPerDuration();}
343 virtual std::string str()
const override;
Common base for module and channel classes.
Definition: ccomponent.h:48
Filter that expects a cPacket and outputs its length in bytes (getByteLength()). Null (nullptr) value...
Definition: resultfilters.h:309
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
Base class for filters that expect to receive an numeric value.
Definition: cresultfilter.h:107
Result filter that replaces every value with 1.0.
Definition: resultfilters.h:114
Result filter that computes the maximum of signal values. NaN values in the input are ignored...
Definition: resultfilters.h:242
Result filter for counting the input values, including NaN and nullptr values.
Definition: resultfilters.h:47
Result filter that computes the arithmetic mean of signal values. NaN values in the input are ignored...
Definition: resultfilters.h:258
simtime_t_cref getWarmupPeriod() const
Definition: csimulation.h:394
Filter that expects a cPacket and outputs its length in bits (getBitLength()). Null (nullptr) values ...
Definition: resultfilters.h:321
Result filter that replaces every value with a constant. Signal values do not need to be numeric...
Definition: resultfilters.h:84
Result filter that computes the time average of signal values. NaN values in the input denote interva...
Definition: resultfilters.h:275
Filter that removes (filters out) NaNs, and lets through all other values.
Definition: resultfilters.h:152
Filter that counts NaN values in the input.
Definition: resultfilters.h:170
Result filter for counting signals. Signal values do not need to be numeric to be counted...
Definition: resultfilters.h:70
Result filter that replaces every value with zero.
Definition: resultfilters.h:105
#define SIMTIME_ZERO
Zero simulation time.
Definition: simtime_t.h:73
Filter that outputs the sum of signal values divided by the measurement interval (simtime minus warmu...
Definition: resultfilters.h:333
Result filter that yields the time of emitting the signal.
Definition: resultfilters.h:126
Stores a (NED) property with its (possibly compound) value.
Definition: cproperty.h:38
Base class for result filters.
Definition: cresultfilter.h:72
Result filter that removes repeated values.
Definition: resultfilters.h:293
Result filter that computes the (time-weighted or unweighted) mean of signal values. NaN values in the input are ignored, or in the time-weighted case, they denote intervals to be ignored.
Definition: resultfilters.h:204
const simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition: simtime_t.h:46
This class is a no-op filter.
Definition: resultfilters.h:143
Definition: cabstracthistogram.h:21
Result filter that computes the minimum of signal values. NaN values in the input are ignored...
Definition: resultfilters.h:226
Filter that raises a runtime error if it sees a NaN in the input.
Definition: resultfilters.h:161
Filter that outputs the sum of signal values. NaN values in the input are ignored.
Definition: resultfilters.h:186
Base class for filters that expect to receive an object.
Definition: cresultfilter.h:131
cSimulation * getSimulation()
Returns the currently active simulation, or nullptr if there is none.
Definition: csimulation.h:575