Thanks Jordan, this is super helpful.
I made the uhd/gr-uhd changes that josh suggested and using the following code snippet. I now can see EVENT_CODE_BURST_ACK (event code == 0) messages coming back from UHD at approximately 30msec intervals.
self.async_msgq = gr.msg_queue(0)
self.uhd_amsg_source_0 = uhd.amsg_source("addr=192.168.102.1", self.async_msgq)
self.async_rcv = gru.msgq_runner(self.async_msgq, self.async_callback)
def async_callback(self, msg):
md = self.uhd_amsg_source_0.msg_to_async_metadata_t(msg)
print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code)
In josh's example he sets the user_payload field with presumably a buffer occupancy value. I'm getting lost in the swiggyness here and can't figure out how to print a value of type <Swig Object of type 'uint_fast16_t *' at 0x9894188> any suggestions there?
I'm guessing what you are doing is writing a block which handles messages and in the event the occupancy drops below a certain amount, you write more source data out.