The drivers communicate with libsigrok (and the frontend that registered a callback) via packets. The packet type (SR_DF_*) denotes what's in the packet. Every stream starts with SR_DF_HEADER, followed by (in the case of collectd) SR_DF_ANALOG packets, which contain measurements.

In the case of sigrok + collectd, it's supposed to run forever, of course -- no SR_DF_END is supposed to come, as that ends the packet stream. It can happen when, for example, a USB-connected device gets unplugged -- that's pretty fatal for acquisition.

I haven't yet decided how to deal with this -- I need to be sure that this is completely consistent within libsigrok and all its drivers first. My feeling is that it should be doable to try and find the device again at some relaxed pace. Hence the TODO: I will revisit this when I'm sure.