badger/lbus_access.py
def exchange(self, addrs, values=None, drop_reply=False):
        """Accepts a list of address and values (None to read).
        Returns a numpy.ndarray in the same order.
        """
        addrs = list(addrs)

        consec = False
        # Check for consecutive addresses if burst mode available
        if self.burst_avail and len(addrs) > 1 and (addrs == list(range(addrs[0], addrs[-1]+1))):
            consec = True

        if values is None:
            values = [None]*len(addrs)
        else:
            values = list(values)

        ret = numpy.zeros(len(addrs), be32)
        n_tx = 255 if consec else 127
        for i in range(0, len(addrs), n_tx):
            A, B = addrs[i:i+n_tx], values[i:i+n_tx]

            P = self._exchange(A, B, drop_reply=drop_reply, burst=consec)
            if not drop_reply:
                ret[i:i+n_tx] = P

        return ret
Accepts a list of address and values (None to read).
        Returns a numpy.ndarray in the same order.
        
Accepts a list of address and values (None to read).
Returns a numpy.ndarray in the same order.
Accepts a list of address and values ( None to read ) . Returns a numpy . ndarray in the same order .
def exchange(self, addrs, values=None, drop_reply=False):
        addrs = list(addrs)
        consec = False
        if self.burst_avail and len(addrs) > 1 and (addrs == list(range(addrs[0], addrs[-1]+1))):
            consec = True
        if values is None:
            values = [None]*len(addrs)
        else:
            values = list(values)
        ret = numpy.zeros(len(addrs), be32)
        n_tx = 255 if consec else 127
        for i in range(0, len(addrs), n_tx):
            A, B = addrs[i:i+n_tx], values[i:i+n_tx]
            P = self._exchange(A, B, drop_reply=drop_reply, burst=consec)
            if not drop_reply:
                ret[i:i+n_tx] = P
        return ret
def exchange ( self , addrs , values = None , drop_reply = False ) : addrs = list ( addrs ) consec = False if self . burst_avail and len ( addrs ) > 1 and ( addrs == list ( range ( addrs [ 0 ] , addrs [ - 1 ] + 1 ) ) ) : consec = True if values is None : values = [ None ] * len ( addrs ) else : values = list ( values ) ret = numpy . zeros ( len ( addrs ) , be32 ) n_tx = 255 if consec else 127 for i in range ( 0 , len ( addrs ) , n_tx ) : A , B = addrs [ i : i + n_tx ] , values [ i : i + n_tx ] P = self . _exchange ( A , B , drop_reply = drop_reply , burst = consec ) if not drop_reply : ret [ i : i + n_tx ] = P return ret
Accepts a list of address and values (None to read).
Accepts a list of address and values ( None to read ) .
"""Accepts a list of address and values (None to read).
        Returns a numpy.ndarray in the same order.
        """ # Check for consecutive addresses if burst mode available
self
addrs
values
drop_reply