1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

REST API: updates for MIMO

This commit is contained in:
f4exb
2019-12-23 18:49:06 +01:00
parent 2d1e4c5493
commit ddc4667bdb
12 changed files with 443 additions and 33 deletions
+41 -26
View File
@@ -382,7 +382,7 @@ void DeviceAPI::setSamplingDevicePluginInstanceGUI(PluginInstanceGUI *gui)
m_samplingDevicePluginInstanceUI = gui;
}
void DeviceAPI::getDeviceEngineStateStr(QString& state)
void DeviceAPI::getDeviceEngineStateStr(QString& state, int subsystemIndex)
{
if (m_deviceSourceEngine)
{
@@ -432,44 +432,59 @@ void DeviceAPI::getDeviceEngineStateStr(QString& state)
break;
}
}
else if (m_deviceMIMOEngine)
{
switch(m_deviceMIMOEngine->state(subsystemIndex))
{
case DSPDeviceSinkEngine::StNotStarted:
state = "notStarted";
break;
case DSPDeviceSinkEngine::StIdle:
state = "idle";
break;
case DSPDeviceSinkEngine::StReady:
state = "ready";
break;
case DSPDeviceSinkEngine::StRunning:
state = "running";
break;
case DSPDeviceSinkEngine::StError:
state = "error";
break;
default:
state = "notStarted";
break;
}
}
else
{
state = "notStarted";
}
}
ChannelAPI *DeviceAPI::getChanelSinkAPIAt(int index, int streamIndex)
ChannelAPI *DeviceAPI::getChanelSinkAPIAt(int index)
{
(void) streamIndex;
if (m_streamType == StreamSingleRx)
{
if (index < m_channelSinkAPIs.size()) {
return m_channelSinkAPIs.at(index);
} else {
return nullptr;
}
}
else // TODO: not implemented
{
if (index < m_channelSinkAPIs.size()) {
return m_channelSinkAPIs.at(index);
} else {
return nullptr;
}
}
ChannelAPI *DeviceAPI::getChanelSourceAPIAt(int index, int streamIndex)
ChannelAPI *DeviceAPI::getChanelSourceAPIAt(int index)
{
(void) streamIndex;
if (m_streamType == StreamSingleTx)
{
if (index < m_channelSourceAPIs.size()) {
return m_channelSourceAPIs.at(index);
} else {
return nullptr;
}
if (index < m_channelSourceAPIs.size()) {
return m_channelSourceAPIs.at(index);
} else {
return nullptr;
}
else // TODO: not implemented
{
}
ChannelAPI *DeviceAPI::getMIMOChannelAPIAt(int index)
{
if (index < m_mimoChannelAPIs.size()) {
return m_mimoChannelAPIs.at(index);
} else {
return nullptr;
}
}