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

Class SpecChannel

source code

SpecChannel class

Represent a channel in Spec

Signals: valueChanged(channelValue, channelName) -- emitted when the channel gets updated

Instance Methods [hide private]
 
__init__(self, connection, channelName, registrationFlag=0)
Constructor
source code
 
connected(self)
Do registration when Spec gets connected
source code
 
disconnected(self)
Reset channel object when Spec gets disconnected.
source code
 
unregister(self)
Unregister channel.
source code
 
register(self)
Register channel
source code
 
update(self, channelValue, deleted=False)
Update channel's value and emit the 'valueChanged' signal.
source code
 
read(self)
Read the channel value
source code
 
write(self, value)
Write a channel value.
source code
Class Variables [hide private]
  channel_aliases = {}
Method Details [hide private]

__init__(self, connection, channelName, registrationFlag=0)
(Constructor)

source code 

Constructor

Arguments: connection -- a SpecConnection object channelName -- string representing a channel name, i.e. 'var/toto'

Keyword arguments: registrationFlag -- defines how the channel is registered, possible values are : SpecChannel.DOREG (default), SpecChannel.DONTREG (do not register), SpecChannel.WAITREG (delayed registration until Spec is reconnected)

connected(self)

source code 

Do registration when Spec gets connected

If registration flag is WAITREG put the flag to DOREG if not yet connected, and register if DOREG

register(self)

source code 

Register channel

Registering a channel means telling the server we want to receive update events when a channel value changes on the server side.

read(self)

source code 

Read the channel value

If channel is registered, just return the internal value, else obtain the channel value and return it.