SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
plugins
samplesource
bladerf1input
bladerf1inputthread.h
Go to the documentation of this file.
1
// Copyright (C) 2015 Edouard Griffiths, F4EXB //
3
// //
4
// This program is free software; you can redistribute it and/or modify //
5
// it under the terms of the GNU General Public License as published by //
6
// the Free Software Foundation as version 3 of the License, or //
7
// (at your option) any later version. //
8
// //
9
// This program is distributed in the hope that it will be useful, //
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12
// GNU General Public License V3 for more details. //
13
// //
14
// You should have received a copy of the GNU General Public License //
15
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
17
18
#ifndef INCLUDE_BLADERFINPUTTHREAD_H
19
#define INCLUDE_BLADERFINPUTTHREAD_H
20
21
#include <QThread>
22
#include <QMutex>
23
#include <QWaitCondition>
24
#include <libbladeRF.h>
25
#include "
dsp/samplesinkfifo.h
"
26
#include "
dsp/decimators.h
"
27
28
#define BLADERF_BLOCKSIZE (1<<14)
29
30
class
Bladerf1InputThread
:
public
QThread {
31
Q_OBJECT
32
33
public
:
34
Bladerf1InputThread
(
struct
bladerf* dev,
SampleSinkFifo
* sampleFifo, QObject* parent = NULL);
35
~Bladerf1InputThread
();
36
37
void
startWork
();
38
void
stopWork
();
39
void
setLog2Decimation
(
unsigned
int
log2_decim);
40
void
setFcPos
(
int
fcPos);
41
42
private
:
43
QMutex
m_startWaitMutex
;
44
QWaitCondition
m_startWaiter
;
45
bool
m_running
;
46
47
struct
bladerf*
m_dev
;
48
qint16
m_buf
[2*
BLADERF_BLOCKSIZE
];
49
SampleVector
m_convertBuffer
;
50
SampleSinkFifo
*
m_sampleFifo
;
51
52
unsigned
int
m_log2Decim
;
53
int
m_fcPos
;
54
55
Decimators<qint32, qint16, SDR_RX_SAMP_SZ, 12>
m_decimators
;
56
57
void
run
();
58
void
callback
(
const
qint16* buf, qint32 len);
59
};
60
61
#endif // INCLUDE_BLADERFINPUTTHREAD_H
Bladerf1InputThread::callback
void callback(const qint16 *buf, qint32 len)
Definition:
bladerf1inputthread.cpp:89
SampleVector
std::vector< Sample > SampleVector
Definition:
dsptypes.h:96
Bladerf1InputThread::m_sampleFifo
SampleSinkFifo * m_sampleFifo
Definition:
bladerf1inputthread.h:50
samplesinkfifo.h
Bladerf1InputThread::m_log2Decim
unsigned int m_log2Decim
Definition:
bladerf1inputthread.h:52
Bladerf1InputThread::m_startWaiter
QWaitCondition m_startWaiter
Definition:
bladerf1inputthread.h:44
Bladerf1InputThread::setFcPos
void setFcPos(int fcPos)
Definition:
bladerf1inputthread.cpp:64
Bladerf1InputThread::setLog2Decimation
void setLog2Decimation(unsigned int log2_decim)
Definition:
bladerf1inputthread.cpp:59
Bladerf1InputThread::Bladerf1InputThread
Bladerf1InputThread(struct bladerf *dev, SampleSinkFifo *sampleFifo, QObject *parent=NULL)
Definition:
bladerf1inputthread.cpp:27
Bladerf1InputThread::m_dev
struct bladerf * m_dev
Definition:
bladerf1inputthread.h:47
Bladerf1InputThread::m_fcPos
int m_fcPos
Definition:
bladerf1inputthread.h:53
BLADERF_BLOCKSIZE
#define BLADERF_BLOCKSIZE
Definition:
bladerf1inputthread.h:28
Bladerf1InputThread
Definition:
bladerf1inputthread.h:30
Bladerf1InputThread::m_running
bool m_running
Definition:
bladerf1inputthread.h:45
Bladerf1InputThread::m_startWaitMutex
QMutex m_startWaitMutex
Definition:
bladerf1inputthread.h:43
Bladerf1InputThread::startWork
void startWork()
Definition:
bladerf1inputthread.cpp:44
Bladerf1InputThread::m_decimators
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 12 > m_decimators
Definition:
bladerf1inputthread.h:55
decimators.h
Bladerf1InputThread::m_buf
qint16 m_buf[2 *BLADERF_BLOCKSIZE]
Definition:
bladerf1inputthread.h:48
Bladerf1InputThread::~Bladerf1InputThread
~Bladerf1InputThread()
Definition:
bladerf1inputthread.cpp:39
Bladerf1InputThread::run
void run()
Definition:
bladerf1inputthread.cpp:69
Decimators< qint32, qint16, SDR_RX_SAMP_SZ, 12 >
Bladerf1InputThread::stopWork
void stopWork()
Definition:
bladerf1inputthread.cpp:53
SampleSinkFifo
Definition:
samplesinkfifo.h:28
Bladerf1InputThread::m_convertBuffer
SampleVector m_convertBuffer
Definition:
bladerf1inputthread.h:49
Generated on Fri Aug 2 2019 17:56:32 for SDRAngel by
1.8.13