Skip to content

MeasurementProbe

A probe that collects one Measurement when resumed, then pauses itself.

Subclasses implement getMeasurement. The probe pauses 5 seconds after getMeasurement completes. See DeviceProbe for an example.

Inheritance
Implementers

Constructors

MeasurementProbe

MeasurementProbe()

Methods

getMeasurement

Future<Measurement?> getMeasurement()

Collects the Measurement. Implemented by subclasses.

Can return null if no data is available. Can return an Error measurement if an error occurs.

onResume

Future<bool> onResume()
override

Called by resume. Returns true if successfully resumed.

If false, the executor moves to ExecutorState.PausedButShouldBeResumed.