MATLAB: Using USRP UHD’s “rx_timed_samples” and “tx_timed_samples” uhd utilities

.Communications ToolboxMATLABn210precision timingtdma radio protocoluhdusrp

Hello, I was thinking of creating a simple TDMA radio using a USRP N210 in Matlab 2015a. One problem is that I don't think I can obtain deterministic and synchronized timing between two radios because of the asynchronous and non-realtime nature of USRPs. I did find that there is a compiled UHD utility written originally in C that appears to make some low level FPGA streaming calls with time-based triggers so that either Tx or Rx occurs precisely at some point in the future.
I have a couple questions about this utility:
1. It is available in the UHD utility directory. Is this a utility that Matlab supports?
2. Is it possible to pull the received data back from the "rx_timed_samples" call that I was able to successfully make through the call_uhd_apps('xxx') function.
3. If it isn't, and is more of a functional demo. Is it feasible for me to modify the original "rx_timed_samples" c code and then modify the call_uhd_apps function so that I can get data back into the workspace?
Thank you, Alex
Edit: I just read through the code for the rx_timed_samples.cc example on the Ettus website and it doesn't look like it returns the data anywhere – it is more of an example of how to connect to a streaming object. That said, I'm still interested in knowing if it is possible to compile new UHD utilities and/or MEX them and bring them into Matlab. I'm assuming that it is always possible to MEX, but I haven't tried it yet with UHD projects yet.
https://github.com/EttusResearch/uhd/blob/master/host/examples/rx_timed_samples.cpp

Best Answer

No, unfortunately I did not make progress on getting timed operations to work using Matlab's USRP support package. I was successful in writing a program in C that makes the appropriate calls to the UHD library. Another option is using tagged streams in gnuradio.