2019-03-17 18:49:28 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2019 F4EXB //
|
|
|
|
// //
|
|
|
|
// 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 as version 3 of the License, or //
|
2019-04-11 00:39:30 -04:00
|
|
|
// (at your option) any later version. //
|
2019-03-17 18:49:28 -04:00
|
|
|
// //
|
|
|
|
// 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 V3 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/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef PLUGINS_CHANNELRX_DEMODATV_DATVDEMODSETTINGS_H_
|
|
|
|
#define PLUGINS_CHANNELRX_DEMODATV_DATVDEMODSETTINGS_H_
|
|
|
|
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QString>
|
|
|
|
#include <stdint.h>
|
2019-07-16 20:51:46 -04:00
|
|
|
#include <vector>
|
2019-03-17 18:49:28 -04:00
|
|
|
|
|
|
|
class Serializable;
|
|
|
|
|
|
|
|
struct DATVDemodSettings
|
|
|
|
{
|
|
|
|
enum dvb_version
|
|
|
|
{
|
|
|
|
DVB_S,
|
|
|
|
DVB_S2
|
|
|
|
};
|
|
|
|
|
|
|
|
enum DATVModulation
|
|
|
|
{
|
2019-07-16 20:51:46 -04:00
|
|
|
BPSK, // not DVB-S2
|
2019-03-17 18:49:28 -04:00
|
|
|
QPSK,
|
|
|
|
PSK8,
|
2019-07-16 20:51:46 -04:00
|
|
|
APSK16, // not DVB-S
|
|
|
|
APSK32, // not DVB-S
|
|
|
|
APSK64E, // not DVB-S
|
|
|
|
QAM16, // not DVB-S2
|
|
|
|
QAM64, // not DVB-S2
|
|
|
|
QAM256, // not DVB-S2
|
|
|
|
MOD_UNSET
|
2019-03-17 18:49:28 -04:00
|
|
|
};
|
|
|
|
|
2019-07-16 12:40:00 -04:00
|
|
|
enum DATVCodeRate
|
2019-07-16 12:19:29 -04:00
|
|
|
{
|
2019-07-16 20:51:46 -04:00
|
|
|
FEC12, // DVB-S
|
|
|
|
FEC23, // DVB-S
|
2019-07-16 12:19:29 -04:00
|
|
|
FEC46,
|
2019-07-16 20:51:46 -04:00
|
|
|
FEC34, // DVB-S
|
|
|
|
FEC56, // DVB-S
|
2019-07-16 12:19:29 -04:00
|
|
|
FEC78, // DVB-S
|
|
|
|
FEC45,
|
|
|
|
FEC89,
|
2019-07-16 20:51:46 -04:00
|
|
|
FEC910,
|
2019-07-16 12:19:29 -04:00
|
|
|
FEC14,
|
|
|
|
FEC13,
|
|
|
|
FEC25,
|
2019-07-16 12:40:00 -04:00
|
|
|
FEC35,
|
2019-07-16 20:51:46 -04:00
|
|
|
RATE_UNSET
|
2019-07-16 12:19:29 -04:00
|
|
|
};
|
|
|
|
|
2019-03-17 18:49:28 -04:00
|
|
|
enum dvb_sampler
|
|
|
|
{
|
|
|
|
SAMP_NEAREST,
|
|
|
|
SAMP_LINEAR,
|
|
|
|
SAMP_RRC
|
|
|
|
};
|
|
|
|
|
|
|
|
quint32 m_rgbColor;
|
|
|
|
QString m_title;
|
|
|
|
Serializable *m_channelMarker;
|
|
|
|
int m_rfBandwidth;
|
|
|
|
int m_centerFrequency;
|
|
|
|
dvb_version m_standard;
|
|
|
|
DATVModulation m_modulation;
|
2019-07-16 12:40:00 -04:00
|
|
|
DATVCodeRate m_fec;
|
2021-02-27 06:51:32 -05:00
|
|
|
bool m_softLDPC;
|
2021-03-06 18:29:01 -05:00
|
|
|
QString m_softLDPCToolPath;
|
|
|
|
int m_softLDPCMaxTrials;
|
2021-02-27 06:51:32 -05:00
|
|
|
int m_maxBitflips;
|
2019-03-19 18:12:54 -04:00
|
|
|
bool m_audioMute;
|
|
|
|
QString m_audioDeviceName;
|
2019-03-17 18:49:28 -04:00
|
|
|
int m_symbolRate;
|
|
|
|
int m_notchFilters;
|
|
|
|
bool m_allowDrift;
|
|
|
|
bool m_fastLock;
|
|
|
|
dvb_sampler m_filter;
|
|
|
|
bool m_hardMetric;
|
|
|
|
float m_rollOff;
|
|
|
|
bool m_viterbi;
|
|
|
|
int m_excursion;
|
2019-03-22 03:05:01 -04:00
|
|
|
int m_audioVolume;
|
2019-03-23 01:06:42 -04:00
|
|
|
bool m_videoMute;
|
2019-07-28 04:54:04 -04:00
|
|
|
QString m_udpTSAddress;
|
|
|
|
quint32 m_udpTSPort;
|
|
|
|
bool m_udpTS;
|
2021-04-11 17:52:16 -04:00
|
|
|
bool m_playerEnable;
|
2020-09-21 14:10:17 -04:00
|
|
|
int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
|
|
|
|
bool m_useReverseAPI;
|
|
|
|
QString m_reverseAPIAddress;
|
|
|
|
uint16_t m_reverseAPIPort;
|
|
|
|
uint16_t m_reverseAPIDeviceIndex;
|
|
|
|
uint16_t m_reverseAPIChannelIndex;
|
2022-01-08 23:27:12 -05:00
|
|
|
Serializable *m_rollupState;
|
2021-03-23 03:36:08 -04:00
|
|
|
static const int m_softLDPCMaxMaxTrials = 50;
|
2019-03-17 18:49:28 -04:00
|
|
|
|
|
|
|
DATVDemodSettings();
|
|
|
|
void resetToDefaults();
|
|
|
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
2022-01-08 23:27:12 -05:00
|
|
|
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
2019-03-17 18:49:28 -04:00
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2019-03-17 21:26:03 -04:00
|
|
|
void debug(const QString& msg) const;
|
2019-07-17 09:58:06 -04:00
|
|
|
bool isDifferent(const DATVDemodSettings& other); // true if a change of settings should trigger DVB framework config update
|
2019-07-16 20:51:46 -04:00
|
|
|
void validateSystemConfiguration();
|
|
|
|
|
|
|
|
static DATVModulation getModulationFromStr(const QString& str);
|
|
|
|
static DATVCodeRate getCodeRateFromStr(const QString& str);
|
|
|
|
static QString getStrFromModulation(const DATVModulation modulation);
|
|
|
|
static QString getStrFromCodeRate(const DATVCodeRate codeRate);
|
|
|
|
static void getAvailableModulations(dvb_version dvbStandard, std::vector<DATVModulation>& modulations);
|
|
|
|
static void getAvailableCodeRates(dvb_version dvbStandard, DATVModulation modulation, std::vector<DATVCodeRate>& codeRates);
|
2019-12-03 18:08:05 -05:00
|
|
|
static DATVDemodSettings::DATVCodeRate getCodeRateFromLeanDVBCode(int leanDVBCodeRate);
|
|
|
|
static DATVDemodSettings::DATVModulation getModulationFromLeanDVBCode(int leanDVBModulation);
|
2019-03-17 18:49:28 -04:00
|
|
|
};
|
|
|
|
|
2020-09-21 14:10:17 -04:00
|
|
|
#endif // PLUGINS_CHANNELRX_DEMODATV_DATVDEMODSETTINGS_H_
|