MeterConstructor

class MeterConstructor(val data: PowerMeter, val createHandler: (PowerMeter) -> MeterHandler)

An abstraction for constructing power meter handlers.

Contains information of the potential power meter instance that can be created.

Constructors

Link copied to clipboard
constructor(data: PowerMeter, createHandler: (PowerMeter) -> MeterHandler)

Properties

Link copied to clipboard

Constructs a handler for this meter. A new handler should not be constructed if an old handler is still active. Otherwise, the handlers might read from the same source, which most likely will lead to data corruption or to a failure to open the device.

Link copied to clipboard

Specifications of this power meter.

Functions

Link copied to clipboard
fun id(): String

ID of the meter to be constructed.