Table of Contents

Module: ccdpc hwdriver/ccdpc.py

Low-level packet driver to communicate to the kappaccd-controlling Windows PC.

It should not be necessary to talk at this level. See the ccddrv module instead

Functions   
CCDPC
recvfixed
sendfixed
timeouthandler
  CCDPC 
CCDPC (
        hostname,
        txtout=None,
        idletask=None,
        )

Factory function for a CCD connection.

Returns an instance of the appropriate class, depending on the version of the server software that is running.

  recvfixed 
recvfixed (
        sock,
        length,
        timeouttime=30000,
        idletask=None,
        )

Get a fixed length packet from a socket

parameters:

sock

the socket

length

the total length of the packet that is expected to arrive

optional parameters:

timeouttime

time (seconds) the first frame is allowed to take. (successive frames must arrive within config.packettimeout seconds)

Exceptions   
emptypacket("Invalid packet received after %d other packets, %d bytes" %( len( result ), already ) )
error( "Socket died on us." )
timeout( "Incomplete packet received" )
timeout( "select interrupted by timeout" )
  sendfixed 
sendfixed ( sock,  data )

Send a packet securely over a socket connection

parameters:

sock

the socket

data

the data to be sent

  timeouthandler 
timeouthandler ( sig,  frame )

Signal handler for timeout, turning it into an exception

Classes   
CCDPC3

A driver that uses a level 5 protocol connection.

DebuggingCCDPC

Low level driver that gives debugging output to terminal.

NewCCDPC

Low level connection to the PC controlling the KappaCCD machine.

StandardCCDPC

Low level connection to the PC controlling the KappaCCD machine.

emptypacket

Exception raised when the socket is unexpectedly closed by the server

error

Exception raised for a generic problem encountered in the communications

protocolerror

Exception raised when the server seems to be talking another version of the protocol

timeout

Exception raised when a communications timeout occurs


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING