def establishLink(self): elp = udrv.EstablishLinkParams() elr = udrv.EstablishLinkResults() err = self._cmd(udrv.CC_ESTABLISH_LINK, elp, elr) if not err: self.queryCCDInfo() return err
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'
#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 shutter_position='Closed' filename='None' imtype='none' exposure_active=False