From 8c7c2e4eb49ce4bbd4e9a6b8b8fccf2905be1966 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 24 Jan 2018 06:22:47 +0100 Subject: Remove DMA interface --- Dummy_Streaming.cpp | 80 +---------------------------------------------------- SoapyDummy.hpp | 26 ----------------- 2 files changed, 1 insertion(+), 105 deletions(-) diff --git a/Dummy_Streaming.cpp b/Dummy_Streaming.cpp index 493800d..1ef1c72 100644 --- a/Dummy_Streaming.cpp +++ b/Dummy_Streaming.cpp @@ -210,87 +210,9 @@ int SoapyDummy::readStreamStatus( return SOAPY_SDR_TIMEOUT; } -int SoapyDummy::acquireReadBuffer( - SoapySDR::Stream *stream, - size_t &handle, - const void **buffs, - int &flags, - long long &timeNs, - const long timeoutUs) -{ - if (stream != RX_STREAM){ - return SOAPY_SDR_NOT_SUPPORTED; - } - - return this->getStreamMTU(stream); -} - -void SoapyDummy::releaseReadBuffer( - SoapySDR::Stream *stream, - const size_t handle) -{ - if(stream != RX_STREAM){ - throw std::runtime_error("Invalid stream"); - } -} - -int SoapyDummy::acquireWriteBuffer( - SoapySDR::Stream *stream, - size_t &handle, - void **buffs, - const long timeoutUs) -{ - - if(stream != TX_STREAM){ - return SOAPY_SDR_NOT_SUPPORTED; - } - - return this->getStreamMTU(stream); -} - -void SoapyDummy::releaseWriteBuffer( - SoapySDR::Stream *stream, - const size_t handle, - const size_t numElems, - int &flags, - const long long timeNs) -{ - if (stream == TX_STREAM) { - } - else { - throw std::runtime_error("Invalid stream"); - } -} - size_t SoapyDummy::getNumDirectAccessBuffers( SoapySDR::Stream *stream) { - if (stream == RX_STREAM) { - return m_rxstream.buf_num; - } - else if(stream == TX_STREAM){ - return m_rxstream.buf_num; - } - else { - throw std::runtime_error("Invalid stream"); - } -} - -int SoapyDummy::getDirectAccessBufferAddrs( - SoapySDR::Stream *stream, - const size_t handle, - void **buffs) -{ - - if (stream == RX_STREAM) { - buffs[0]=(void *)m_rxstream.buf; - } - else if (stream == TX_STREAM) { - buffs[0]=(void *)m_txstream.buf; - } - else { - throw std::runtime_error("Invalid stream"); - } - return 0; } + diff --git a/SoapyDummy.hpp b/SoapyDummy.hpp index e89932d..7f08a89 100644 --- a/SoapyDummy.hpp +++ b/SoapyDummy.hpp @@ -107,33 +107,7 @@ class SoapyDummy : public SoapySDR::Device const long timeoutUs ); - int acquireReadBuffer( - SoapySDR::Stream *stream, - size_t &handle, - const void **buffs, - int &flags, - long long &timeNs, - const long timeoutUs = 100000); - - void releaseReadBuffer( - SoapySDR::Stream *stream, - const size_t handle); - - int acquireWriteBuffer( - SoapySDR::Stream *stream, - size_t &handle, - void **buffs, - const long timeoutUs = 100000); - - void releaseWriteBuffer( - SoapySDR::Stream *stream, - const size_t handle, - const size_t numElems, - int &flags, - const long long timeNs = 0); - size_t getNumDirectAccessBuffers(SoapySDR::Stream *stream); - int getDirectAccessBufferAddrs(SoapySDR::Stream *stream, const size_t handle, void **buffs); /******************************************************************* * Settings API -- cgit v1.2.3