Class YasdiChannel

java.lang.Object
de.michaeldenk.yasdi4j.YasdiChannel

public class YasdiChannel extends Object
YasdiChannel represents a single channel of a device.
Author:
Michael Denk <code@michaeldenk.de>
  • Method Details

    • updateValue

      public void updateValue(int maxValueAge) throws IOException
      Updates the value of this channel, if the current value is older than maxValueAge seconds.
      Parameters:
      maxValueAge - The maximum value age in seconds.
      Throws:
      IOException - if an I/O error occurs.
    • getMask

      public int getMask()
      Returns the channel mask (see YASDI manual for details).
    • getType

      public YasdiChannel.Type getType()
      Returns the channel type.
    • hasText

      public boolean hasText()
      Returns true if this channel is a text value channel.
    • getValue

      public double getValue()
      Gets the current channel value.
    • getValueText

      public String getValueText()
      Gets the current channel value (if this channel has a text value).
    • getName

      public String getName()
      Returns the channel name.
    • getUnit

      public String getUnit()
      Returns the channel unit.
    • getDevice

      public YasdiDevice getDevice()
      Returns the device that has this channel.
    • getAccessRights

      public YasdiChannelAccessRights getAccessRights()
      Returns the channel access rights for this channel. This method may return null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object