def update(self, timeout_ms=None, mintime_ms=None):
    'Update the tracking state w.r.t. the data source\n\n        By adding data to the data_ringbuffer, stimulus info to the stimulus_ringbuffer, \n        and other messages to the messages ring buffer.\n\n        Args\n         timeout_ms : int\n             max block waiting for messages before returning\n         mintime_ms : int\n             min time to accumulate messages before returning\n        Returns\n          newmsgs : [newMsgs :UtopiaMessage]\n             list of the *new* utopia messages from the server\n          nsamp: int\n             number of new data samples in this call\n             Note: use data_ringbuffer[-nsamp:,...] to get the new data\n          nstimulus : int\n             number of new stimulus events in this call\n             Note: use stimulus_ringbuffer[-nstimulus:,...] to get the new data\n        '
    if (timeout_ms is None):
        timeout_ms = self.timeout_ms
    if (mintime_ms is None):
        mintime_ms = self.mintime_ms
    if (not self.isConnected()):
        self.connect()
    if (not self.isConnected()):
        return ([], 0, 0)
    t0 = self.getTimeStamp()
    nsamp = 0
    nmsg = 0
    nstimulus = 0
    if (self.data_ringbuffer is None):
        (nsamp, nmsg) = self.initDataRingBuffer()
    if (self.stimulus_ringbuffer is None):
        self.initStimulusRingBuffer()
    if (self.last_log_ts is None):
        self.last_log_ts = self.getTimeStamp()
    if (t0 is None):
        t0 = self.getTimeStamp()
    newmsgs = self.newmsgs
    self.newmsgs = []
    ttg = (timeout_ms - (self.getTimeStamp() - t0))
    while (ttg > 0):
        if (ttg >= mintime_ms):
            sleep((mintime_ms / 1000.0))
            ttg = (timeout_ms - (self.getTimeStamp() - t0))
        msgs = self.getNewMessages(ttg)
        print('.', end='')
        for m in msgs:
            m = self.preprocess_message(m)
            print('{:c}'.format(m.msgID), end='', flush=True)
            if (m.msgID == DataPacket.msgID):
                d = self.processDataPacket(m)
                self.data_ringbuffer.extend(d)
                nsamp = (nsamp + d.shape[0])
            elif (m.msgID == StimulusEvent.msgID):
                d = self.processStimulusEvent(m)
                self.stimulus_ringbuffer.append(d)
                nstimulus = (nstimulus + 1)
            else:
                if ((m.msgID == NewTarget.msgID) or (m.msgID == Selection.msgID)):
                    d = self.processStimulusEvent(StimulusEvent(m.timestamp, np.arange(255, dtype=np.int32), np.zeros(255, dtype=np.int8)))
                    self.stimulus_ringbuffer.append(d)
                    self.stimulus_timestamp = m.timestamp
                if ((len(self.msg_ringbuffer) > 0) and (m.timestamp > (self.msg_ringbuffer[0].timestamp + self.msgwindow_ms))):
                    self.msg_ringbuffer.popleft()
                self.msg_ringbuffer.append(m)
                newmsgs.append(m)
                nmsg = (nmsg + 1)
                self.msg_timestamp = m.timestamp
        ttg = (timeout_ms - (self.getTimeStamp() - t0))
    if (self.getTimeStamp() > (self.last_log_ts + 2000)):
        print('', flush=True)
        self.last_log_ts = self.getTimeStamp()
    return (newmsgs, nsamp, nstimulus)
Update the tracking state w.r.t. the data source

By adding data to the data_ringbuffer, stimulus info to the stimulus_ringbuffer, 
and other messages to the messages ring buffer.

Args
 timeout_ms : int
     max block waiting for messages before returning
 mintime_ms : int
     min time to accumulate messages before returning
Returns
  newmsgs : [newMsgs :UtopiaMessage]
     list of the *new* utopia messages from the server
  nsamp: int
     number of new data samples in this call
     Note: use data_ringbuffer[-nsamp:,...] to get the new data
  nstimulus : int
     number of new stimulus events in this call
     Note: use stimulus_ringbuffer[-nstimulus:,...] to get the new data
def update(self, timeout_ms=None, mintime_ms=None):
    'Update the tracking state w.r.t. the data source\n\n        By adding data to the data_ringbuffer, stimulus info to the stimulus_ringbuffer, \n        and other messages to the messages ring buffer.\n\n        Args\n         timeout_ms : int\n             max block waiting for messages before returning\n         mintime_ms : int\n             min time to accumulate messages before returning\n        Returns\n          newmsgs : [newMsgs :UtopiaMessage]\n             list of the *new* utopia messages from the server\n          nsamp: int\n             number of new data samples in this call\n             Note: use data_ringbuffer[-nsamp:,...] to get the new data\n          nstimulus : int\n             number of new stimulus events in this call\n             Note: use stimulus_ringbuffer[-nstimulus:,...] to get the new data\n        '
    if (timeout_ms is None):
        timeout_ms = self.timeout_ms
    if (mintime_ms is None):
        mintime_ms = self.mintime_ms
    if (not self.isConnected()):
        self.connect()
    if (not self.isConnected()):
        return ([], 0, 0)
    t0 = self.getTimeStamp()
    nsamp = 0
    nmsg = 0
    nstimulus = 0
    if (self.data_ringbuffer is None):
        (nsamp, nmsg) = self.initDataRingBuffer()
    if (self.stimulus_ringbuffer is None):
        self.initStimulusRingBuffer()
    if (self.last_log_ts is None):
        self.last_log_ts = self.getTimeStamp()
    if (t0 is None):
        t0 = self.getTimeStamp()
    newmsgs = self.newmsgs
    self.newmsgs = []
    ttg = (timeout_ms - (self.getTimeStamp() - t0))
    while (ttg > 0):
        if (ttg >= mintime_ms):
            sleep((mintime_ms / 1000.0))
            ttg = (timeout_ms - (self.getTimeStamp() - t0))
        msgs = self.getNewMessages(ttg)
        print('.', end=)
        for m in msgs:
            m = self.preprocess_message(m)
            print('{:c}'.format(m.msgID), end=, flush=True)
            if (m.msgID == DataPacket.msgID):
                d = self.processDataPacket(m)
                self.data_ringbuffer.extend(d)
                nsamp = (nsamp + d.shape[0])
            elif (m.msgID == StimulusEvent.msgID):
                d = self.processStimulusEvent(m)
                self.stimulus_ringbuffer.append(d)
                nstimulus = (nstimulus + 1)
            else:
                if ((m.msgID == NewTarget.msgID) or (m.msgID == Selection.msgID)):
                    d = self.processStimulusEvent(StimulusEvent(m.timestamp, np.arange(255, dtype=np.int32), np.zeros(255, dtype=np.int8)))
                    self.stimulus_ringbuffer.append(d)
                    self.stimulus_timestamp = m.timestamp
                if ((len(self.msg_ringbuffer) > 0) and (m.timestamp > (self.msg_ringbuffer[0].timestamp + self.msgwindow_ms))):
                    self.msg_ringbuffer.popleft()
                self.msg_ringbuffer.append(m)
                newmsgs.append(m)
                nmsg = (nmsg + 1)
                self.msg_timestamp = m.timestamp
        ttg = (timeout_ms - (self.getTimeStamp() - t0))
    if (self.getTimeStamp() > (self.last_log_ts + 2000)):
        print(, flush=True)
        self.last_log_ts = self.getTimeStamp()
    return (newmsgs, nsamp, nstimulus)