net.tomp2p.upnp
Class StateVariable

java.lang.Object
  extended by net.tomp2p.upnp.StateVariable
All Implemented Interfaces:
StateVariableTypes

public class StateVariable
extends Object
implements StateVariableTypes

Class to contain a service state variable definition

Version:
1.0
Author:
SuperBonBon

Field Summary
 Set<String> allowedvalues
          A set of allowed values (String objects) for the variable
 String dataType
          The variable UPNP data type
 String defaultValue
          The default value of the state variable
 String maximumRangeValue
          The maximum value as a string
 String minimumRangeValue
          The minimum value as a string
 String name
          State variable name
 Service parent
          The parent Service Object
 boolean sendEvents
          Boolean to indicate if the variable is sending events when value of the var is changing.
 String stepRangeValue
          The value step range as a string
 
Fields inherited from interface net.tomp2p.upnp.StateVariableTypes
BIN_BASE64, BIN_BASE64_INT, BIN_HEX, BIN_HEX_INT, BOOLEAN, BOOLEAN_INT, CHAR, CHAR_INT, DATE, DATE_INT, DATETIME, DATETIME_INT, DATETIME_TZ, DATETIME_TZ_INT, FIXED_14_4, FIXED_14_4_INT, FLOAT, FLOAT_INT, I1, I1_INT, I2, I2_INT, I4, I4_INT, INT, INT_INT, NUMBER, NUMBER_INT, R4, R4_INT, R8, R8_INT, STRING, STRING_INT, TIME, TIME_INT, TIME_TZ, TIME_TZ_INT, UI1, UI1_INT, UI2, UI2_INT, UI4, UI4_INT, URI, URI_INT, UUID, UUID_INT
 
Method Summary
 Class<?> getDataTypeAsClass()
          The variable JAVA data type (using an UPNP->Java mapping)
 String getValue()
          Call to the UPNP device to retrieve the state variable actual value
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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 Detail

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


Copyright © 2013. All Rights Reserved.