Package de.michaeldenk.yasdi4j
Class YasdiChannel
java.lang.Object
de.michaeldenk.yasdi4j.YasdiChannel
YasdiChannel represents a single channel of a device.- Author:
- Michael Denk <code@michaeldenk.de>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the channel access rights for this channel.Returns the device that has this channel.intgetMask()Returns the channel mask (see YASDI manual for details).getName()Returns the channel name.getType()Returns the channel type.getUnit()Returns the channel unit.doublegetValue()Gets the current channel value.Gets the current channel value (if this channel has a text value).inthashCode()booleanhasText()Returns true if this channel is a text value channel.toString()voidupdateValue(int maxValueAge) Updates the value of this channel, if the current value is older than maxValueAge seconds.
-
Method Details
-
updateValue
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
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
Gets the current channel value (if this channel has a text value). -
getName
Returns the channel name. -
getUnit
Returns the channel unit. -
getDevice
Returns the device that has this channel. -
getAccessRights
Returns the channel access rights for this channel. This method may return null. -
toString
-
equals
-
hashCode
public int hashCode()
-