Class ModBerryX500CM4

java.lang.Object
io.openems.edge.io.gpio.hardware.ModBerryX500CM4
All Implemented Interfaces:
HardwarePlatform
Direct Known Subclasses:
ModberryX500M40804Max, ModberryX500M40804W, ModberryX500M40804Wb

public abstract class ModBerryX500CM4 extends Object implements HardwarePlatform
  • Constructor Details

  • Method Details

    • createPinObjects

      public void createPinObjects(List<ChannelId> channelIds)
      Description copied from interface: HardwarePlatform
      Creates pin objects based on hardware enum description.
      Specified by:
      createPinObjects in interface HardwarePlatform
      Parameters:
      channelIds - List of hardware description values. Each of the will be exported as a channel.
    • getGpioValueByChannelId

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

      public void setGpio(WriteChannelId channelId, boolean value) throws OpenemsException
      Description copied from interface: HardwarePlatform
      Sets the value of a GPIO based.
      Specified by:
      setGpio in interface HardwarePlatform
      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.