summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-01 16:13:30 -0800
committerJosh Blum <josh@joshknows.com>2010-03-01 16:13:30 -0800
commit451067295399e357d73c9bfdeef5f2ad040e0243 (patch)
tree02681d419362edd334e842e30416e1d353d74643 /host/include
parent6e8473e6eef84875e2c3babb35732f8c3b2a0247 (diff)
downloaduhd-451067295399e357d73c9bfdeef5f2ad040e0243.tar.gz
uhd-451067295399e357d73c9bfdeef5f2ad040e0243.tar.bz2
uhd-451067295399e357d73c9bfdeef5f2ad040e0243.zip
Send the number of samples per datagram over the control.
Worked on the io impl for usrp2 (added loop unrolls and 32 bit buffers). Added some vrt rx constants to the fw common used by host and fw. Removed the MTU prop and added a general device prop for num samples.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/props.hpp5
-rw-r--r--host/include/uhd/utils.hpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/host/include/uhd/props.hpp b/host/include/uhd/props.hpp
index 2b6daf6c5..cf301d4bd 100644
--- a/host/include/uhd/props.hpp
+++ b/host/include/uhd/props.hpp
@@ -65,7 +65,9 @@ namespace uhd{
enum device_prop_t{
DEVICE_PROP_NAME, //ro, std::string
DEVICE_PROP_MBOARD, //ro, wax::obj
- DEVICE_PROP_MBOARD_NAMES //ro, prop_names_t
+ DEVICE_PROP_MBOARD_NAMES, //ro, prop_names_t
+ DEVICE_PROP_MAX_RX_SAMPLES, //ro, size_t
+ DEVICE_PROP_MAX_TX_SAMPLES //ro, size_t
};
/*!
@@ -77,7 +79,6 @@ namespace uhd{
enum mboard_prop_t{
MBOARD_PROP_NAME, //ro, std::string
MBOARD_PROP_OTHERS, //ro, prop_names_t
- MBOARD_PROP_MTU, //ro, size_t
MBOARD_PROP_CLOCK_RATE, //ro, freq_t
MBOARD_PROP_RX_DSP, //ro, wax::obj
MBOARD_PROP_RX_DSP_NAMES, //ro, prop_names_t
diff --git a/host/include/uhd/utils.hpp b/host/include/uhd/utils.hpp
index 4331aba7e..9bbdc83c9 100644
--- a/host/include/uhd/utils.hpp
+++ b/host/include/uhd/utils.hpp
@@ -57,6 +57,11 @@ namespace std{
return last != std::find(first, last, elem);
}
+ template<class T, class V>
+ bool has(const V &vector, const T &elem){
+ return has(vector.begin(), vector.end(), elem);
+ }
+
template<class T>
T sum(const T &a, const T &b){
return a + b;