Class VirtualSubtractMeterImpl

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.meter.virtual.subtract.VirtualSubtractMeterImpl
All Implemented Interfaces:
OpenemsComponent, ModbusSlave, ElectricityMeter, VirtualMeter, VirtualSubtractMeter

public class VirtualSubtractMeterImpl extends AbstractOpenemsComponent implements VirtualSubtractMeter, VirtualMeter, ElectricityMeter, OpenemsComponent, ModbusSlave
  • Field Details

    • cm

      protected org.osgi.service.cm.ConfigurationAdmin cm
  • Constructor Details

    • VirtualSubtractMeterImpl

      public VirtualSubtractMeterImpl()
  • Method Details

    • deactivate

      protected void deactivate()
      Description copied from class: AbstractOpenemsComponent
      Handles @Deactivate of implementations. Prints log output.
      Overrides:
      deactivate in class AbstractOpenemsComponent
    • getMeterType

      public MeterType getMeterType()
      Description copied from interface: ElectricityMeter
      Gets the type of this Meter.
      Specified by:
      getMeterType in interface ElectricityMeter
      Returns:
      the MeterType
    • debugLog

      public String debugLog()
      Description copied from interface: OpenemsComponent
      Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.
      Specified by:
      debugLog in interface OpenemsComponent
      Returns:
      the debug log output
    • addToSum

      public boolean addToSum()
      Description copied from interface: VirtualMeter
      Whether or not to add the values of this meter to Sum.

      Use case: there are two production meters which should be joined to one virtual meter. In this case you would not want this VirtualMeter to be added to the total sum of Production power ("_sum/ActiveProductionPower").

      Specified by:
      addToSum in interface VirtualMeter
      Returns:
      true if it should be added to sum.
    • getModbusSlaveTable

      public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode)
      Description copied from interface: ModbusSlave
      Gets the Modbus-Slave-Table for this OpenEMS-Component.
      Specified by:
      getModbusSlaveTable in interface ModbusSlave
      Parameters:
      accessMode - filters the Modbus-Records that should be shown
      Returns:
      the Modbus-Slave-Table