Class MeterDiscovergyImpl

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.meter.discovergy.MeterDiscovergyImpl
All Implemented Interfaces:
OpenemsComponent, ComponentJsonApi, JsonApi, ElectricityMeter, MeterDiscovergy, org.osgi.service.event.EventHandler

public class MeterDiscovergyImpl extends AbstractOpenemsComponent implements MeterDiscovergy, ElectricityMeter, OpenemsComponent, org.osgi.service.event.EventHandler, ComponentJsonApi
  • Constructor Details

    • MeterDiscovergyImpl

      public MeterDiscovergyImpl()
  • 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
    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • 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
    • logInfo

      protected void logInfo(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log an info message including the Component ID.
      Overrides:
      logInfo in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • logError

      protected void logError(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log an error message including the Component ID.
      Overrides:
      logError in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • buildJsonApiRoutes

      public void buildJsonApiRoutes(JsonApiBuilder builder)
      Description copied from interface: JsonApi
      Specifies routes of the current component in the given builder.

      Example:

       @Override
       public void buildJsonApiRoutes(JsonApiBuilder builder) {
           builder.rpc("METHOD_NAME", call -> {
              // handle call...
           });
       }
       
      Specified by:
      buildJsonApiRoutes in interface JsonApi
      Parameters:
      builder - the builder to add the routes