예제 #1
0
class NIA_Interface():
    """ Attaches the NIA device, and provides low level data collection and information
    """
    def __init__(self,address):
        self.address = address
        self.QUEUE_SIZE = 40

    def open(self) :
        """ Attache NeuroClient
        """
        try:
            print "Openning connection to neuroserver instance at {0}:{1}.".format(*self.address)
            self.client = NeuroClientDisp(self.address, self.QUEUE_SIZE)
            self.client.run()
            self.client.watch(0)
        except usb.USBError, err:
            print >> sys.stderr, err
예제 #2
0
 def open(self) :
     """ Attache NeuroClient
     """
     try:
         print "Openning connection to neuroserver instance at {0}:{1}.".format(*self.address)
         self.client = NeuroClientDisp(self.address, self.QUEUE_SIZE)
         self.client.run()
         self.client.watch(0)
     except usb.USBError, err:
         print >> sys.stderr, err