mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 01:39:05 -05:00
SDRdaemonFEC: renamed all SDRdaemonFEC references in debug messages to SDRdaemonSource ones
This commit is contained in:
parent
718d87ecf5
commit
e7b7e77d4d
@ -1,4 +1,4 @@
|
|||||||
<h1>SDRdaemonFEC plugin</h1>
|
<h1>SDRdaemon source plugin</h1>
|
||||||
|
|
||||||
<h2>Introduction</h2>
|
<h2>Introduction</h2>
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ SDRdaemonSourceBuffer::SDRdaemonSourceBuffer(uint32_t throttlems) :
|
|||||||
|
|
||||||
if (!m_cm256.isInitialized()) {
|
if (!m_cm256.isInitialized()) {
|
||||||
m_cm256_OK = false;
|
m_cm256_OK = false;
|
||||||
qDebug() << "SDRdaemonFECBuffer::SDRdaemonFECBuffer: cannot initialize CM256 library";
|
qDebug() << "SDRdaemonSourceBuffer::SDRdaemonSourceBuffer: cannot initialize CM256 library";
|
||||||
} else {
|
} else {
|
||||||
m_cm256_OK = true;
|
m_cm256_OK = true;
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ void SDRdaemonSourceBuffer::checkSlotData(int slotIndex)
|
|||||||
|
|
||||||
if (!m_decoderSlots[slotIndex].m_decoded)
|
if (!m_decoderSlots[slotIndex].m_decoded)
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECBuffer::checkSlotData: incomplete frame:"
|
qDebug() << "SDRdaemonSourceBuffer::checkSlotData: incomplete frame:"
|
||||||
<< " m_blockCount: " << m_decoderSlots[slotIndex].m_blockCount
|
<< " m_blockCount: " << m_decoderSlots[slotIndex].m_blockCount
|
||||||
<< " m_recoveryCount: " << m_decoderSlots[slotIndex].m_recoveryCount;
|
<< " m_recoveryCount: " << m_decoderSlots[slotIndex].m_recoveryCount;
|
||||||
}
|
}
|
||||||
@ -258,13 +258,13 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
|||||||
|
|
||||||
if (m_cm256.cm256_decode(m_paramsCM256, m_decoderSlots[decoderIndex].m_cm256DescriptorBlocks)) // CM256 decode
|
if (m_cm256.cm256_decode(m_paramsCM256, m_decoderSlots[decoderIndex].m_cm256DescriptorBlocks)) // CM256 decode
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECBuffer::writeData: decode CM256 error:"
|
qDebug() << "SDRdaemonSourceBuffer::writeData: decode CM256 error:"
|
||||||
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
||||||
<< " m_recoveryCount: " << m_decoderSlots[decoderIndex].m_recoveryCount;
|
<< " m_recoveryCount: " << m_decoderSlots[decoderIndex].m_recoveryCount;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECBuffer::writeData: decode CM256 success:"
|
qDebug() << "SDRdaemonSourceBuffer::writeData: decode CM256 success:"
|
||||||
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
||||||
<< " m_recoveryCount: " << m_decoderSlots[decoderIndex].m_recoveryCount;
|
<< " m_recoveryCount: " << m_decoderSlots[decoderIndex].m_recoveryCount;
|
||||||
|
|
||||||
@ -284,17 +284,17 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
|||||||
if (crc32.checksum() == metaData->m_crc32)
|
if (crc32.checksum() == metaData->m_crc32)
|
||||||
{
|
{
|
||||||
m_decoderSlots[decoderIndex].m_metaRetrieved = true;
|
m_decoderSlots[decoderIndex].m_metaRetrieved = true;
|
||||||
printMeta("SDRdaemonFECBuffer::writeData: recovered meta", metaData);
|
printMeta("SDRdaemonSourceBuffer::writeData: recovered meta", metaData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECBuffer::writeData: recovered meta: invalid CRC32";
|
qDebug() << "SDRdaemonSourceBuffer::writeData: recovered meta: invalid CRC32";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
storeOriginalBlock(decoderIndex, blockIndex, *recoveredBlock);
|
storeOriginalBlock(decoderIndex, blockIndex, *recoveredBlock);
|
||||||
|
|
||||||
qDebug() << "SDRdaemonFECBuffer::writeData: recovered block #" << blockIndex;
|
qDebug() << "SDRdaemonSourceBuffer::writeData: recovered block #" << blockIndex;
|
||||||
} // restore missing blocks
|
} // restore missing blocks
|
||||||
} // CM256 decode
|
} // CM256 decode
|
||||||
} // revovery
|
} // revovery
|
||||||
@ -313,7 +313,7 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
|||||||
m_readNbBytes = (sampleRate * m_iqSampleSize) / 20;
|
m_readNbBytes = (sampleRate * m_iqSampleSize) / 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
printMeta("SDRdaemonFECBuffer::writeData: new meta", metaData); // print for change other than timestamp
|
printMeta("SDRdaemonSourceBuffer::writeData: new meta", metaData); // print for change other than timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentMeta = *metaData; // renew current meta
|
m_currentMeta = *metaData; // renew current meta
|
||||||
@ -332,7 +332,7 @@ void SDRdaemonSourceBuffer::writeData0(char *array __attribute__((unused)), uint
|
|||||||
// int decoderIndex = frameIndex % nbDecoderSlots;
|
// int decoderIndex = frameIndex % nbDecoderSlots;
|
||||||
// int blockIndex = superBlock->header.blockIndex;
|
// int blockIndex = superBlock->header.blockIndex;
|
||||||
//
|
//
|
||||||
//// qDebug() << "SDRdaemonFECBuffer::writeData:"
|
//// qDebug() << "SDRdaemonSourceBuffer::writeData:"
|
||||||
//// << " frameIndex: " << frameIndex
|
//// << " frameIndex: " << frameIndex
|
||||||
//// << " decoderIndex: " << decoderIndex
|
//// << " decoderIndex: " << decoderIndex
|
||||||
//// << " blockIndex: " << blockIndex;
|
//// << " blockIndex: " << blockIndex;
|
||||||
@ -352,7 +352,7 @@ void SDRdaemonSourceBuffer::writeData0(char *array __attribute__((unused)), uint
|
|||||||
// {
|
// {
|
||||||
// if (-frameDelta < nbDecoderSlots) // new frame head not too new
|
// if (-frameDelta < nbDecoderSlots) // new frame head not too new
|
||||||
// {
|
// {
|
||||||
// //qDebug() << "SDRdaemonFECBuffer::writeData: new frame head (1): " << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
// //qDebug() << "SDRdaemonSourceBuffer::writeData: new frame head (1): " << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
||||||
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
||||||
// m_frameHead = frameIndex;
|
// m_frameHead = frameIndex;
|
||||||
// checkSlotData(decoderIndex);
|
// checkSlotData(decoderIndex);
|
||||||
@ -361,7 +361,7 @@ void SDRdaemonSourceBuffer::writeData0(char *array __attribute__((unused)), uint
|
|||||||
// }
|
// }
|
||||||
// else if (-frameDelta <= 65536 - nbDecoderSlots) // loss of sync start over
|
// else if (-frameDelta <= 65536 - nbDecoderSlots) // loss of sync start over
|
||||||
// {
|
// {
|
||||||
// //qDebug() << "SDRdaemonFECBuffer::writeData: loss of sync start over (1)" << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
// //qDebug() << "SDRdaemonSourceBuffer::writeData: loss of sync start over (1)" << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
||||||
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
||||||
// m_frameHead = frameIndex;
|
// m_frameHead = frameIndex;
|
||||||
// initReadIndex(); // reset read index
|
// initReadIndex(); // reset read index
|
||||||
@ -372,7 +372,7 @@ void SDRdaemonSourceBuffer::writeData0(char *array __attribute__((unused)), uint
|
|||||||
// {
|
// {
|
||||||
// if (frameDelta > 65536 - nbDecoderSlots) // new frame head not too new
|
// if (frameDelta > 65536 - nbDecoderSlots) // new frame head not too new
|
||||||
// {
|
// {
|
||||||
// //qDebug() << "SDRdaemonFECBuffer::writeData: new frame head (2): " << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
// //qDebug() << "SDRdaemonSourceBuffer::writeData: new frame head (2): " << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
||||||
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
||||||
// m_frameHead = frameIndex;
|
// m_frameHead = frameIndex;
|
||||||
// checkSlotData(decoderIndex);
|
// checkSlotData(decoderIndex);
|
||||||
@ -381,7 +381,7 @@ void SDRdaemonSourceBuffer::writeData0(char *array __attribute__((unused)), uint
|
|||||||
// }
|
// }
|
||||||
// else if (frameDelta >= nbDecoderSlots) // loss of sync start over
|
// else if (frameDelta >= nbDecoderSlots) // loss of sync start over
|
||||||
// {
|
// {
|
||||||
// //qDebug() << "SDRdaemonFECBuffer::writeData: loss of sync start over (2)" << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
// //qDebug() << "SDRdaemonSourceBuffer::writeData: loss of sync start over (2)" << frameIndex << ":" << frameDelta << ":" << decoderIndex;
|
||||||
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
// m_decoderIndexHead = decoderIndex; // new decoder slot head
|
||||||
// m_frameHead = frameIndex;
|
// m_frameHead = frameIndex;
|
||||||
// initReadIndex(); // reset read index
|
// initReadIndex(); // reset read index
|
||||||
|
@ -349,9 +349,9 @@ void SDRdaemonSourceGui::sendControl(bool force)
|
|||||||
int rc = nn_shutdown(m_sender, 0);
|
int rc = nn_shutdown(m_sender, 0);
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
qDebug() << "SDRdaemonFECGui::sendControl: disconnection failed";
|
qDebug() << "SDRdaemonSourceGui::sendControl: disconnection failed";
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "SDRdaemonFECGui::sendControl: disconnection successful";
|
qDebug() << "SDRdaemonSourceGui::sendControl: disconnection successful";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
@ -360,10 +360,10 @@ void SDRdaemonSourceGui::sendControl(bool force)
|
|||||||
rc = nn_connect(m_sender, addrstrng.c_str());
|
rc = nn_connect(m_sender, addrstrng.c_str());
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
qDebug() << "SDRdaemonFECGui::sendConfiguration: connexion to " << addrstrng.c_str() << " failed";
|
qDebug() << "SDRdaemonSourceGui::sendConfiguration: connexion to " << addrstrng.c_str() << " failed";
|
||||||
QMessageBox::information(this, tr("Message"), tr("Cannot connect to remote control port"));
|
QMessageBox::information(this, tr("Message"), tr("Cannot connect to remote control port"));
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "SDRdaemonFECGui::sendConfiguration: connexion to " << addrstrng.c_str() << " successful";
|
qDebug() << "SDRdaemonSourceGui::sendConfiguration: connexion to " << addrstrng.c_str() << " successful";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,14 +430,14 @@ void SDRdaemonSourceGui::sendControl(bool force)
|
|||||||
if (rc != config_size)
|
if (rc != config_size)
|
||||||
{
|
{
|
||||||
//QMessageBox::information(this, tr("Message"), tr("Cannot send message to remote control port"));
|
//QMessageBox::information(this, tr("Message"), tr("Cannot send message to remote control port"));
|
||||||
qDebug() << "SDRdaemonFECGui::sendControl: Cannot send message to remote control port."
|
qDebug() << "SDRdaemonSourceGui::sendControl: Cannot send message to remote control port."
|
||||||
<< " remoteAddress: " << m_remoteAddress
|
<< " remoteAddress: " << m_remoteAddress
|
||||||
<< " remotePort: " << m_settings.m_controlPort
|
<< " remotePort: " << m_settings.m_controlPort
|
||||||
<< " message: " << os.str().c_str();
|
<< " message: " << os.str().c_str();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECGui::sendControl:"
|
qDebug() << "SDRdaemonSourceGui::sendControl:"
|
||||||
<< "remoteAddress:" << m_remoteAddress
|
<< "remoteAddress:" << m_remoteAddress
|
||||||
<< "remotePort:" << m_settings.m_controlPort
|
<< "remotePort:" << m_settings.m_controlPort
|
||||||
<< "message:" << os.str().c_str();
|
<< "message:" << os.str().c_str();
|
||||||
|
@ -108,8 +108,8 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
if (MsgConfigureSDRdaemonSource::match(message))
|
if (MsgConfigureSDRdaemonSource::match(message))
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECInput::handleMessage:" << message.getIdentifier();
|
qDebug() << "SDRdaemonSourceInput::handleMessage:" << message.getIdentifier();
|
||||||
//MsgConfigureSDRdaemonFEC& conf = (MsgConfigureSDRdaemonFEC&) message;
|
//SDRdaemonSourceInput& conf = (MsgConfigureSDRdaemonFEC&) message;
|
||||||
//applySettings(conf.getSettings(), conf.getForce());
|
//applySettings(conf.getSettings(), conf.getForce());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ SDRdaemonSourceUDPHandler::~SDRdaemonSourceUDPHandler()
|
|||||||
|
|
||||||
void SDRdaemonSourceUDPHandler::start()
|
void SDRdaemonSourceUDPHandler::start()
|
||||||
{
|
{
|
||||||
qDebug("SDRdaemonFECUDPHandler::start");
|
qDebug("SDRdaemonSourceUDPHandler::start");
|
||||||
|
|
||||||
if (!m_dataSocket)
|
if (!m_dataSocket)
|
||||||
{
|
{
|
||||||
@ -81,12 +81,12 @@ void SDRdaemonSourceUDPHandler::start()
|
|||||||
|
|
||||||
if (m_dataSocket->bind(m_dataAddress, m_dataPort))
|
if (m_dataSocket->bind(m_dataAddress, m_dataPort))
|
||||||
{
|
{
|
||||||
qDebug("SDRdaemonFECUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort);
|
qDebug("SDRdaemonSourceUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort);
|
||||||
m_dataConnected = true;
|
m_dataConnected = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qWarning("SDRdaemonFECUDPHandler::start: cannot bind data port %d", m_dataPort);
|
qWarning("SDRdaemonSourceUDPHandler::start: cannot bind data port %d", m_dataPort);
|
||||||
disconnect(m_dataSocket, SIGNAL(readyRead()), this, SLOT(dataReadyRead()));
|
disconnect(m_dataSocket, SIGNAL(readyRead()), this, SLOT(dataReadyRead()));
|
||||||
m_dataConnected = false;
|
m_dataConnected = false;
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ void SDRdaemonSourceUDPHandler::start()
|
|||||||
|
|
||||||
void SDRdaemonSourceUDPHandler::stop()
|
void SDRdaemonSourceUDPHandler::stop()
|
||||||
{
|
{
|
||||||
qDebug("SDRdaemonFECUDPHandler::stop");
|
qDebug("SDRdaemonSourceUDPHandler::stop");
|
||||||
|
|
||||||
if (m_dataConnected)
|
if (m_dataConnected)
|
||||||
{
|
{
|
||||||
@ -117,12 +117,12 @@ void SDRdaemonSourceUDPHandler::stop()
|
|||||||
|
|
||||||
void SDRdaemonSourceUDPHandler::configureUDPLink(const QString& address, quint16 port)
|
void SDRdaemonSourceUDPHandler::configureUDPLink(const QString& address, quint16 port)
|
||||||
{
|
{
|
||||||
qDebug("SDRdaemonFECUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port);
|
qDebug("SDRdaemonSourceUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port);
|
||||||
bool addressOK = m_dataAddress.setAddress(address);
|
bool addressOK = m_dataAddress.setAddress(address);
|
||||||
|
|
||||||
if (!addressOK)
|
if (!addressOK)
|
||||||
{
|
{
|
||||||
qWarning("SDRdaemonFECUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str());
|
qWarning("SDRdaemonSourceUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str());
|
||||||
m_dataAddress = QHostAddress::LocalHost;
|
m_dataAddress = QHostAddress::LocalHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ void SDRdaemonSourceUDPHandler::processData()
|
|||||||
|
|
||||||
void SDRdaemonSourceUDPHandler::connectTimer(const QTimer* timer)
|
void SDRdaemonSourceUDPHandler::connectTimer(const QTimer* timer)
|
||||||
{
|
{
|
||||||
qDebug() << "SDRdaemonFECUDPHandler::connectTimer";
|
qDebug() << "SDRdaemonSourceUDPHandler::connectTimer";
|
||||||
#ifdef USE_INTERNAL_TIMER
|
#ifdef USE_INTERNAL_TIMER
|
||||||
#warning "Uses internal timer"
|
#warning "Uses internal timer"
|
||||||
m_timer = new QTimer();
|
m_timer = new QTimer();
|
||||||
|
Loading…
Reference in New Issue
Block a user