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

Class indivector

 indiobject --+    
              |    
indinamedobject --+
                  |
                 indivector

Known Subclasses:
indiblobvector, indilightvector, indinumbervector, indiswitchvector, inditextvector

The base class of all INDI vectors
Method Summary
  __init__(self, attrs, tag)
indielement get_element(self, elementname)
Returns an element on this vector matching a given name.
indielement get_first_element(self)
Returns the first element on this vector.
indilight get_light(self)
Returns the indilight of the vector
indimessage get_message(self)
Return the indimessage associated with the vector, if there is any, None otherwise
indipermissions get_permissions(self)
Returns the read/write permission of the vector
StringType get_xml(self, transfertype)
Returns an XML representation of the object
NoneType tell(self)
" Prints the most important parameters of the vector and its elements.
NoneType update(self, attrs, tag)
Update this element with data received form the XML Parser.
NoneType wait_for_ok(self)
Wait until its state is Ok.
NoneType wait_for_ok_timeout(self, timeout)
Return None
BooleanType _get_changed(self)
Return True if the objects XML data was changed since the last _get_changed was called, False otherwise.
NoneType _wait_for_ok_general(self, checkinterval, timeout)
Wait until its state is Ok.
    Inherited from indiobject
BooleanType is_valid(self)
Checks whether the object is valid.
NoneType _check_writeable(self)
Raises an exception if the object is not writable

Instance Variable Summary
StringType device: The INDI device the vector belongs to
list of indielement elements: The list of indielement objects contained in the vector
StringType group: The INDI group the vector belongs to
StringType host: The hostname of the server that send the vector
IntType port: The port on which the server send the vector
StringType timeout: The timeout value.
StringType timestamp: The time when the vector was send out by the INDI server.
indilight _light: The StatusLED of the vector
indimessage _message: The indimessage associated with the vector or None if not present
indipermissions _perm: The users read/write permissions for the vector
    Inherited from indinamedobject
StringType label: label of the INDI object as given in the "label" XML attribute
StringType name: name of the INDI object as given in the "name" XML attribute
    Inherited from indiobject
indixmltag tag: The XML tag of the INDI object (see indixmltag).

Method Details

__init__(self, attrs, tag)
(Constructor)

Parameters:
attrs - The attributes of the XML version of the INDI vector.
           (type=DictType)
tag - The XML tag of the vector (see indixmltag).
           (type=indixmltag)
Overrides:
indiclient.indinamedobject.__init__

get_element(self, elementname)

Returns an element on this vector matching a given name.
Parameters:
elementname - The name of the element requested
           (type=StringType)
Returns:
The element requested
           (type=indielement)

get_first_element(self)

Returns the first element on this vector.
Returns:
The first element
           (type=indielement)

get_light(self)

Returns the indilight of the vector
Returns:
indilight of the vector
           (type=indilight)

get_message(self)

Returns:
The indimessage associated with the vector, if there is any, None otherwise
           (type=indimessage)

get_permissions(self)

Returns the read/write permission of the vector
Returns:
the read/write permission of the vector
           (type=indipermissions)

get_xml(self, transfertype)

Returns an XML representation of the object
Parameters:
transfertype - The inditransfertype for which the XML code shall be generated
           (type={inditransfertype})
Returns:
an XML representation of the object
           (type=StringType)
Overrides:
indiclient.indiobject.get_xml (inherited documentation)

tell(self)

" Prints the most important parameters of the vector and its elements.
Returns:
None
           (type=NoneType)

update(self, attrs, tag)

Update this element with data received form the XML Parser.
Parameters:
attrs - The attributes of the XML version of the INDI object.
           (type=DictType)
tag - The XML tag of the object (see indixmltag).
           (type=indixmltag)
Returns:
None
           (type=NoneType)
Overrides:
indiclient.indiobject.update (inherited documentation)

wait_for_ok(self)

Wait until its state is Ok. Usually this means to wait until the server has finished the operation requested by sending this vector.
Returns:
None
           (type=NoneType)

wait_for_ok_timeout(self, timeout)

Parameters:
timeout - The time after which the _light property of the object has to turn ok .
           (type=FloatType)
Returns:
None
           (type=NoneType)

_get_changed(self)

Returns:
True if the objects XML data was changed since the last _get_changed was called, False otherwise.
           (type=BooleanType)

_wait_for_ok_general(self, checkinterval, timeout)

Wait until its state is Ok. Usually this means to wait until the server has finished the operation requested by sending this vector.
Parameters:
checkinterval - The interval in which this method will check if the state is {Ok}
           (type=FloatType)
timeout - An exception will be raised if the no Ok was received for longer than timeout since this method was called.
           (type=FloatType)
Returns:
None
           (type=NoneType)

Instance Variable Details

device

The INDI device the vector belongs to
Type:
StringType

elements

The list of indielement objects contained in the vector
Type:
list of indielement

group

The INDI group the vector belongs to
Type:
StringType

host

The hostname of the server that send the vector
Type:
StringType

port

The port on which the server send the vector
Type:
IntType

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:
StringType

timestamp

The time when the vector was send out by the INDI server.
Type:
StringType

_light

The StatusLED of the vector
Type:
indilight

_message

The indimessage associated with the vector or None if not present
Type:
indimessage

_perm

The users read/write permissions for the vector
Type:
indipermissions

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