MeasurementsPacket

data class MeasurementsPacket(val period: Int, val periodFactor: Int?, val measurements: List<MeasurementsPacket.TimestampedMeasurement>)

Packet of measurements having the same period and periodFactor.

Constructors

Link copied to clipboard
constructor(period: Int, periodFactor: Int?, measurements: List<MeasurementsPacket.TimestampedMeasurement>)

Types

Link copied to clipboard
data class TimestampedMeasurement(val timestamp: Long, val measurement: Measurement<*>)

Measurement with associated timestamp indicating when the measurement was taken.

Properties

Link copied to clipboard

List of measurements with timestamps sorted by time in ascending order (oldest first).

Link copied to clipboard
val period: Int

Base period value in seconds which states how often measurements are stored in device memory.

Link copied to clipboard

Period factor which is a multiplier used to define storing period for non-binary sensors or null if not available. To obtain storing period for non-binary measurements, period factor has to be multiplied by base period