Class BridgeOnewireImpl

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.bridge.onewire.impl.BridgeOnewireImpl
All Implemented Interfaces:
BridgeOnewire, OpenemsComponent, ComponentJsonApi, JsonApi

public class BridgeOnewireImpl extends AbstractOpenemsComponent implements BridgeOnewire, OpenemsComponent, ComponentJsonApi
  • Constructor Details

    • BridgeOnewireImpl

      public BridgeOnewireImpl()
  • Method Details

    • deactivate

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

      public void addTask(Consumer<DSPortAdapter> task)
      Description copied from interface: BridgeOnewire
      Add a Task.

      Tasks are executed sequentially in a separate thread.

      Specified by:
      addTask in interface BridgeOnewire
      Parameters:
      task - the task
    • removeTask

      public void removeTask(Consumer<DSPortAdapter> task)
      Description copied from interface: BridgeOnewire
      Removes a Task.
      Specified by:
      removeTask in interface BridgeOnewire
      Parameters:
      task - the task
    • 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