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

Public Member Functions

def __init__ (self, devicename, vectorname, elementname)
 
def configure (self, vector, element)
 
def on_indiobject_changed (self, vector, element)
 
def get_vector (self)
 
def get_element (self)
 
- Public Member Functions inherited from indiclient.gui_indi_object_handler
def on_blocked (self, args)
 
def on_gui_changed (self, args)
 
def set_bidirectional (self)
 
def unset_bidirectional (self)
 
- Public Member Functions inherited from indiclient._blocking_indi_object_handler
def __init__ (self)
 
def indi_object_change_notify (self, args)
 
def on_indiobject_changed (self, args)
 
def configure (self, args)
 
- Public Member Functions inherited from indiclient.indi_element_identifier
def __init__ (self, devicename, vectorname, elementname)
 
- Public Member Functions inherited from indiclient.indi_vector_identifier
def __init__ (self, devicename, vectorname)
 

Public Attributes

 type
 
- Public Attributes inherited from indiclient.indi_element_identifier
 elementname
 
- Public Attributes inherited from indiclient.indi_vector_identifier
 devicename
 
 vectorname
 

Detailed Description

A base class for a custom handler that will be called each time a specified INDI element is received.
You have to write a class, inheriting from this one and to overload the L{on_indiobject_changed} method in order to add a custom handler. \n
@ivar indi : The indiclient instance calling this handler (will be set by indiclient automatically)
@type indi : L{indiclient}
@ivar devicename : The name of the device this handler is associated with
@type devicename : StringType
@ivar vectorname  : The name of the indivector this handler is associated with
@type vectorname  : StringType
@ivar elementname : The name of the indielement this handler is associated with
@type elementname : StringType
@ivar type  : The type of the handler
@type type  : StringType

Constructor & Destructor Documentation

◆ __init__()

def indiclient.indi_custom_element_handler.__init__ (   self,
  devicename,
  vectorname,
  elementname 
)
@param devicename:  The name of the device
@type devicename: StringType
@param vectorname: The name of the Indivector
@type vectorname: StringType
@param elementname: name of the INDI element
@type elementname: StringType

Member Function Documentation

◆ configure()

def indiclient.indi_custom_element_handler.configure (   self,
  vector,
  element 
)
This hander method will be called only once. It will be called before the L{on_indiobject_changed} method is called for the 
first time. It will be called as soon as B{vector} has been received for the first time.
It can be used to do some lengthy calculations in order to set up related data structures that need to be done
only once and require information from the associated L{indivector} and L{indielement} objects. 
@param vector:  A copy of the L{indivector} that has been received.  
@type vector: L{indivector}     
@param element:  A copy of the L{indielement} that has been received
@type element: L{indielement}   
@return: B{None}
@rtype: NoneType        

◆ get_element()

def indiclient.indi_custom_element_handler.get_element (   self)
Returns the L{indielement} this handler is associated with.
@return: the L{indielement} this handler is associated with
@rtype: L{indielement}

◆ get_vector()

def indiclient.indi_custom_element_handler.get_vector (   self)
Returns the L{indivector} this handler is associated with.
@return: the L{indivector} this handler is associated with
@rtype: L{indivector}

◆ on_indiobject_changed()

def indiclient.indi_custom_element_handler.on_indiobject_changed (   self,
  vector,
  element 
)
This hander method will be called each time the specified INDI element/vector is received.
You have to write a class inheriting from this class and overload this function.
@param vector:  A copy of the L{indivector} that has been received.  
@type vector: L{indivector}     
@param element:  A copy of the L{indielement} that has been received
@type element: L{indielement}   
@return: B{None}
@rtype: NoneType        

Member Data Documentation

◆ type

indiclient.indi_custom_element_handler.type

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