EnergyAddonChannel

Description

The EnergyAddonChannel object represents a channel of a EnergyAddonEN100 device and holds properties for measured values. In order to initiate a measurement the desired properties have to be polled through a Polling object or by calling pollCurrent() and/or pollFrequency() manually.

› Inherits:Object

Properties

current

This property holds the measured current in A. The value needs to be polled actively.

› Type:Double
› Signal:currentChanged()
› Attributes:Readonly, Requires Polling

enabled

This property holds whether the channel is enabled for measurements. When disabled, no measured values will be received and updated.

› Type:Boolean
› Default:true
› Signal:enabledChanged()
› Attributes:Writable

frequency

This property holds the measured frequency in Hz. The value needs to be polled actively.

› Type:Double
› Signal:frequencyChanged()
› Attributes:Readonly, Requires Polling

index

This property holds the index which specifies the channel to read measurements from.

› Type:SignedInteger
› Default:0
› Signal:indexChanged()
› Attributes:Writable

timestamp

This property holds a timestamp of the last measurement in milliseconds. This value wraps every minute, i.e. at 60000 milliseconds and can be used to detect a successful measurement even if the measured values have not changed between the measurements.

› Type:UnsignedBigInteger
› Default:0
› Signal:timestampChanged()
› Attributes:Writable

Methods

pollCurrent()

This method polls the current property. It is called automatically when using a Polling property modifier on this property and usually does not have to be called manually.

pollFrequency()

This method polls the frequency property. It is called automatically when using a Polling property modifier on this property and usually does not have to be called manually.

Example

See EnergyAddonEN100 example on how to use EnergyAddonChannel.