mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-11 10:18:38 -04:00
SDRDaemonSource: adaptation to remote DaemonSink channel
This commit is contained in:
@@ -24,18 +24,12 @@ SDRdaemonSourceSettings::SDRdaemonSourceSettings()
|
||||
|
||||
void SDRdaemonSourceSettings::resetToDefaults()
|
||||
{
|
||||
m_centerFrequency = 435000*1000;
|
||||
m_sampleRate = 256000;
|
||||
m_log2Decim = 1;
|
||||
m_txDelay = 0.5;
|
||||
m_nbFECBlocks = 0;
|
||||
m_address = "127.0.0.1";
|
||||
m_dataPort = 9092;
|
||||
m_controlPort = 9093;
|
||||
m_specificParameters = "";
|
||||
m_apiAddress = "127.0.0.1";
|
||||
m_apiPort = 9091;
|
||||
m_dataAddress = "127.0.0.1";
|
||||
m_dataPort = 9090;
|
||||
m_dcBlock = false;
|
||||
m_iqCorrection = false;
|
||||
m_fcPos = 2; // center
|
||||
m_fileRecordName = "";
|
||||
}
|
||||
|
||||
@@ -43,17 +37,12 @@ QByteArray SDRdaemonSourceSettings::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
|
||||
s.writeU64(1, m_sampleRate);
|
||||
s.writeU32(2, m_log2Decim);
|
||||
s.writeFloat(3, m_txDelay);
|
||||
s.writeU32(4, m_nbFECBlocks);
|
||||
s.writeString(5, m_address);
|
||||
s.writeString(5, m_apiAddress);
|
||||
s.writeU32(6, m_dataPort);
|
||||
s.writeU32(7, m_controlPort);
|
||||
s.writeString(8, m_specificParameters);
|
||||
s.writeU32(7, m_apiPort);
|
||||
s.writeString(8, m_dataAddress);
|
||||
s.writeBool(9, m_dcBlock);
|
||||
s.writeBool(10, m_iqCorrection);
|
||||
s.writeU32(11, m_fcPos);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -71,19 +60,14 @@ bool SDRdaemonSourceSettings::deserialize(const QByteArray& data)
|
||||
if (d.getVersion() == 1)
|
||||
{
|
||||
quint32 uintval;
|
||||
d.readU64(1, &m_sampleRate, 48000);
|
||||
d.readU32(2, &m_log2Decim, 0);
|
||||
d.readFloat(3, &m_txDelay, 0.5);
|
||||
d.readU32(4, &m_nbFECBlocks, 0);
|
||||
d.readString(5, &m_address, "127.0.0.1");
|
||||
d.readString(5, &m_apiAddress, "127.0.0.1");
|
||||
d.readU32(6, &uintval, 9090);
|
||||
m_dataPort = uintval % (1<<16);
|
||||
d.readU32(7, &uintval, 9090);
|
||||
m_controlPort = uintval % (1<<16);
|
||||
d.readString(8, &m_specificParameters, "");
|
||||
d.readU32(7, &uintval, 9091);
|
||||
m_dataPort = uintval % (1<<16);
|
||||
d.readString(8, &m_dataAddress, "127.0.0.1");
|
||||
d.readBool(9, &m_dcBlock, false);
|
||||
d.readBool(10, &m_iqCorrection, false);
|
||||
d.readU32(11, &m_fcPos, 2);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user