summaryrefslogtreecommitdiff
path: root/gr-usrp2/src/usrp2_source_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'gr-usrp2/src/usrp2_source_base.h')
-rw-r--r--gr-usrp2/src/usrp2_source_base.h32
1 files changed, 8 insertions, 24 deletions
diff --git a/gr-usrp2/src/usrp2_source_base.h b/gr-usrp2/src/usrp2_source_base.h
index 34d9fea0b..f6bf10059 100644
--- a/gr-usrp2/src/usrp2_source_base.h
+++ b/gr-usrp2/src/usrp2_source_base.h
@@ -23,15 +23,13 @@
#ifndef INCLUDED_USRP2_SOURCE_BASE_H
#define INCLUDED_USRP2_SOURCE_BASE_H
-#include <gr_sync_block.h>
-#include <usrp2/usrp2.h>
-#include <stdexcept>
+#include <usrp2_base.h>
-// BIG ASS FIXME: get from lower layer MTU calculation
-#define USRP2_MIN_RX_SAMPLES 371
-
-class usrp2_source_base : public gr_sync_block {
-
+/*!
+ * Base class for all USRP2 source blocks
+ */
+class usrp2_source_base : public usrp2_base
+{
protected:
usrp2_source_base(const char *name,
gr_io_signature_sptr output_signature,
@@ -39,8 +37,6 @@ protected:
const std::string &mac)
throw (std::runtime_error);
- usrp2::usrp2::sptr d_u2;
-
public:
~usrp2_source_base();
@@ -60,26 +56,14 @@ public:
bool set_decim(int decimation_factor);
/*!
- * \brief Get USRP2 hardware MAC address
- */
- std::string mac_addr();
-
- /*!
* \brief Called by scheduler when starting flowgraph
*/
- bool start();
+ virtual bool start();
/*!
* \brief Called by scheduler when stopping flowgraph
*/
- bool stop();
-
- /*!
- * \brief Derived class must override this
- */
- virtual int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items) = 0;
+ virtual bool stop();
};
#endif /* INCLUDED_USRP2_SOURCE_BASE_H */