Class ExampleTakeCurrentTimeProbe

  • All Implemented Interfaces:
    org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>, org.palladiosimulator.metricspec.metricentity.IMetricEntity

    public class ExampleTakeCurrentTimeProbe
    extends BasicObjectStateProbe<SimpleSimulationContext,​Double,​javax.measure.quantity.Duration>
    Measures a point in time metric (in SI.SECOND) by taking the current simulation time of a simulation (observed state object). This class uses SimpleSimulationContext as an example simulation state object.
    • Constructor Detail

      • ExampleTakeCurrentTimeProbe

        public ExampleTakeCurrentTimeProbe​(SimpleSimulationContext simulationContext)
        Default constructor.
        Parameters:
        simulationContext - The observer object is a simulation state object, thus, allowing to request its current simulation time.
    • Method Detail

      • getBasicMeasure

        protected javax.measure.Measure<Double,​javax.measure.quantity.Duration> getBasicMeasure​(RequestContext measurementContext)
        Measures the current simulation time as requested from the simulation context (observed state object).
        Specified by:
        getBasicMeasure in class BasicTriggeredProbe<Double,​javax.measure.quantity.Duration>
        Parameters:
        measurementContext - The measurement context for this probe.
        Returns:
        The new measure.