Module indiclient :: Class _blocking_indi_object_handler
[show private | hide private]
[frames | no frames]

Class _blocking_indi_object_handler

Known Subclasses:
gui_indi_object_handler

This very abstract class makes sure that something can be blocked while the handler for the indi object on_indiobject_changed is executed. Its does not define what shall be blocked or what blocking actually means. So for itself it just does nothing with nothing. Classes inheriting from this class use it to detect "GUI changed" signals that are caused by indiclient derived classes changing the gui, (and could cause client server loopbacks, or data losses if not treated properly).
Method Summary
  __init__(self)
NoneType _block(self)
activates the block.
BooleanType _is_blocked(self)
Return True if blocked , False otherwise
NoneType _unblock(self)
releases the block.
NoneType configure(self, *args)
This method will be called at least once by indiclient.
NoneType indi_object_change_notify(self, *args)
This method activates the block, calls the method on_indiobject_changed (It is called by bigindiclient.process_events each time an INDI object has been received)
NoneType on_indiobject_changed(self, *args)
While this function is called the block is active.

Instance Variable Summary
IntType _blocked: A counter incremented each time the _block method is called and decremented by _unblock, >0 means blocked, ==0 mean unblocked

Method Details

_block(self)

activates the block.
Returns:
None
           (type=NoneType)

_is_blocked(self)

Returns:
True if blocked , False otherwise
           (type=BooleanType)

_unblock(self)

releases the block. You have to call it as many times as you called _block in order to release it, otherwise it will stay blocked.
Returns:
None
           (type=NoneType)

configure(self, *args)

This method will be called at least once by indiclient. It will be called before on_indiobject_changed has been called for the first time. It will be called with the same parameters as on_indiobject_changed. It can be implemented to do some lengthy configuration of some object.
Parameters:
args - The indiobject (or indiobjects) that shall be used to configure the GUI object
           (type=list)
Returns:
None
           (type=NoneType)

indi_object_change_notify(self, *args)

This method activates the block, calls the method on_indiobject_changed (It is called by bigindiclient.process_events each time an INDI object has been received)
Parameters:
args - The indiobject (or indiobjects) that shall be used to update the GUI object
           (type=list)
Returns:
None
           (type=NoneType)

on_indiobject_changed(self, *args)

While this function is called the block is active. Implement your custom hander here!! (by overloading this function)
Parameters:
args - The indiobject (or indiobjects) that shall be used to update the GUI object
           (type=list)
Returns:
None
           (type=NoneType)

Instance Variable Details

_blocked

A counter incremented each time the _block method is called and decremented by _unblock, >0 means blocked, ==0 mean unblocked
Type:
IntType

Generated by Epydoc 2.1 on Sat Sep 10 10:26:06 2005 http://epydoc.sf.net