mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
TestMI and MIMO engine fixes
This commit is contained in:
parent
77b5002907
commit
ac39e55779
@ -45,7 +45,7 @@ MESSAGE_CLASS_DEFINITION(TestMI::MsgStartStop, Message)
|
|||||||
TestMI::TestMI(DeviceAPI *deviceAPI) :
|
TestMI::TestMI(DeviceAPI *deviceAPI) :
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_deviceDescription(),
|
m_deviceDescription("TestMI"),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_masterTimer(deviceAPI->getMasterTimer())
|
m_masterTimer(deviceAPI->getMasterTimer())
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ void DSPDeviceMIMOEngine::stop()
|
|||||||
|
|
||||||
bool DSPDeviceMIMOEngine::initProcess()
|
bool DSPDeviceMIMOEngine::initProcess()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceMIMOEngine::initGeneration";
|
qDebug() << "DSPDeviceMIMOEngine::initProcess";
|
||||||
DSPGenerationInit cmd;
|
DSPGenerationInit cmd;
|
||||||
|
|
||||||
return m_syncMessenger.sendWait(cmd) == StReady;
|
return m_syncMessenger.sendWait(cmd) == StReady;
|
||||||
@ -97,7 +97,7 @@ bool DSPDeviceMIMOEngine::initProcess()
|
|||||||
|
|
||||||
bool DSPDeviceMIMOEngine::startProcess()
|
bool DSPDeviceMIMOEngine::startProcess()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceMIMOEngine::startGeneration";
|
qDebug() << "DSPDeviceMIMOEngine::startProcess";
|
||||||
DSPGenerationStart cmd;
|
DSPGenerationStart cmd;
|
||||||
|
|
||||||
return m_syncMessenger.sendWait(cmd) == StRunning;
|
return m_syncMessenger.sendWait(cmd) == StRunning;
|
||||||
@ -105,7 +105,7 @@ bool DSPDeviceMIMOEngine::startProcess()
|
|||||||
|
|
||||||
void DSPDeviceMIMOEngine::stopProcess()
|
void DSPDeviceMIMOEngine::stopProcess()
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceMIMOEngine::stopGeneration";
|
qDebug() << "DSPDeviceMIMOEngine::stopProcess";
|
||||||
DSPGenerationStop cmd;
|
DSPGenerationStop cmd;
|
||||||
m_syncMessenger.storeMessage(cmd);
|
m_syncMessenger.storeMessage(cmd);
|
||||||
handleSynchronousMessages();
|
handleSynchronousMessages();
|
||||||
@ -302,6 +302,11 @@ void DSPDeviceMIMOEngine::workSampleSink(unsigned int sinkIndex)
|
|||||||
{
|
{
|
||||||
(*it)->feed(vbegin, vend, positiveOnly);
|
(*it)->feed(vbegin, vend, positiveOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// feed data to MIMO channels
|
||||||
|
for (MIMOChannels::const_iterator it = m_mimoChannels.begin(); it != m_mimoChannels.end(); ++it) {
|
||||||
|
(*it)->feed(vbegin, vend, sinkIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// notStarted -> idle -> init -> running -+
|
// notStarted -> idle -> init -> running -+
|
||||||
@ -335,20 +340,41 @@ DSPDeviceMIMOEngine::State DSPDeviceMIMOEngine::gotoIdle()
|
|||||||
|
|
||||||
for (; vbit != m_basebandSampleSinks.end(); ++vbit)
|
for (; vbit != m_basebandSampleSinks.end(); ++vbit)
|
||||||
{
|
{
|
||||||
for (BasebandSampleSinks::const_iterator it = vbit->begin(); it != vbit->end(); ++it) {
|
for (BasebandSampleSinks::const_iterator it = vbit->begin(); it != vbit->end(); ++it)
|
||||||
(*it)->stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<ThreadedBasebandSampleSinks>::const_iterator vtit = m_threadedBasebandSampleSinks.begin();
|
|
||||||
|
|
||||||
for (; vtit != m_threadedBasebandSampleSinks.end(); vtit++)
|
|
||||||
{
|
{
|
||||||
for (ThreadedBasebandSampleSinks::const_iterator it = vtit->begin(); it != vtit->end(); ++it) {
|
qDebug() << "DSPDeviceMIMOEngine::gotoIdle: stopping BasebandSampleSink: " << (*it)->objectName().toStdString().c_str();
|
||||||
(*it)->stop();
|
(*it)->stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<ThreadedBasebandSampleSinks>::const_iterator vtSinkIt = m_threadedBasebandSampleSinks.begin();
|
||||||
|
|
||||||
|
for (; vtSinkIt != m_threadedBasebandSampleSinks.end(); vtSinkIt++)
|
||||||
|
{
|
||||||
|
for (ThreadedBasebandSampleSinks::const_iterator it = vtSinkIt->begin(); it != vtSinkIt->end(); ++it)
|
||||||
|
{
|
||||||
|
qDebug() << "DSPDeviceMIMOEngine::gotoIdle: stopping ThreadedBasebandSampleSource(" << (*it)->getSampleSinkObjectName().toStdString().c_str() << ")";
|
||||||
|
(*it)->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ThreadedBasebandSampleSources>::const_iterator vtSourceIt = m_threadedBasebandSampleSources.begin();
|
||||||
|
|
||||||
|
for (; vtSourceIt != m_threadedBasebandSampleSources.end(); vtSourceIt++)
|
||||||
|
{
|
||||||
|
for (ThreadedBasebandSampleSources::const_iterator it = vtSourceIt->begin(); it != vtSourceIt->end(); ++it)
|
||||||
|
{
|
||||||
|
qDebug() << "DSPDeviceMIMOEngine::gotoIdle: stopping ThreadedBasebandSampleSource(" << (*it)->getSampleSourceObjectName().toStdString().c_str() << ")";
|
||||||
|
(*it)->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (MIMOChannels::const_iterator it = m_mimoChannels.begin(); it != m_mimoChannels.end(); ++it)
|
||||||
|
{
|
||||||
|
qDebug() << "DSPDeviceMIMOEngine::gotoIdle: stopping MIMOChannel: " << (*it)->objectName().toStdString().c_str();
|
||||||
|
(*it)->stop();
|
||||||
|
}
|
||||||
|
|
||||||
m_deviceSampleMIMO->stop();
|
m_deviceSampleMIMO->stop();
|
||||||
m_deviceDescription.clear();
|
m_deviceDescription.clear();
|
||||||
|
|
||||||
@ -480,22 +506,39 @@ DSPDeviceMIMOEngine::State DSPDeviceMIMOEngine::gotoRunning()
|
|||||||
{
|
{
|
||||||
for (BasebandSampleSinks::const_iterator it = vbit->begin(); it != vbit->end(); ++it)
|
for (BasebandSampleSinks::const_iterator it = vbit->begin(); it != vbit->end(); ++it)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting " << (*it)->objectName().toStdString().c_str();
|
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting BasebandSampleSink: " << (*it)->objectName().toStdString().c_str();
|
||||||
(*it)->start();
|
(*it)->start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ThreadedBasebandSampleSinks>::const_iterator vtit = m_threadedBasebandSampleSinks.begin();
|
std::vector<ThreadedBasebandSampleSinks>::const_iterator vtSinkIt = m_threadedBasebandSampleSinks.begin();
|
||||||
|
|
||||||
for (; vtit != m_threadedBasebandSampleSinks.end(); vtit++)
|
for (; vtSinkIt != m_threadedBasebandSampleSinks.end(); vtSinkIt++)
|
||||||
{
|
{
|
||||||
for (ThreadedBasebandSampleSinks::const_iterator it = vtit->begin(); it != vtit->end(); ++it)
|
for (ThreadedBasebandSampleSinks::const_iterator it = vtSinkIt->begin(); it != vtSinkIt->end(); ++it)
|
||||||
{
|
{
|
||||||
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting ThreadedSampleSink(" << (*it)->getSampleSinkObjectName().toStdString().c_str() << ")";
|
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting ThreadedBasebandSampleSink(" << (*it)->getSampleSinkObjectName().toStdString().c_str() << ")";
|
||||||
(*it)->start();
|
(*it)->start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<ThreadedBasebandSampleSources>::const_iterator vtSourceIt = m_threadedBasebandSampleSources.begin();
|
||||||
|
|
||||||
|
for (; vtSourceIt != m_threadedBasebandSampleSources.end(); vtSourceIt++)
|
||||||
|
{
|
||||||
|
for (ThreadedBasebandSampleSources::const_iterator it = vtSourceIt->begin(); it != vtSourceIt->end(); ++it)
|
||||||
|
{
|
||||||
|
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting ThreadedBasebandSampleSource(" << (*it)->getSampleSourceObjectName().toStdString().c_str() << ")";
|
||||||
|
(*it)->start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (MIMOChannels::const_iterator it = m_mimoChannels.begin(); it != m_mimoChannels.end(); ++it)
|
||||||
|
{
|
||||||
|
qDebug() << "DSPDeviceMIMOEngine::gotoRunning: starting MIMOChannel: " << (*it)->objectName().toStdString().c_str();
|
||||||
|
(*it)->start();
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << "DSPDeviceMIMOEngine::gotoRunning:input message queue pending: " << m_inputMessageQueue.size();
|
qDebug() << "DSPDeviceMIMOEngine::gotoRunning:input message queue pending: " << m_inputMessageQueue.size();
|
||||||
|
|
||||||
return StRunning;
|
return StRunning;
|
||||||
|
Loading…
Reference in New Issue
Block a user