SimulatedMeterSource

class SimulatedMeterSource(logMeterEvents: Boolean, initialMeterCount: Int, val passive: Boolean = false, val registry: (EventInjector) -> Unit? = null) : MeterSource

A meter source for building simulated meters.

Constructors

Link copied to clipboard
constructor(logMeterEvents: Boolean, initialMeterCount: Int, passive: Boolean = false, registry: (EventInjector) -> Unit? = null)

Properties

Link copied to clipboard
open override val name: String

Name of the source

Link copied to clipboard
val passive: Boolean = false
Link copied to clipboard
val registry: (EventInjector) -> Unit? = null

Functions

Link copied to clipboard
open override fun countMeters(): Int

Returns the number of discovered meters.

Link copied to clipboard
open override fun findMeters(): List<MeterConstructor>

Returns a list of meter constructors for the meters discovered by this source. The constructors have a field for querying the specifications of the meters and another method for constructing the handler for that specific meter.

Link copied to clipboard
open fun init()

Initialize the meter source.

Link copied to clipboard
open override fun recognizedTypes(): <Error class: unknown class>

Each type of meter has a unique id string. Returns the list of meters recognized by this source.

Link copied to clipboard
fun setMeterCount(count: Int)
Link copied to clipboard
open override fun status(): String

Meter source status