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

Class SpecWaitObject

source code

Helper class for waiting specific events from Spec

Instance Methods [hide private]
 
__init__(self, connection)
Constructor
source code
 
connected(self)
Callback triggered by a 'connected' event.
source code
 
disconnected(self)
Callback triggered by a 'disconnected' event.
source code
 
waitReply(self, command, argsTuple, timeout=None)
Wait for a reply from Spec
source code
 
waitChannelUpdate(self, chanName, waitValue=None, timeout=None)
Wait for a channel update
source code
 
waitConnection(self, timeout=None)
Wait for the connection to Spec being established
source code
 
wait(self, waitValue=None, timeout=None)
Block until the object's internal value gets updated
source code
 
replyArrived(self, reply)
Callback triggered by a reply from Spec.
source code
 
channelUpdated(self, channelValue)
Callback triggered by a channel update
source code
Method Details [hide private]

__init__(self, connection)
(Constructor)

source code 

Constructor

Arguments: connection -- a SpecConnection object

waitReply(self, command, argsTuple, timeout=None)

source code 

Wait for a reply from Spec

Arguments: command -- method returning a replyID to be executed on the connection object argsTuple -- tuple of arguments to be passed to the command timeout -- optional timeout (defaults to None)

waitChannelUpdate(self, chanName, waitValue=None, timeout=None)

source code 

Wait for a channel update

Arguments: chanName -- channel name waitValue -- particular value to wait (defaults to None, meaning any value) timeout -- optional timeout (defaults to None)

waitConnection(self, timeout=None)

source code 

Wait for the connection to Spec being established

Arguments: timeout -- optional timeout (defaults to None)

Exceptions: timeout -- raise a timeout exception on timeout

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

source code 

Block until the object's internal value gets updated

Arguments: waitValue -- particular value to wait (defaults to None, meaning any value) timeout -- optional timeout (defaults to None)

Exceptions: timeout -- raise a timeout exception on timeout

channelUpdated(self, channelValue)

source code 

Callback triggered by a channel update

If channel was unregistered, we skip the first update, else we update our internal value