Ejemplo n.º 1
0
	def cmd_establishLink(self,the_command):
		'''reconnects the link without having to quit the server, in case you change your mind after closing the link essentially'''
		sb.SBIGUnivDrvCommand(sb.CC_OPEN_DRIVER, None,None)
		r = sb.QueryUSBResults()
		sb.SBIGUnivDrvCommand(sb.CC_QUERY_USB, None,r)
		p = sb.OpenDeviceParams()
		p.deviceType=0x7F00
		sb.SBIGUnivDrvCommand(sb.CC_OPEN_DEVICE, p, None)
		p = sb.EstablishLinkParams()
		r = sb.EstablishLinkResults()
		sb.SBIGUnivDrvCommand(sb.CC_ESTABLISH_LINK,p,r)
		return 'link established \n'	
Ejemplo n.º 2
0
    def openDevice(self, device):

        odp = udrv.OpenDeviceParams()
        odp.deviceType = device

        try:
            return self._cmd(udrv.CC_OPEN_DEVICE, odp, None)
        except SBIGException, e:
            if e.code == udrv.CE_DEVICE_NOT_CLOSED:
                # device already open (are you trying to use the tracking ccd?)
                return True
            else:
                raise
Ejemplo n.º 3
0
import matplotlib.pyplot as plt
import pyfits
import time
import ctypes
import os
#import the tools to do time and coordinate transforms
import ctx

#the following lines establish a link with the camera via the USB port, these run 
#automatically when sbigudrv_main is excecuted
sb.SBIGUnivDrvCommand(sb.CC_OPEN_DRIVER, None,None)

r = sb.QueryUSBResults()
sb.SBIGUnivDrvCommand(sb.CC_QUERY_USB, None,r)

p = sb.OpenDeviceParams()
# The next line is the first available USB camera
p.deviceType=0x7F00
sb.SBIGUnivDrvCommand(sb.CC_OPEN_DEVICE, p, None)

p = sb.EstablishLinkParams()
r = sb.EstablishLinkResults()
sb.SBIGUnivDrvCommand(sb.CC_ESTABLISH_LINK,p,r)

class SBigUDrv:
	#Some parameters for the default status

	
        #parameters related to the exposure settings and whether there is an image being taken at any given time.
	exposing=False
	exptime=0