Package SpecClient :: Module SpecVariable :: Class SpecVariable
[hide private]
[frames] | no frames]

Class SpecVariable

source code

SpecVariable class

Thin wrapper around SpecChannel objects, to make variables watching, setting and getting values easier.

Instance Methods [hide private]
 
__init__(self, varName=None, specVersion=None, timeout=None, prefix=True)
Constructor
source code
 
connectToSpec(self, varName, specVersion, timeout=None, prefix=True)
Connect to a remote Spec
source code
 
isSpecConnected(self)
Return whether the remote Spec version is connected or not.
source code
 
getValue(self)
Return the watched variable current value.
source code
 
setValue(self, value)
Set the watched variable value
source code
 
waitUpdate(self, waitValue=None, timeout=None)
Wait for the watched variable value to change
source code
Method Details [hide private]

__init__(self, varName=None, specVersion=None, timeout=None, prefix=True)
(Constructor)

source code 

Constructor

Keyword arguments: varName -- the variable name in Spec specVersion -- 'host:port' string representing a Spec server to connect to (defaults to None) timeout -- optional timeout (defaults to None)

connectToSpec(self, varName, specVersion, timeout=None, prefix=True)

source code 

Connect to a remote Spec

Connect to Spec

Arguments: varName -- the variable name in Spec specVersion -- 'host:port' string representing a Spec server to connect to timeout -- optional timeout (defaults to None)

setValue(self, value)

source code 

Set the watched variable value

Arguments: value -- the new variable value

waitUpdate(self, waitValue=None, timeout=None)

source code 

Wait for the watched variable value to change

Keyword arguments: waitValue -- wait for a specific variable value timeout -- optional timeout