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.
dsddecoder.h
Go to the documentation of this file.
1 // Copyright (C) 2016 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #ifndef PLUGINS_CHANNELRX_DEMODDSD_DSDDECODER_H_
20 #define PLUGINS_CHANNELRX_DEMODDSD_DSDDECODER_H_
21 
22 #include "dsdcc/dsd_decoder.h"
23 
24 class AudioFifo;
25 
27 {
28 public:
29  DSDDecoder();
30  ~DSDDecoder();
31 
32  void pushSample(short sample) { m_decoder.run(sample); }
33  short getFilteredSample() const { return m_decoder.getFilteredSample(); }
34  short getSymbolSyncSample() const { return m_decoder.getSymbolSyncSample(); }
35 
36  short *getAudio1(int& nbSamples) { return m_decoder.getAudio1(nbSamples); }
37  void resetAudio1() { m_decoder.resetAudio1(); }
38  short *getAudio2(int& nbSamples) { return m_decoder.getAudio2(nbSamples); }
39  void resetAudio2() { m_decoder.resetAudio2(); }
40 
41  void enableMbelib(bool enable) { m_decoder.enableMbelib(enable); }
42 
43  bool mbeDVReady1() const { return m_decoder.mbeDVReady1(); }
44  void resetMbeDV1() { m_decoder.resetMbeDV1(); }
45  bool mbeDVReady2() const { return m_decoder.mbeDVReady2(); }
46  void resetMbeDV2() { m_decoder.resetMbeDV2(); }
47  const unsigned char *getMbeDVFrame1() const { return m_decoder.getMbeDVFrame1(); }
48  const unsigned char *getMbeDVFrame2() const { return m_decoder.getMbeDVFrame2(); }
49  bool getVoice1On() const { return m_decoder.getVoice1On(); }
50  bool getVoice2On() const { return m_decoder.getVoice2On(); }
51  void setTDMAStereo(bool tdmaStereo) { m_decoder.setTDMAStereo(tdmaStereo); }
52  bool getSymbolPLLLocked() const { return m_decoder.getSymbolPLLLocked(); }
53 
54  int getMbeRateIndex() const { return (int) m_decoder.getMbeRate(); }
55 
56  int getInLevel() const { return m_decoder.getInLevel(); }
57  int getCarrierPos() const { return m_decoder.getCarrierPos(); }
58  int getZeroCrossingPos() const { return m_decoder.getZeroCrossingPos(); }
59  int getSymbolSyncQuality() const { return m_decoder.getSymbolSyncQuality(); }
60  int getSamplesPerSymbol() const { return m_decoder.getSamplesPerSymbol(); }
61  void enableCosineFiltering(bool on) { m_decoder.enableCosineFiltering(on); }
62  DSDcc::DSDDecoder::DSDSyncType getSyncType() const { return m_decoder.getSyncType(); }
63  DSDcc::DSDDecoder::DSDStationType getStationType() const { return m_decoder.getStationType(); }
64  const char *getFrameTypeText() const { return m_decoder.getFrameTypeText(); }
65  const DSDcc::DSDDMR& getDMRDecoder() const { return m_decoder.getDMRDecoder(); }
66  const DSDcc::DSDDstar& getDStarDecoder() const { return m_decoder.getDStarDecoder(); }
67  const DSDcc::DSDdPMR& getDPMRDecoder() const { return m_decoder.getDPMRDecoder(); }
68  const DSDcc::DSDYSF& getYSFDecoder() const { return m_decoder.getYSFDecoder(); }
69  const DSDcc::DSDNXDN& getNXDNDecoder() const { return m_decoder.getNXDNDecoder(); }
70 
71  void setMyPoint(float lat, float lon) { m_decoder.setMyPoint(lat, lon); }
72  void setAudioGain(float gain) { m_decoder.setAudioGain(gain); }
73  void setBaudRate(int baudRate);
74  void setSymbolPLLLock(bool pllLock) { m_decoder.setSymbolPLLLock(pllLock); }
75  void useHPMbelib(bool useHP) { m_decoder.useHPMbelib(useHP); }
76  void set48k(bool to48k);
77  void setUpsampling(int upsampling);
78 
79 private:
80  DSDcc::DSDDecoder m_decoder;
81 };
82 
83 #endif /* PLUGINS_CHANNELRX_DEMODDSD_DSDDECODER_H_ */
const DSDcc::DSDYSF & getYSFDecoder() const
Definition: dsddecoder.h:68
void resetAudio2()
Definition: dsddecoder.h:39
const DSDcc::DSDDstar & getDStarDecoder() const
Definition: dsddecoder.h:66
const DSDcc::DSDNXDN & getNXDNDecoder() const
Definition: dsddecoder.h:69
bool mbeDVReady2() const
Definition: dsddecoder.h:45
DSDcc::DSDDecoder m_decoder
Definition: dsddecoder.h:80
void setBaudRate(int baudRate)
Definition: dsddecoder.cpp:50
const DSDcc::DSDdPMR & getDPMRDecoder() const
Definition: dsddecoder.h:67
void useHPMbelib(bool useHP)
Definition: dsddecoder.h:75
DSDcc::DSDDecoder::DSDSyncType getSyncType() const
Definition: dsddecoder.h:62
int getCarrierPos() const
Definition: dsddecoder.h:57
int getSymbolSyncQuality() const
Definition: dsddecoder.h:59
const char * getFrameTypeText() const
Definition: dsddecoder.h:64
int getSamplesPerSymbol() const
Definition: dsddecoder.h:60
void setTDMAStereo(bool tdmaStereo)
Definition: dsddecoder.h:51
void enableMbelib(bool enable)
Definition: dsddecoder.h:41
void setUpsampling(int upsampling)
Definition: dsddecoder.cpp:45
short getFilteredSample() const
Definition: dsddecoder.h:33
void resetMbeDV1()
Definition: dsddecoder.h:44
const DSDcc::DSDDMR & getDMRDecoder() const
Definition: dsddecoder.h:65
void resetMbeDV2()
Definition: dsddecoder.h:46
int getMbeRateIndex() const
Definition: dsddecoder.h:54
bool mbeDVReady1() const
Definition: dsddecoder.h:43
short * getAudio2(int &nbSamples)
Definition: dsddecoder.h:38
void enableCosineFiltering(bool on)
Definition: dsddecoder.h:61
int getZeroCrossingPos() const
Definition: dsddecoder.h:58
short getSymbolSyncSample() const
Definition: dsddecoder.h:34
bool getVoice2On() const
Definition: dsddecoder.h:50
bool getSymbolPLLLocked() const
Definition: dsddecoder.h:52
void setAudioGain(float gain)
Definition: dsddecoder.h:72
bool getVoice1On() const
Definition: dsddecoder.h:49
void setMyPoint(float lat, float lon)
Definition: dsddecoder.h:71
void resetAudio1()
Definition: dsddecoder.h:37
const unsigned char * getMbeDVFrame1() const
Definition: dsddecoder.h:47
int getInLevel() const
Definition: dsddecoder.h:56
void pushSample(short sample)
Definition: dsddecoder.h:32
DSDcc::DSDDecoder::DSDStationType getStationType() const
Definition: dsddecoder.h:63
void setSymbolPLLLock(bool pllLock)
Definition: dsddecoder.h:74
short * getAudio1(int &nbSamples)
Definition: dsddecoder.h:36
const unsigned char * getMbeDVFrame2() const
Definition: dsddecoder.h:48
void set48k(bool to48k)
Definition: dsddecoder.cpp:40