diff options
Diffstat (limited to 'Dummy_Streaming.cpp')
-rw-r--r-- | Dummy_Streaming.cpp | 80 |
1 files changed, 1 insertions, 79 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; } + |