TwiceAsNice  2019-02-18
Public Member Functions | Private Member Functions | Private Attributes | List of all members
indiclient._blocking_indi_object_handler Class Reference
Inheritance diagram for indiclient._blocking_indi_object_handler:
Inheritance graph
Collaboration diagram for indiclient._blocking_indi_object_handler:
Collaboration graph

Public Member Functions

def __init__ (self)
 
def indi_object_change_notify (self, args)
 
def on_indiobject_changed (self, args)
 
def configure (self, args)
 

Private Member Functions

def _block (self)
 
def _unblock (self)
 
def _is_blocked (self)
 

Private Attributes

 _blocked
 

Detailed Description

This very abstract class makes sure that something can be blocked while the handler for the 
indi object L{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).
@ivar _blocked: A counter incremented each time the L{_block} method is called and decremented by L{_unblock}, >0 means blocked, ==0 mean unblocked 
@type _blocked: IntType

Constructor & Destructor Documentation

◆ __init__()

def indiclient._blocking_indi_object_handler.__init__ (   self)

Member Function Documentation

◆ _block()

def indiclient._blocking_indi_object_handler._block (   self)
private
activates the block. 
@return: B{None}
@rtype:  NoneType

◆ _is_blocked()

def indiclient._blocking_indi_object_handler._is_blocked (   self)
private
@return: C{True} if blocked , C{False} otherwise
@rtype:  BooleanType

◆ _unblock()

def indiclient._blocking_indi_object_handler._unblock (   self)
private
releases the block. You have to call it as many times as you called L{_block} in order to release it, otherwise it will stay blocked.
@return: B{None}
@rtype:  NoneType

◆ configure()

def indiclient._blocking_indi_object_handler.configure (   self,
  args 
)
This method will be called at least once by L{indiclient}. It will be called before L{on_indiobject_changed} has been called for the first time.
It will be called with the same parameters as L{on_indiobject_changed}. It can be implemented to do some lengthy configuration of some object.
@param args: The L{indiobject} (or indiobjects) that shall be used to configure the GUI object
@type args: list
@return: B{None}
@rtype:  NoneType       

◆ indi_object_change_notify()

def indiclient._blocking_indi_object_handler.indi_object_change_notify (   self,
  args 
)
This method activates the block, calls the method  L{on_indiobject_changed}
(It is called by L{bigindiclient.process_events} each time an INDI object has been received)
@param args: The L{indiobject} (or indiobjects) that shall be used to update the GUI object
@type args: list
@return: B{None}
@rtype:  NoneType       

◆ on_indiobject_changed()

def indiclient._blocking_indi_object_handler.on_indiobject_changed (   self,
  args 
)
While this function is called the block is active. 
B{Implement your custom hander here!!} (by overloading this function)
@param args: The L{indiobject} (or indiobjects) that shall be used to update the GUI object
@type args: list
@return: B{None}
@rtype:  NoneType

Member Data Documentation

◆ _blocked

indiclient._blocking_indi_object_handler._blocked
private

The documentation for this class was generated from the following file: