Hello , I’m a beginner of the USRP and UHD software. I’m sorry l may deliver my 
question unclearly with my broken English.


What I want:
I need to receive the real-time radio signals with a B210 USRP device, 
according to my sample rate,I need an external hard disk to achieve at least 
245.76MB/s using fc32 in my host.  But the USB3.0 hard driver I  connecting to 
the host only get 180MB/s in write mode. Therefore,I want change the CPU_format 
from fc32 to sc16 to decrease the load in the USB3.0 transmission.


What problem I confronted:
I’m not familiar with CPP language, So I choose to drive the B210 with python 
API.When I refer to the source code in Github/UHD , I find an example in 
/UHD/host/python/usrp.py. It tells me how to initialize a RX streamer and start 
receiving samples.These code are
 
….
st_args = lib.usrp.stream_args("fc32", "sc16”)
….

recv_buffer = np.zeros((len(channels), buffer_samps), dtype=np.complex64)
….

samps = streamer.recv(recv_buffer, metadata)
...


I have some confusion as follow:
1、Must the recv_buffer be the numpy complex array? As far as I know, numpy only 
has the dtype complex64 and complex128. If I use the sc16 as the cpu format, 
what kind  of numpy array should  I create to act as the ‘recv_buffer’?

2、I try something workarounds, but I’m not sure the receive data are correct. 
First:  st_args = lib.usrp.stream_args(“sc16", "sc16”)      # I change the CPU 
format to sc16
Second:   recv_buffer = np.zeros((len(channels), buffer_samps*2), 
dtype=np.int16)     # I create the array with double size buffer_samps, and  
assign the ’np.int16’ to the dtype.
Finally:   samps = streamer.recv(recv_buffer, metadata)   # receive the data in 
the int16 array

I guess the recv() function will return I and Q samples in pairs.I can print 
the integer from the array, but cannot confirm the correctness of this ‘method’.


Please give me some suggestions about how to use ’sc16’ in python, I will 
appreciate it in advance!!















_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to