Skip to content

PeriodicStreamProbe

A StreamProbe that listens to its stream only in sampling windows.

Every PeriodicSamplingConfiguration.interval it listens for PeriodicSamplingConfiguration.duration and forwards all measurements in that window. Subclasses implement stream.

Pausing cancels the current window and stops new windows from starting.

Inheritance
Implementers

Constructors

PeriodicStreamProbe

PeriodicStreamProbe()

Properties

samplingConfiguration

PeriodicSamplingConfiguration? get samplingConfiguration
override

The sampling configuration for this probe.

Configuration is obtained in the following order:

Returns null in case no configuration is found.

See also the section on Sampling schemes and configurations in the CARP Core Framework. In addition to CARP Core, CARP Mobile Sensing also supports sampling schemes in the sampling packages, which are used as the 4th possible configuration in the list above.

Methods

onPause

Future<bool> onPause()
override

Called by pause. Returns true if successfully paused.

If false, the state is not changed.

onResume

Future<bool> onResume()
override

Called by resume. Returns true if successfully resumed.

If false, the executor moves to ExecutorState.PausedButShouldBeResumed.