MeterState

data class MeterState(val id: String, val status: MeterStatus, val channels: List<ChannelState>, val latestEvent: MeterReading? = null, val statusMessage: String? = null, val present: Boolean)

The live state of a single meter

Constructors

Link copied to clipboard
constructor(id: String, status: MeterStatus, channels: List<ChannelState>, latestEvent: MeterReading? = null, statusMessage: String? = null, present: Boolean)

Properties

Link copied to clipboard

The live state of the channels.

Link copied to clipboard
val id: String

ID of the meter (there must be an associated PowerMeter).

Link copied to clipboard

Latest event for this meter during the observation period

Link copied to clipboard

Is this meter physically present

Link copied to clipboard

The status of a power meter handler.

Link copied to clipboard
val statusMessage: String? = null

Optional status message

Functions

Link copied to clipboard
fun errorCount(): <Error class: unknown class>

Calculate the sum of read errors from all channels