Class ServiceStateVariable

    • Field Detail

      • sendEvents

        protected boolean sendEvents
      • dataType

        protected String dataType
      • defaultValue

        protected String defaultValue
      • minimumRangeValue

        protected String minimumRangeValue
      • maximumRangeValue

        protected String maximumRangeValue
      • stepRangeValue

        protected String stepRangeValue
      • allowedvalues

        protected Set allowedvalues
    • Constructor Detail

      • ServiceStateVariable

        protected ServiceStateVariable()
    • Method Detail

      • getValue

        public String getValue()
                        throws UPNPResponseException,
                               IOException
        Call to the UPNP device to retreive 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
      • getName

        public String getName()
        State variable name
        Returns:
        the state variable name
      • getParent

        public UPNPService getParent()
        The parent UPNPService Object
        Returns:
        the parent object instance
      • isSendEvents

        public boolean isSendEvents()
        Boolean to indicate if the variable is sending events when value of the var is changing. The events can be subscribed via the ServicesEventing class
        Returns:
        true if sending events
      • getDefaultValue

        public String getDefaultValue()
        The default value of the state variable
        Returns:
        the default value representation as an string
      • getDataType

        public String getDataType()
        The variable UPNP data type
        Returns:
        the data type
      • getDataTypeAsClass

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

        public Set getAllowedvalues()
        A set of allowed values (String objects) for the variable
        Returns:
        the allowed values or null if none
      • getMinimumRangeValue

        public String getMinimumRangeValue()
        The minimum value as a string
        Returns:
        the minimum value or null if no restriction
      • getMaximumRangeValue

        public String getMaximumRangeValue()
        The maximum value as a string
        Returns:
        the maximum value or null if no restriction
      • getStepRangeValue

        public String getStepRangeValue()
        The value step range as a string
        Returns:
        the value step raqnge or null if no restriction
      • getDataTypeClassMapping

        public static Class getDataTypeClassMapping​(String dataType)
      • getUPNPDataTypeMapping

        public static String getUPNPDataTypeMapping​(String className)