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

Public Member Functions

def __init__ (self, attrs, tag)
 
def get_message (self)
 
def tell (self)
 
def get_light (self)
 
def get_permissions (self)
 
def get_element (self, elementname)
 
def get_first_element (self)
 
def wait_for_ok_timeout (self, timeout)
 
def wait_for_ok (self)
 
def update (self, attrs, tag)
 
def get_xml (self, transfertype)
 
def updateByVector (self, vector)
 
def getDevice (self)
 
- Public Member Functions inherited from indiclient.indinamedobject
def __init__ (self, attrs, tag)
 
def getName (self)
 
- Public Member Functions inherited from indiclient.indiobject
def __init__ (self, attrs, tag)
 
def is_valid (self)
 
def get_xml (self, transfertype)
 
def update (self, attrs, tag)
 

Public Attributes

 device
 
 timestamp
 
 timeout
 
 group
 
 elements
 
 port
 
 host
 
- Public Attributes inherited from indiclient.indinamedobject
 name
 
 label
 
- Public Attributes inherited from indiclient.indiobject
 tag
 

Private Member Functions

def _get_changed (self)
 
def _wait_for_ok_general (self, checkinterval, timeout)
 

Private Attributes

 _light
 
 _perm
 
 _message
 

Detailed Description

The base class of all INDI vectors \n
@ivar host : The hostname of the server that send the vector
@type host : StringType
@ivar port : The port on which the server send the vector
@type port : IntType
@ivar elements  : The list of L{indielement} objects contained in the vector
@type elements  : list of L{indielement}
@ivar _perm : The users read/write permissions for the  vector
@type _perm : L{indipermissions}
@ivar group : The INDI group the vector belongs to
@type group : StringType
@ivar _light : The StatusLED of the vector
@type _light : L{indilight} 
@ivar timeout  : The timeout value. According to the indi white paper it is defined as follows:
Each Property has a timeout value that specifies the worst-case time it might
take to change the value to something else The Device may report changes to the timeout
value depending on current device status. Timeout values give Clients a simple
ability to detect dysfunctional Devices or broken communication and also gives them 
a way to predict the duration of an action for scheduling purposes as discussed later

@type timeout  : StringType
@ivar timestamp : The time when the vector was send out by the INDI server.
@type timestamp : StringType
@ivar device  : The INDI device the vector belongs to
@type device  : StringType
@ivar _message  : The L{indimessage} associated with the vector or B{None} if not present 
@type _message  : L{indimessage}

Constructor & Destructor Documentation

◆ __init__()

def indiclient.indivector.__init__ (   self,
  attrs,
  tag 
)
@param attrs: The attributes of the XML version of the INDI vector.
@type attrs: DictType
@param tag: The XML tag of the vector (see L{indixmltag}).
@type tag: L{indixmltag}

Member Function Documentation

◆ _get_changed()

def indiclient.indivector._get_changed (   self)
private
@return: C{True} if the objects XML data was changed since the last L{_get_changed} was called, 
C{False} otherwise.
@rtype: BooleanType

◆ _wait_for_ok_general()

def indiclient.indivector._wait_for_ok_general (   self,
  checkinterval,
  timeout 
)
private
Wait until its state is C{Ok}. Usually this means to wait until the server has
finished the operation requested by sending this vector. 
@param timeout: An exception will be raised if the no C{Ok} was received for longer than timeout
since this method was called.
@type timeout: FloatType
@param checkinterval: The interval in which this method will check if the state is {Ok}
@type checkinterval: FloatType      
@return: B{None}
@rtype: NoneType

◆ get_element()

def indiclient.indivector.get_element (   self,
  elementname 
)
Returns an element on this vector matching a given name.
@param elementname: The name of the element requested
@type elementname:  StringType
@return: The element requested 
@rtype: L{indielement} 

◆ get_first_element()

def indiclient.indivector.get_first_element (   self)
Returns the first element on this vector.
@return: The first element  
@rtype: L{indielement} 

◆ get_light()

def indiclient.indivector.get_light (   self)
Returns the L{indilight} of the vector
@return: L{indilight} of the vector
@rtype: L{indilight}

◆ get_message()

def indiclient.indivector.get_message (   self)
@return: The L{indimessage} associated with the vector, if there is any, B{None} otherwise 
@rtype: L{indimessage}

◆ get_permissions()

def indiclient.indivector.get_permissions (   self)
Returns the read/write permission of the vector
@return: the read/write permission of the vector
@rtype: L{indipermissions}

◆ get_xml()

def indiclient.indivector.get_xml (   self,
  transfertype 
)

◆ getDevice()

def indiclient.indivector.getDevice (   self)

◆ tell()

def indiclient.indivector.tell (   self)
" 
Prints the most important parameters of the vector and its elements.
@return: B{None}
@rtype: NoneType

◆ update()

def indiclient.indivector.update (   self,
  attrs,
  tag 
)

◆ updateByVector()

def indiclient.indivector.updateByVector (   self,
  vector 
)

◆ wait_for_ok()

def indiclient.indivector.wait_for_ok (   self)
Wait until its state is C{Ok}. Usually this means to wait until the server has
finished the operation requested by sending this vector. 
@return: B{None}
@rtype: NoneType

◆ wait_for_ok_timeout()

def indiclient.indivector.wait_for_ok_timeout (   self,
  timeout 
)
@param timeout: The time after which the L{_light} property of the object has to turn ok .
@type timeout: FloatType
@return: B{None}
@rtype:  NoneType

Member Data Documentation

◆ _light

indiclient.indivector._light
private

◆ _message

indiclient.indivector._message
private

◆ _perm

indiclient.indivector._perm
private

◆ device

indiclient.indivector.device

◆ elements

indiclient.indivector.elements

◆ group

indiclient.indivector.group

◆ host

indiclient.indivector.host

◆ port

indiclient.indivector.port

◆ timeout

indiclient.indivector.timeout

◆ timestamp

indiclient.indivector.timestamp

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