ActiveMeasurement

data class ActiveMeasurement(val id: Int, val name: String = "M-", val startTime: Long, val startEventIndex: Int, val runs: List<RunSummary> = listOf(), val activeRun: ActiveRun? = null)

An active measurement is something a session might potentially have. Compared to FinishedMeasurement, the active measurement has mutable fields for updating the runs and meter states. Use the routine 'finish' to produce a FinishedMeasurement.

Constructors

Link copied to clipboard
constructor(id: Int, name: String = "M-", startTime: Long, startEventIndex: Int, runs: List<RunSummary> = listOf(), activeRun: ActiveRun? = null)

Properties

Link copied to clipboard
val activeRun: ActiveRun? = null

Possible active run if any.

Link copied to clipboard
val id: Int

ID of the measurement

Link copied to clipboard

Name of the measurement

Link copied to clipboard

Mutable list of finished runs

Link copied to clipboard

index of the first associated event

Link copied to clipboard

The start timestamp, @see System.currentTimeMillis()

Functions

Link copied to clipboard
fun summary(stopTime: Long, sessionEventCount: Int): MeasurementSummary

Creates a summary of the measurement. Basic energy, power & time statistics are created for all measurements.

Link copied to clipboard
open override fun toString(): String