Interface HardwarePlatform

All Known Implementing Classes:
ModBerryX500CM4, ModberryX500M40804Max, ModberryX500M40804W, ModberryX500M40804Wb

public interface HardwarePlatform
  • Method Details

    • getAllChannelIds

      List<ChannelId> getAllChannelIds()
      Gets all channels of the hardware.
      Returns:
      List of hardware pins.
    • getWriteChannelIds

      default List<WriteChannelId> getWriteChannelIds()
      Gets the write channel IDs of the platform.
      Returns:
      List of WriteChannelIds.
    • getReadChannelIds

      default List<ReadChannelId> getReadChannelIds()
      Gets all read channels of the hardware device. These include digital and analog inputs.
      Returns:
      List of hardware pins.
    • createPinObjects

      void createPinObjects(List<ChannelId> channels)
      Creates pin objects based on hardware enum description.
      Parameters:
      channels - List of hardware description values. Each of the will be exported as a channel.
    • getGpioValueByChannelId

      Optional<Boolean> getGpioValueByChannelId(AbstractGpioChannel channelId)
      Gets the value of a GPIO pin based on the given channel.
      Parameters:
      channelId - hardware channel to be queried.
      Returns:
      the value of the digital IO. true if high, otherwise false.
    • setGpio

      void setGpio(WriteChannelId channelId, boolean value) throws OpenemsException
      Sets the value of a GPIO based.
      Parameters:
      channelId - hardware channel to set
      value - the new requested value. In case of digital IOs, the value should be boolean.
      Throws:
      OpenemsException - thrown in the case if there is an OS/Hardware failure.