Class StateVariable

  • All Implemented Interfaces:
    StateVariableTypes

    public class StateVariable
    extends java.lang.Object
    implements StateVariableTypes
    Class to contain a service state variable definition
    • Field Detail

      • name

        public final java.lang.String name
        State variable name
      • sendEvents

        public final boolean sendEvents
        Boolean to indicate if the variable is sending events when value of the var is changing.
      • dataType

        public final java.lang.String dataType
        The variable UPNP data type
      • defaultValue

        public final java.lang.String defaultValue
        The default value of the state variable
      • minimumRangeValue

        public final java.lang.String minimumRangeValue
        The minimum value as a string
      • maximumRangeValue

        public final java.lang.String maximumRangeValue
        The maximum value as a string
      • stepRangeValue

        public final java.lang.String stepRangeValue
        The value step range as a string
      • allowedvalues

        public final java.util.Set<java.lang.String> allowedvalues
        A set of allowed values (String objects) for the variable
    • Method Detail

      • getValue

        public java.lang.String getValue()
                                  throws UPNPResponseException,
                                         java.io.IOException
        Call to the UPNP device to retrieve the state variable actual value
        Returns:
        the state variable actual value on the device, should be never null, an empty string could be returned by the device
        Throws:
        UPNPResponseException - if the device throws an exception during query
        java.io.IOException - if some IO error with device occurs during query
      • getDataTypeAsClass

        public java.lang.Class getDataTypeAsClass()
        The variable JAVA data type (using an UPNP->Java mapping)
        Returns:
        the class mapped
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object