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

Class SpecVariableA

source code

SpecVariableA class - asynchronous version of SpecVariable

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

Instance Methods [hide private]
 
__init__(self, varName=None, specVersion=None, dispatchMode=1, prefix=True, callbacks={})
Constructor
source code
 
connectToSpec(self, varName, specVersion, dispatchMode=1, prefix=True)
Connect to a remote Spec
source code
 
isSpecConnected(self) source code
 
_connected(self) source code
 
connected(self)
Callback triggered by a 'connected' event from Spec
source code
 
_disconnected(self) source code
 
disconnected(self)
Callback triggered by a 'disconnected' event from Spec
source code
 
update(self, value)
Callback triggered by a variable update
source code
 
getValue(self)
Return the watched variable current value.
source code
 
setValue(self, value)
Set the watched variable value
source code
Method Details [hide private]

__init__(self, varName=None, specVersion=None, dispatchMode=1, prefix=True, callbacks={})
(Constructor)

source code 

Constructor

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

connectToSpec(self, varName, specVersion, dispatchMode=1, prefix=True)

source code 

Connect to a remote Spec

Connect to Spec and register channel for monitoring variable

Arguments: varName -- name of the variable specVersion -- 'host:port' string representing a Spec server to connect to

connected(self)

source code 

Callback triggered by a 'connected' event from Spec

To be extended by derivated classes.

disconnected(self)

source code 

Callback triggered by a 'disconnected' event from Spec

To be extended by derivated classes.

update(self, value)

source code 

Callback triggered by a variable update

Extend it to do something useful.

setValue(self, value)

source code 

Set the watched variable value

Arguments: value -- the new variable value