aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/props.hpp2
-rw-r--r--host/include/uhd/simple_device.hpp4
-rw-r--r--host/include/uhd/time_spec.hpp10
-rw-r--r--host/include/uhd/types.hpp52
4 files changed, 47 insertions, 21 deletions
diff --git a/host/include/uhd/props.hpp b/host/include/uhd/props.hpp
index 41e0eff63..01746f853 100644
--- a/host/include/uhd/props.hpp
+++ b/host/include/uhd/props.hpp
@@ -76,8 +76,6 @@ namespace uhd{
MBOARD_PROP_TX_DBOARD, //ro, wax::obj
MBOARD_PROP_TX_DBOARD_NAMES, //ro, prop_names_t
MBOARD_PROP_CLOCK_CONFIG, //rw, clock_config_t
- MBOARD_PROP_PPS_SOURCE_NAMES, //ro, prop_names_t
- MBOARD_PROP_REF_SOURCE_NAMES, //ro, prop_names_t
MBOARD_PROP_TIME_NOW, //wo, time_spec_t
MBOARD_PROP_TIME_NEXT_PPS //wo, time_spec_t
};
diff --git a/host/include/uhd/simple_device.hpp b/host/include/uhd/simple_device.hpp
index 035757936..bbe0258c7 100644
--- a/host/include/uhd/simple_device.hpp
+++ b/host/include/uhd/simple_device.hpp
@@ -51,9 +51,7 @@ public:
/*******************************************************************
* Streaming
******************************************************************/
- virtual void set_streaming_at(const time_spec_t &time_spec) = 0;
- virtual void set_streaming(bool enb) = 0;
- virtual bool get_streaming(void) = 0;
+ virtual void issue_stream_cmd(const stream_cmd_t &stream_cmd) = 0;
/*******************************************************************
* RX methods
diff --git a/host/include/uhd/time_spec.hpp b/host/include/uhd/time_spec.hpp
index c1e7cf3a1..e863746ba 100644
--- a/host/include/uhd/time_spec.hpp
+++ b/host/include/uhd/time_spec.hpp
@@ -35,17 +35,11 @@ namespace uhd{
boost::uint32_t ticks;
/*!
- * Create a time_spec_t that holds a wildcard time.
- * This will have implementation-specific meaning.
- */
- time_spec_t(void);
-
- /*!
* Create a time_spec_t from seconds and ticks.
- * \param new_secs the new seconds
+ * \param new_secs the new seconds (default = 0)
* \param new_ticks the new ticks (default = 0)
*/
- time_spec_t(boost::uint32_t new_secs, boost::uint32_t new_ticks = 0);
+ time_spec_t(boost::uint32_t new_secs = 0, boost::uint32_t new_ticks = 0);
/*!
* Create a time_spec_t from boost posix time.
diff --git a/host/include/uhd/types.hpp b/host/include/uhd/types.hpp
index 1439f57a1..3ad3dae82 100644
--- a/host/include/uhd/types.hpp
+++ b/host/include/uhd/types.hpp
@@ -19,6 +19,7 @@
#define INCLUDED_UHD_TYPES_HPP
#include <uhd/config.hpp>
+#include <uhd/time_spec.hpp>
#include <string>
namespace uhd{
@@ -66,18 +67,53 @@ namespace uhd{
* Clock configuration settings:
* The source for the 10MHz reference clock.
* The source and polarity for the PPS clock.
- * Possible settings for the reference and pps source
- * are implementation specific motherboard properties.
- * See the MBOARD_PROP_XXX_SOURCE_NAMES properties.
*/
- struct clock_config_t{
- enum polarity_t {POLARITY_NEG, POLARITY_POS};
- std::string ref_source;
- std::string pps_source;
- polarity_t pps_polarity;
+ struct UHD_API clock_config_t{
+ enum ref_source_t {
+ REF_INT, //internal reference
+ REF_SMA, //external sma port
+ REF_MIMO //mimo cable (usrp2 only)
+ } ref_source;
+ enum pps_source_t {
+ PPS_INT, //there is no internal
+ PPS_SMA, //external sma port
+ PPS_MIMO //mimo cable (usrp2 only)
+ } pps_source;
+ enum pps_polarity_t {
+ PPS_NEG, //negative edge
+ PPS_POS //positive edge
+ } pps_polarity;
clock_config_t(void);
};
+ /*!
+ * Command struct for configuration and control of streaming:
+ *
+ * A stream command defines how the device sends samples to the host.
+ * Streaming is controlled by submitting a stream command to the rx dsp.
+ * Granular control over what the device streams to the host can be
+ * achieved through submission of multiple (carefully-crafted) commands.
+ *
+ * The stream_now parameter controls when the stream begins.
+ * When true, the device will begin streaming ASAP. When false,
+ * the device will begin streaming at a time specified by time_spec.
+ *
+ * The continuous parameter controls the number of samples received.
+ * When true, the device continues streaming indefinitely. When false,
+ * the device will stream the number of samples specified by num_samps.
+ *
+ * Standard usage case:
+ * To start continuous streaming, set stream_now to true and continuous to true.
+ * To end continuous streaming, set stream_now to true and continuous to false.
+ */
+ struct UHD_API stream_cmd_t{
+ bool stream_now;
+ time_spec_t time_spec;
+ bool continuous;
+ size_t num_samps;
+ stream_cmd_t(void);
+ };
+
} //namespace uhd
#endif /* INCLUDED_UHD_TYPES_HPP */