diff options
author | Samuel O'Brien <sam.obrien@ni.com> | 2020-07-24 16:14:08 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-10-28 15:25:48 -0500 |
commit | e4517deef3f0ed18112c08ecbbd7baef9dedaa74 (patch) | |
tree | 91fef5d714104715f9a0db530597a748a0ae9f93 /mpm/python/usrp_mpm/simulator/chdr_stream.py | |
parent | 00c306d5c441e60e7dfd2516e05e4e433977ecee (diff) | |
download | uhd-e4517deef3f0ed18112c08ecbbd7baef9dedaa74.tar.gz uhd-e4517deef3f0ed18112c08ecbbd7baef9dedaa74.tar.bz2 uhd-e4517deef3f0ed18112c08ecbbd7baef9dedaa74.zip |
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 <sam.obrien@ni.com>
Diffstat (limited to 'mpm/python/usrp_mpm/simulator/chdr_stream.py')
-rw-r--r-- | mpm/python/usrp_mpm/simulator/chdr_stream.py | 3 |
1 files changed, 3 insertions, 0 deletions
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: |