HappyDoc Generated Documentation Class: LXSerial

lx200 / LXSerial.py / LXSerial 

Methods   
  scan_ports 
scan_ports ( self )

check all com ports possible for LX connections

  test_baud_rates 
test_baud_rates ( self,  portNum )

check com port for possible speeds blist[0] will be the fastest

  connect 
connect (
        self,
        port,
        baud=9600,
        ptimeout=10,
        )

Opens the port and checks for a telescope - port can be int: [0,...], or alpha: "COMn" - ptimeout>240 recommended for LX200GPS using auto_align

Exceptions   

LX200Error, "Port " + str( self.connectedPort ) + " doesn't appear to be connected to an LX200 port; read returned \"" + mode + "\""
LX200Error(str( s ) )
LX200Error("port write error: %s" %(sys.exc_info() [ 0 ] ) )

  CommandString 
CommandString (
        self,
        cmd,
        *args,
        )

issues a command to the telescope, and awaits a string response terminated by a #. returns string

  CommandBlind 
CommandBlind (
        self,
        cmd,
        *args,
        )

simply packages up command letters in #: # and sends to telescope

  __repr__ 
__repr__ ( self )

Return a representation string.

  set_baud_rate 
set_baud_rate ( self,  baud )

Set Baud Rate n, where n is an ASCII digit (1..9) with the following interpertation 1 56.7K 2 38.4K 3 28.8K 4 19.2K 5 14.4K 6 9600 7 4800 8 2400 9 1200 Returns: 1 At the current baud rate and then changes to the new rate for further communication

Exceptions   

LX200Error( "baud " + str( baud ) + " is not one of 56.7, 38.4, 28.8, 19.2, 14.4, 9600, 4800, 2400, 1200" )

  CommandBool 
CommandBool (
        self,
        cmd,
        *args,
        )

issues command and checks for 0 or 1 response. returns true on success. no hash returned in response.

  close 
close ( self )

close the com port

  __init__ 
__init__ ( self,  debug=False )

Constructor. Arguments: serial port where the LX200 is connected Note: two ports can be opened on the LX200 - access to the port settings trough Python properties - port numbering starts at zero, no need to know the platform dependant port name in the user program - port name can be specified if access through numbering is inappropriate

if self.debug == True, port reads will return the last command chars, and no scope need be connected

  read_to_hash 
read_to_hash ( self )

reads from port until hash encountered and returns


This document was automatically generated Sun Jul 02 11:19:14 2006 by HappyDoc version 3.0.a1