Class GoodWeGridMeterImpl

All Implemented Interfaces:
ModbusComponent, OpenemsComponent, ModbusSlave, GoodWeGridMeter, ElectricityMeter, TimedataProvider, org.osgi.service.event.EventHandler

public class GoodWeGridMeterImpl extends AbstractOpenemsModbusComponent implements GoodWeGridMeter, ElectricityMeter, ModbusComponent, OpenemsComponent, TimedataProvider, org.osgi.service.event.EventHandler, ModbusSlave
  • Constructor Details

    • GoodWeGridMeterImpl

      public GoodWeGridMeterImpl()
  • Method Details

    • setModbus

      protected void setModbus(BridgeModbus modbus)
      Description copied from class: AbstractOpenemsModbusComponent
      Set the Modbus bridge. Should be called by @Reference
      setModbus in class AbstractOpenemsModbusComponent
      modbus - the BridgeModbus Reference
    • deactivate

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

      protected ModbusProtocol defineModbusProtocol()
      Description copied from class: AbstractOpenemsModbusComponent
      Defines the Modbus protocol.
      Specified by:
      defineModbusProtocol in class AbstractOpenemsModbusComponent
      the ModbusProtocol
    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • setExternalMeterValue

      protected void setExternalMeterValue()
      Set channel for external meter if configured.
    • calculateRatio

      protected static Integer calculateRatio(int valueA, int valueB)
      Calculate a ratio value.

      Ignore impossible values.

      valueA - value A e.g. 3000A
      valueB - value B e.g. 5A
      ratio value e.g. 600
    • convertMeterConnectStatus

      protected void convertMeterConnectStatus(Integer value)
    • getPhaseConnectionValue

      protected static Integer getPhaseConnectionValue(Phase phase, int value)
      Get the connection value depending on the phase.

      The information of each phase connection is part of a hex. The part of the given phase will be returned.

      For example: 0x0124 means Phase R connect incorrectly´╝îPhase S connect reverse, Phase T connect correctly

      phase - Phase
      value - Original value with all phase information
      connection information of the given phase
    • getMeterType

      public MeterType getMeterType()
      Description copied from interface: ElectricityMeter
      Gets the type of this Meter.
      Specified by:
      getMeterType in interface ElectricityMeter
      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
      the debug log output
    • getTimedata

      public Timedata getTimedata()
      Description copied from interface: TimedataProvider
      Gets the Timedata service.
      Specified by:
      getTimedata in interface TimedataProvider
      the service or null if it is not (yet) available.
    • 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
      accessMode - filters the Modbus-Records that should be shown
      the Modbus-Slave-Table