From e4517deef3f0ed18112c08ecbbd7baef9dedaa74 Mon Sep 17 00:00:00 2001 From: Samuel O'Brien Date: Fri, 24 Jul 2020 16:14:08 -0500 Subject: sim: Support Timed Streams The only difference between a standard and timed stream is that the first data packet of a timed stream contains a timestamp. This commit adds the necessary fields to StreamSpec to accomplish this. Signed-off-by: Samuel O'Brien --- mpm/python/usrp_mpm/simulator/chdr_stream.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mpm/python/usrp_mpm/simulator/chdr_stream.py') diff --git a/mpm/python/usrp_mpm/simulator/chdr_stream.py b/mpm/python/usrp_mpm/simulator/chdr_stream.py index f63fba050..7147a98b5 100644 --- a/mpm/python/usrp_mpm/simulator/chdr_stream.py +++ b/mpm/python/usrp_mpm/simulator/chdr_stream.py @@ -195,6 +195,9 @@ class ChdrOutputStream: if num_samps_left == 0: break header.seq_num = seq_num + timestamp = self.stream_spec.init_timestamp \ + if seq_num == 0 and self.stream_spec.is_timed \ + else None packet = ChdrPacket(self.chdr_w, header, bytes(0)) packet_samples = self.stream_spec.packet_samples if num_samps_left is not None: -- cgit v1.2.3