📄 demodulator.h
字号:
//---------------------------------------------------------------------------
#ifndef DeModulatorH
#define DeModulatorH
//---------------------------------------------------------------------------
//License: GNU
//
//
//
// J-QAM sound card modem
//
// Copyright (C) 2007-2008 Jonti Olds
//
//
//
// This program is free software: you can redistribute it and/or modify
//
// it under the terms of the GNU General Public License as published by
//
// the Free Software Foundation, either version 3 of the License, or
//
// (at your option) any later version.
//
//
//
// This program is distributed in the hope that it will be useful,
//
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//
// GNU General Public License for more details.
//
//
//
// You should have received a copy of the GNU General Public License
//
// along with this program. If not, see <http://www.gnu.org/licenses/>
#include "Constants.h"
#include "Settings.h"
#include "DDCarrierTracker.h"
#include "MGardner.h"
#include "DataDeFormatter.h"
#include "MCMA.h"
#include <vector>
#include "FrequencyScanner.h"
#include "Graph.h"
#include "SpectrumDisplay.h"
//---------------------------------------------------------------------------
using namespace std;
class Demodulator
{
public:
SpectrumDisplay spec;
__fastcall Demodulator(void (__closure __fastcall *APacketCallBackFunc)(void));
__fastcall ~Demodulator();
void __fastcall Update(short * Data, int size);
void (__closure __fastcall *PacketCallBackFunc)(void);
void (__closure __fastcall *GraphingCallBackFunc)(void);
MCMA Cma;
bool Cliping;
DataDeFormatter *datadeformatter;
double CmaFinishedThreshold;
double AmaFinishedThreshold;
void __fastcall AcquisitionStateMachine();
unsigned char RXCharBuff[RX_CHAR_BUFF_SIZE];
int RXCharBuffPtr;
int lastretword;
//carrier tracker and symbol tracker
DDCarrierTracker dd;
MGardner mgard;
vector <double> h;
vector <PtComplex> Buff;
int BuffPtr;
int BuffSize;
WaveTable Wt;
SymbolTimer st;
double AdjSum;
int AdjCnt;
double AdjSpeed;
int lockoffcntdown;
double smse;
int amatimeout;
FrequencyScanner fs;
Plotdata *pd;
int pdptr;
void __fastcall FFTScanningUpdate();
void __fastcall SetNewFrequencySettigs(FrequencySetting fsetngs);
int TryingFreqSettingAMANotOnTimeoutCnt;
int SymbolCnt,LockCnt;
int NumOfBadPkts;
int PktsTimer;
int N2;
int BadBitsCountDown;
bool FirstPacket;
int FirSizeFactor;
private:
void __fastcall SettingsHaveChanged(NotificationEventType WhatHasChanged);
};
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -