Class StateVariable

java.lang.Object
net.sbbi.upnp.services.StateVariable
All Implemented Interfaces:
StateVariableTypes

public class StateVariable extends Object implements StateVariableTypes
Class to contain a service state variable definition
  • Field Details

    • name

      public final 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 String dataType
      The variable UPNP data type
    • defaultValue

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

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

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

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

      public final Set<String> allowedvalues
      A set of allowed values (String objects) for the variable
    • parent

      public final Service parent
      The parent Service Object
  • Method Details

    • getValue

      public String getValue() throws UPNPResponseException, 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
      IOException - if some IO error with device occurs during query
    • getDataTypeAsClass

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

      public String toString()
      Overrides:
      toString in class Object