First, to be able to send a signal at a specific timestamp, you must have at least one RX stream open, because the timestamp is actually a counter linked to the number of samples received.
Second, while it’s possible to ask for a signal to be sent at a specific timestamp, I don’t think it’s possible to ask to receive samples starting at a specific timestamp. See lms_stream_meta_t Struct Reference
Timestamp is a value of HW counter with a tick based on sample rate. In RX: time when the first sample in the returned buffer was received In TX: time when the first sample in the submitted buffer should be send
In TX: wait for the specified HW timestamp before broadcasting data over the air In RX: not used/ignored
From what I understand, in RX, the timestamp value you pass will not be used, and it will be set automatically to the received samples.
You should be able to do it as follow:
- Start both RX and TX stream, so that you can use timestamp on the TX side
- Read some samples from RX to know the current timestamp used
- Schedule a signal to send far enough in the future, to be sure that signal reaches the Lime on time
- Continue reading samples from RX, and check the timestamp to only analyze the samples after your signal was sent (if your RX and TX are at the same frequency, you could also analyze the samples where your signal is supposed to be, to make sure the transmission worked)
Depending on your requirements you may need to use 2 threads: 1 for RX, 1 for TX. Your RX thread could continually receive the samples and check their timestamps. It would either discard them or do some analysis.