aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/simple_device.cpp16
-rw-r--r--host/lib/transport/vrt.cpp4
2 files changed, 18 insertions, 2 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index ba1966e0d..bb7ddfc68 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -154,8 +154,24 @@ public:
}
/*******************************************************************
+ * Timing
+ ******************************************************************/
+ void set_time_now(const time_spec_t &time_spec){
+ _mboard[MBOARD_PROP_TIME_NOW] = time_spec;
+ }
+
+ void set_time_next_pps(const time_spec_t &time_spec){
+ _mboard[MBOARD_PROP_TIME_NEXT_PPS] = time_spec;
+ }
+
+ /*******************************************************************
* Streaming
******************************************************************/
+ void set_streaming_at(const time_spec_t &time_spec){
+ _rx_ddc[std::string("stream_at")] = time_spec;
+ _rx_ddc[std::string("enabled")] = true;
+ }
+
void set_streaming(bool enb){
_rx_ddc[std::string("enabled")] = enb;
}
diff --git a/host/lib/transport/vrt.cpp b/host/lib/transport/vrt.cpp
index a06b5bf21..cc46b2381 100644
--- a/host/lib/transport/vrt.cpp
+++ b/host/lib/transport/vrt.cpp
@@ -42,8 +42,8 @@ void vrt::pack(
if(metadata.has_time_spec){
vrt_hdr_flags |= (0x3 << 22) | (0x1 << 20); //TSI: Other, TSF: Sample Count Timestamp
header_buff[num_header_words32++] = htonl(metadata.time_spec.secs);
- header_buff[num_header_words32++] = htonl(metadata.time_spec.ticks);
header_buff[num_header_words32++] = 0; //unused part of fractional seconds
+ header_buff[num_header_words32++] = htonl(metadata.time_spec.ticks);
}
vrt_hdr_flags |= (metadata.start_of_burst)? (0x1 << 25) : 0;
@@ -99,8 +99,8 @@ void vrt::unpack(
if (vrt_hdr_word & (0x3 << 20)){ //fractional time
metadata.has_time_spec = true;
- metadata.time_spec.ticks = ntohl(header_buff[num_header_words32++]);
num_header_words32++; //unused part of fractional seconds
+ metadata.time_spec.ticks = ntohl(header_buff[num_header_words32++]);
}
size_t num_trailer_words32 = (vrt_hdr_word & (0x1 << 26))? 1 : 0;