Two-Point Meters
Several classes for transfer time measurement are derived from
TwoPointMeter
:
+ The class
TimeMeter
is implemented as base class and provides the methods
createTimeStamp()
,
evaluateTimeStamp()
and
deleteTimeStamp()
for
an efficient memory management of time stamps (class
TimeStamp
) using a so-called free
list. Whereby a time stamp contains the ID of the meter as well as a time value. Figure 1
depicts the principle of a transfer time meter.
Principle of a transfer time meter
+ The class
StdTimeMeter
derived from
TimeMeter
is a meter to determine the transfer
times between two or more ports and provides the following features. Upon constructor
call, no further parameters are required.
- The use of generic message filters and management in a respective data structure
-
attachFromPort()
connects a meter to a port whose time measurement begins by
installing a filter of the type
GenMessageFilter
, which uses the
setTimeStamp()
method from
StdTimeMeter
as a handler function.
-
attachToPort()
connects a meter to a port whose time measurement ends by installing
a filter of the type
GenMessageFilter
and uses the
readTimeStamp()
method from
StdTimeMeter
as a handler function.
- Calling
setTimeStamp()
causes a time stamp with the current system time to be
attached to the message that is just passing the port by calling the
Message
method
addTimeStamp()
.
-
readTimeStamp()
acquires the time stamp that belongs to the meter from the current
message using the method
getTimeStamp()
from
Message
, evaluates its transfer
time and removes it from the message (
removeTimeStamp()
).
- Evaluation of transfer times with the help of a statistic of the type
SampleStatistic
+ The class
DistTimeMeter
is derived from
StdTimeMeter
and additionally provides a
distribution statistic. Therefore, the array size of measures as well as lower and upper limit
of the interarrival time that has to be captured during simulation are required upon construction.
+ The class
BoundaryTimeMeter
is used to find the quantile for a given percentage. It
uses the a boundary statistic and thus provides two constructors, one
for
StdBoundaryStatistic
and one for
JainBoundaryStatistic
. Accordingly,
additionally to the percentage (e.g., 0.95) the expected number of samples is required upon
construction in case the
StdBoundaryStatictic
is applied.
+ The class
MedianTimeMeter
is used to determine the median of transfer time values
between two points in a simulation model.