Skip to content

PeriodicSamplingConfiguration

A sampling configuration specifying how to collect data on a regular basis for a specific period.

Every interval, data is collected for the length of duration. Useful for listening in on a sensor (e.g. the accelerometer) in regular, short time windows. See BufferingPeriodicProbe.

Inheritance
Annotations

Constructors

PeriodicSamplingConfiguration.fromJson

PeriodicSamplingConfiguration.fromJson(
  1. Map<String, dynamic> json
)

PeriodicSamplingConfiguration

PeriodicSamplingConfiguration({
  1. required Duration interval,
  2. required Duration duration,
})

Properties

duration

Duration duration
getter/setter pair

How long each sampling window lasts.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.