public class CDVMeter extends OnePointMeter
useMessage(Message)
method can be overridden to use
only those messages for measurement that satisfy certain criteria, e.g.,
based on message content, or message type.
Upon construction, CDVMeter
requires a (fixed) rate which is taken to
calculate the cell delay variation (CDV) of the measured values.
portHandler
Modifier | Constructor and Description |
---|---|
protected |
CDVMeter(UnweightedSampleCollector<Duration> statistic,
double rate) |
Modifier and Type | Method and Description |
---|---|
static CDVMeter |
createWithDoubleStatistic(UnweightedSampleCollector<java.lang.Double> statistic,
double rate)
creates a new
CDVMeter with a statistic that accepts Double
values. |
static CDVMeter |
createWithDurationStatistic(UnweightedSampleCollector<Duration> statistic,
double rate)
creates a new
CDVMeter with a statistic that accepts Duration
objects |
protected void |
evaluateMessage(Message msg,
Port port) |
protected void |
evaluateSample(Duration sample)
called when a message was seen
|
protected boolean |
useMessage(Message msg)
filters messages that should be used for IAT measurement
|
attachInput, attachInput
protected CDVMeter(UnweightedSampleCollector<Duration> statistic, double rate)
public static CDVMeter createWithDurationStatistic(UnweightedSampleCollector<Duration> statistic, double rate)
CDVMeter
with a statistic that accepts Duration
objectsstatistic
- statistic to fill with the valuesrate
- expected rateCDVMeter
public static CDVMeter createWithDoubleStatistic(UnweightedSampleCollector<java.lang.Double> statistic, double rate)
CDVMeter
with a statistic that accepts Double
values. The measured durations are converted to seconds and then filled
into the statistic.statistic
- statistic to fill with the valuesrate
- expected rateCDVMeter
protected void evaluateSample(Duration sample)
sample
- the current sampleprotected boolean useMessage(Message msg)
msg
- the observed messageprotected void evaluateMessage(Message msg, Port port)
evaluateMessage
in class OnePointMeter