20 #include <QApplication> 25 #include "ui_mainwindow.h" 68 m_mainWindow(mainWindow)
82 *response.
getAppname() = qApp->applicationName();
83 *response.
getVersion() = qApp->applicationVersion();
87 response.
setPid(qApp->applicationPid());
88 #if QT_VERSION >= 0x050400 89 *response.
getArchitecture() = QString(QSysInfo::currentCpuArchitecture());
90 *response.
getOs() = QString(QSysInfo::prettyProductName());
115 *error.
getMessage() = QString(
"Not supported in GUI instance");
130 QList<SWGSDRangel::SWGPreset*> *swgPresets = response.
getPresets();
132 for (
int i = 0;
i < nbPresets;
i++)
150 int nbSamplingDevices;
152 if (direction == 0) {
154 }
else if (direction == 1) {
157 nbSamplingDevices = 0;
161 QList<SWGSDRangel::SWGDeviceListItem*> *devices = response.
getDevices();
163 for (
int i = 0;
i < nbSamplingDevices;
i++)
167 if (direction == 0) {
169 }
else if (direction == 1) {
176 devices->back()->init();
177 *devices->back()->getDisplayedName() = samplingDevice->
displayedName;
178 *devices->back()->getHwType() = samplingDevice->
hardwareId;
179 *devices->back()->getSerial() = samplingDevice->
serial;
180 devices->back()->setSequence(samplingDevice->
sequence);
181 devices->back()->setDirection((
int) samplingDevice->
streamType);
182 devices->back()->setDeviceNbStreams(samplingDevice->
deviceNbItems);
183 devices->back()->setDeviceSetIndex(samplingDevice->
claimed);
184 devices->back()->setIndex(
i);
198 int nbChannelDevices;
203 nbChannelDevices = channelRegistrations->size();
205 else if (direction == 1)
208 nbChannelDevices = channelRegistrations->size();
212 channelRegistrations =
nullptr;
213 nbChannelDevices = 0;
217 QList<SWGSDRangel::SWGChannelListItem*> *channels = response.
getChannels();
219 for (
int i = 0;
i < nbChannelDevices;
i++)
222 channels->back()->init();
225 *channels->back()->getVersion() = pluginDescriptor.
version;
226 *channels->back()->getName() = pluginDescriptor.
displayedName;
227 channels->back()->setDirection(direction);
228 *channels->back()->getIdUri() = channelRegistrations->at(
i).m_channelIdURI;
229 *channels->back()->getId() = channelRegistrations->at(
i).m_channelId;
230 channels->back()->setIndex(
i);
300 int nbInputDevices = audioInputDevices.size();
301 int nbOutputDevices = audioOutputDevices.size();
306 QList<SWGSDRangel::SWGAudioInputDevice*> *inputDevices = response.
getInputDevices();
307 QList<SWGSDRangel::SWGAudioOutputDevice*> *outputDevices = response.
getOutputDevices();
313 inputDevices->back()->init();
316 inputDevices->back()->setIndex(-1);
317 inputDevices->back()->setSampleRate(inputDeviceInfo.
sampleRate);
318 inputDevices->back()->setIsSystemDefault(0);
319 inputDevices->back()->setDefaultUnregistered(found ? 0 : 1);
320 inputDevices->back()->setVolume(inputDeviceInfo.
volume);
323 for (
int i = 0;
i < nbInputDevices;
i++)
326 inputDevices->back()->init();
329 *inputDevices->back()->getName() = audioInputDevices.at(
i).deviceName();
330 inputDevices->back()->setIndex(
i);
331 inputDevices->back()->setSampleRate(inputDeviceInfo.
sampleRate);
332 inputDevices->back()->setIsSystemDefault(audioInputDevices.at(
i).deviceName() == QAudioDeviceInfo::defaultInputDevice().deviceName() ? 1 : 0);
333 inputDevices->back()->setDefaultUnregistered(found ? 0 : 1);
334 inputDevices->back()->setVolume(inputDeviceInfo.
volume);
339 outputDevices->back()->init();
342 outputDevices->back()->setIndex(-1);
343 outputDevices->back()->setSampleRate(outputDeviceInfo.
sampleRate);
344 inputDevices->back()->setIsSystemDefault(0);
345 outputDevices->back()->setDefaultUnregistered(found ? 0 : 1);
346 outputDevices->back()->setCopyToUdp(outputDeviceInfo.
copyToUDP ? 1 : 0);
347 outputDevices->back()->setUdpUsesRtp(outputDeviceInfo.
udpUseRTP ? 1 : 0);
348 outputDevices->back()->setUdpChannelMode((
int) outputDeviceInfo.
udpChannelMode);
349 outputDevices->back()->setUdpChannelCodec((
int) outputDeviceInfo.
udpChannelCodec);
351 *outputDevices->back()->getUdpAddress() = outputDeviceInfo.
udpAddress;
352 outputDevices->back()->setUdpPort(outputDeviceInfo.
udpPort);
355 for (
int i = 0;
i < nbOutputDevices;
i++)
358 outputDevices->back()->init();
361 *outputDevices->back()->getName() = audioOutputDevices.at(
i).deviceName();
362 outputDevices->back()->setIndex(
i);
363 outputDevices->back()->setSampleRate(outputDeviceInfo.
sampleRate);
364 outputDevices->back()->setIsSystemDefault(audioOutputDevices.at(
i).deviceName() == QAudioDeviceInfo::defaultOutputDevice().deviceName() ? 1 : 0);
365 outputDevices->back()->setDefaultUnregistered(found ? 0 : 1);
366 outputDevices->back()->setCopyToUdp(outputDeviceInfo.
copyToUDP ? 1 : 0);
367 outputDevices->back()->setUdpUsesRtp(outputDeviceInfo.
udpUseRTP ? 1 : 0);
368 outputDevices->back()->setUdpChannelMode((
int) outputDeviceInfo.
udpChannelMode);
369 outputDevices->back()->setUdpChannelCodec((
int) outputDeviceInfo.
udpChannelCodec);
371 *outputDevices->back()->getUdpAddress() = outputDeviceInfo.
udpAddress;
372 outputDevices->back()->setUdpPort(outputDeviceInfo.
udpPort);
380 const QStringList& audioInputKeys,
386 int deviceIndex = response.
getIndex();
391 *error.
getMessage() = QString(
"There is no audio input device at index %1").arg(deviceIndex);
397 if (audioInputKeys.contains(
"sampleRate")) {
400 if (audioInputKeys.contains(
"volume")) {
415 const QStringList& audioOutputKeys,
420 int deviceIndex = response.
getIndex();
425 *error.
getMessage() = QString(
"There is no audio output device at index %1").arg(deviceIndex);
431 if (audioOutputKeys.contains(
"sampleRate")) {
434 if (audioOutputKeys.contains(
"copyToUDP")) {
437 if (audioOutputKeys.contains(
"udpUsesRTP")) {
440 if (audioOutputKeys.contains(
"udpChannelMode")) {
443 if (audioOutputKeys.contains(
"udpChannelCodec")) {
446 if (audioOutputKeys.contains(
"udpDecimatiobFactor")) {
449 if (audioOutputKeys.contains(
"udpAddress")) {
452 if (audioOutputKeys.contains(
"udpPort")) {
483 int deviceIndex = response.
getIndex();
488 *error.
getMessage() = QString(
"There is no audio input device at index %1").arg(deviceIndex);
507 int deviceIndex = response.
getIndex();
512 *error.
getMessage() = QString(
"There is no audio output device at index %1").arg(deviceIndex);
545 *response.
getMessage() = QString(
"Unregistered parameters for devices not in list of available input devices for this instance");
558 *response.
getMessage() = QString(
"Unregistered parameters for devices not in list of available output devices for this instance");
583 latitude = latitude < -90.0 ? -90.0 : latitude > 90.0 ? 90.0 : latitude;
584 longitude = longitude < -180.0 ? -180.0 : longitude > 180.0 ? 180.0 : longitude;
602 std::vector<std::string> deviceNames;
605 QList<SWGSDRangel::SWGDVSerialDevice*> *deviceNamesList = response.
getDvSerialDevices();
607 std::vector<std::string>::iterator it = deviceNames.begin();
609 while (it != deviceNames.end())
612 deviceNamesList->back()->init();
613 *deviceNamesList->back()->getDeviceName() = QString::fromStdString(*it);
632 std::vector<std::string> deviceNames;
635 QList<SWGSDRangel::SWGDVSerialDevice*> *deviceNamesList = response.
getDvSerialDevices();
637 std::vector<std::string>::iterator it = deviceNames.begin();
639 while (it != deviceNames.end())
642 deviceNamesList->back()->init();
643 *deviceNamesList->back()->getDeviceName() = QString::fromStdString(*it);
662 std::vector<std::string> deviceNames;
663 std::vector<QString> qDeviceNames;
666 for (std::vector<QString>::const_iterator it = qDeviceNames.begin(); it != qDeviceNames.end(); ++it) {
667 deviceNames.push_back(it->toStdString());
671 QList<SWGSDRangel::SWGDVSerialDevice*> *deviceNamesList = response.
getDvSerialDevices();
673 std::vector<std::string>::iterator it = deviceNames.begin();
675 while (it != deviceNames.end())
678 deviceNamesList->back()->init();
679 *deviceNamesList->back()->getDeviceName() = QString::fromStdString(*it);
693 std::vector<std::string> deviceNames;
696 QList<SWGSDRangel::SWGAMBEDevice*> *deviceNamesList = response.
getAmbeDevices();
698 std::vector<std::string>::iterator it = deviceNames.begin();
700 while (it != deviceNames.end())
703 deviceNamesList->back()->init();
704 *deviceNamesList->back()->getDeviceRef() = QString::fromStdString(*it);
705 deviceNamesList->back()->setDelete(0);
720 *response.
getMessage() = QString(
"All AMBE devices released");
732 QList<SWGSDRangel::SWGAMBEDevice *> *ambeList = query.
getAmbeDevices();
734 for (QList<SWGSDRangel::SWGAMBEDevice *>::const_iterator it = ambeList->begin(); it != ambeList->end(); ++it) {
747 QList<SWGSDRangel::SWGAMBEDevice *> *ambeList = query.
getAmbeDevices();
749 for (QList<SWGSDRangel::SWGAMBEDevice *>::const_iterator it = ambeList->begin(); it != ambeList->end(); ++it)
751 if ((*it)->getDelete()) {
769 int nbPresetsThisGroup = 0;
772 QList<SWGSDRangel::SWGPresetGroup*> *groups = response.
getGroups();
773 QList<SWGSDRangel::SWGPresetItem*> *swgPresets = 0;
778 for (; i < nbPresets; i++)
782 if ((i == 0) || (groupName != preset->
getGroup()))
784 if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
786 groups->back()->init();
788 *groups->back()->getGroupName() = groupName;
789 swgPresets = groups->back()->getPresets();
791 nbPresetsThisGroup = 0;
795 swgPresets->back()->init();
797 *swgPresets->back()->getType() = preset->
isSourcePreset() ?
"R" :
"T";
799 nbPresetsThisGroup++;
802 if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
817 if (deviceSetIndex >= nbDeviceSets)
820 *error.
getMessage() = QString(
"There is no device set at index %1. Number of device sets is %2").arg(deviceSetIndex).arg(nbDeviceSets);
829 if (selectedPreset == 0)
832 *error.
getMessage() = QString(
"There is no preset [%1, %2, %3 %4]")
845 *error.
getMessage() = QString(
"Preset type (T) and device set type (Rx) mismatch");
852 *error.
getMessage() = QString(
"Preset type (R) and device set type (Tx) mismatch");
877 if (deviceSetIndex >= nbDeviceSets)
880 *error.
getMessage() = QString(
"There is no device set at index %1. Number of device sets is %2").arg(deviceSetIndex).arg(nbDeviceSets);
889 if (selectedPreset == 0)
892 *error.
getMessage() = QString(
"There is no preset [%1, %2, %3 %4]")
906 *error.
getMessage() = QString(
"Preset type (T) and device set type (Rx) mismatch");
913 *error.
getMessage() = QString(
"Preset type (R) and device set type (Tx) mismatch");
939 if (deviceSetIndex >= nbDeviceSets)
942 *error.
getMessage() = QString(
"There is no device set at index %1. Number of device sets is %2").arg(deviceSetIndex).arg(nbDeviceSets);
947 int deviceCenterFrequency = 0;
955 *error.
getMessage() = QString(
"Device set error");
960 deviceCenterFrequency,
964 if (selectedPreset == 0)
971 *error.
getMessage() = QString(
"Preset already exists [%1, %2, %3 %4]")
973 .
arg(deviceCenterFrequency)
974 .arg(*presetIdentifier->
getName())
1000 if (selectedPreset == 0)
1002 *error.
getMessage() = QString(
"There is no preset [%1, %2, %3 %4]")
1040 *response.
getMessage() = QString(
"Message to add a new device set (MsgAddDeviceSet) was submitted successfully");
1055 *response.
getMessage() = QString(
"Message to remove last device set (MsgRemoveLastDeviceSet) was submitted successfully");
1062 *error.
getMessage() =
"No more device sets to be removed";
1083 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1100 *response.
getMessage() = QString(
"Message to focus on device set (MsgDeviceSetFocus) was submitted successfully");
1107 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1126 *error.
getMessage() = QString(
"Device type and device set type (Tx) mismatch");
1133 *error.
getMessage() = QString(
"Device type and device set type (Rx) mismatch");
1137 int nbSamplingDevices;
1144 nbSamplingDevices = 0;
1148 for (
int i = 0;
i < nbSamplingDevices;
i++)
1206 *error.
getMessage() = QString(
"Device not found");
1212 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1244 *error.
getMessage() = QString(
"DeviceSet error");
1250 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1258 const QStringList& deviceSettingsKeys,
1272 *error.
getMessage() = QString(
"Single Rx device found but other type of device requested");
1290 *error.
getMessage() = QString(
"Single Tx device found but other type of device requested");
1306 *error.
getMessage() = QString(
"DeviceSet error");
1312 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1342 *error.
getMessage() = QString(
"DeviceSet error");
1348 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1378 *error.
getMessage() = QString(
"DeviceSet error");
1384 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1414 *error.
getMessage() = QString(
"DeviceSet error");
1420 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1453 *error.
getMessage() = QString(
"DeviceSet error");
1459 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1479 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1500 *error.
getMessage() = QString(
"Device set at %1 is not a receive device set").arg(deviceSetIndex);
1505 int nbRegistrations = channelRegistrations->size();
1507 for (; index < nbRegistrations; index++)
1509 if (channelRegistrations->at(index).m_channelId == *query.
getChannelType()) {
1514 if (index < nbRegistrations)
1520 *response.
getMessage() = QString(
"Message to add a channel (MsgAddChannel) was submitted successfully");
1536 *error.
getMessage() = QString(
"Device set at %1 is not a transmit device set").arg(deviceSetIndex);
1541 int nbRegistrations = channelRegistrations->size();
1543 for (; index < nbRegistrations; index++)
1545 if (channelRegistrations->at(index).m_channelId == *query.
getChannelType()) {
1550 if (index < nbRegistrations)
1556 *response.
getMessage() = QString(
"Message to add a channel (MsgAddChannel) was submitted successfully");
1570 *error.
getMessage() = QString(
"This type of device is not implemented yet");
1577 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1594 if (channelIndex < deviceSet->getNumberOfRxChannels())
1600 *response.
getMessage() = QString(
"Message to delete a channel (MsgDeleteChannel) was submitted successfully");
1607 *error.
getMessage() = QString(
"There is no channel at index %1. There are %2 Rx channels")
1609 .arg(channelIndex < deviceSet->getNumberOfRxChannels());
1615 if (channelIndex < deviceSet->getNumberOfTxChannels())
1621 *response.
getMessage() = QString(
"Message to delete a channel (MsgDeleteChannel) was submitted successfully");
1628 *error.
getMessage() = QString(
"There is no channel at index %1. There are %2 Tx channels")
1630 .arg(channelIndex < deviceSet->getNumberOfRxChannels());
1637 *error.
getMessage() = QString(
"DeviceSet error");
1644 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1665 if (channelAPI == 0)
1667 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1682 if (channelAPI == 0)
1684 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1697 *error.
getMessage() = QString(
"DeviceSet error");
1703 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1725 if (channelAPI == 0)
1727 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1742 if (channelAPI == 0)
1744 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1757 *error.
getMessage() = QString(
"DeviceSet error");
1763 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1772 const QStringList& channelSettingsKeys,
1786 if (channelAPI == 0)
1788 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1793 QString channelType;
1802 *error.
getMessage() = QString(
"There is no channel type %1 at index %2. Found %3.")
1814 if (channelAPI == 0)
1816 *error.
getMessage() = QString(
"There is no channel with index %1").arg(channelIndex);
1821 QString channelType;
1830 *error.
getMessage() = QString(
"There is no channel type %1 at index %2. Found %3.")
1840 *error.
getMessage() = QString(
"DeviceSet error");
1846 *error.
getMessage() = QString(
"There is no device set with index %1").arg(deviceSetIndex);
1854 deviceSetList->
init();
1865 QList<SWGSDRangel::SWGDeviceSet*> *deviceSets = deviceSetList->
getDeviceSets();
1876 samplingDevice->
init();
1877 samplingDevice->
setIndex(deviceUISetIndex);
1896 QList<SWGSDRangel::SWGChannel*> *channels = deviceSet->
getChannels();
1901 channels->back()->init();
1905 channels->back()->setUid(channel->
getUID());
1907 channel->
getTitle(*channels->back()->getTitle());
1928 QList<SWGSDRangel::SWGChannel*> *channels = deviceSet->
getChannels();
1933 channels->back()->init();
1937 channels->back()->setUid(channel->
getUID());
1939 channel->
getTitle(*channels->back()->getTitle());
1946 channelsDetail->
init();
1948 QString channelReportError;
1953 QList<SWGSDRangel::SWGChannel*> *channels = channelsDetail->
getChannels();
1958 channels->back()->init();
1962 channels->back()->setUid(channel->
getUID());
1964 channel->
getTitle(*channels->back()->getTitle());
1968 if (channel->
webapiReportGet(*channelReport, channelReportError) != 501) {
1969 channels->back()->setReport(channelReport);
1971 delete channelReport;
1979 QList<SWGSDRangel::SWGChannel*> *channels = channelsDetail->
getChannels();
1984 channels->back()->init();
1988 channels->back()->setUid(channel->
getUID());
1990 channel->
getTitle(*channels->back()->getTitle());
1994 if (channel->
webapiReportGet(*channelReport, channelReportError) != 501) {
1995 channels->back()->setReport(channelReport);
1997 delete channelReport;
2005 if (msgTypeString ==
"debug") {
2007 }
else if (msgTypeString ==
"info") {
2009 }
else if (msgTypeString ==
"warning") {
2010 return QtWarningMsg;
2011 }
else if (msgTypeString ==
"error") {
2012 return QtCriticalMsg;
2029 levelStr =
"warning";
MessageQueue m_inputMessageQueue
virtual int webapiSettingsGet(SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
QList< SWGChannel * > * getChannels()
static const QString m_defaultDeviceName
float getLatitude() const
static MsgLoadPreset * create(const Preset *preset, int deviceSetIndex)
virtual int instanceConfigGet(SWGSDRangel::SWGInstanceConfigResponse &response, SWGSDRangel::SWGErrorResponse &error)
const QList< QAudioDeviceInfo > & getInputDevices() const
virtual int instanceAudioInputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setDeviceStreamIndex(qint32 device_stream_index)
const QString & getLogFileName() const
void setDeviceHwType(QString *device_hw_type)
virtual int instanceAMBEDevicesGet(SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
uint32_t udpDecimationFactor
QList< ChannelRegistration > ChannelRegistrations
const QString displayedName
virtual int devicesetDeviceRunPost(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
DeviceSampleSink * getSink()
int sequence
The device sequence. >0 when more than one device of the same type is connected.
QList< SWGDeviceSet * > * getDeviceSets()
void push(Message *message, bool emitSignal=true)
Push message onto queue.
QString displayedName
The human readable name.
void setDspTxBits(qint32 dsp_tx_bits)
bool getUseFileLogger() const
void setDspRxBits(qint32 dsp_rx_bits)
ChannelAPI * getChanelSinkAPIAt(int index, int streamIndex=0)
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
std::vector< DeviceUISet * > m_deviceUIs
PluginAPI::ChannelRegistrations * getRxChannelRegistrations()
void setDeviceSetIndex(qint32 device_set_index)
quint64 getCenterFrequency() const
virtual int instancePresetPatch(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
void outputInfosCleanup()
Remove output info from map for output devices not present.
virtual int instanceAudioGet(SWGSDRangel::SWGAudioDevices &response, SWGSDRangel::SWGErrorResponse &error)
void setUdpPort(qint32 udp_port)
virtual void getIdentifier(QString &id)=0
DeviceSampleSource * getSource()
bool getUseLogFile() const
virtual int instanceChannels(int direction, SWGSDRangel::SWGInstanceChannelsResponse &response, SWGSDRangel::SWGErrorResponse &error)
SWGPreferences * getPreferences()
uint32_t getDeviceItemIndex() const
QString hardwareId
The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
static MsgSetDevice * create(int deviceSetIndex, int deviceIndex, bool tx)
MainWindow & m_mainWindow
virtual const PluginDescriptor & getPluginDescriptor() const =0
QString * getDeviceHwType()
qtwebapp::LoggerWithFile * m_logger
void setDirection(qint32 direction)
bool isSourcePreset() const
static MsgAddDeviceSet * create(int direction)
const MainSettings & getMainSettings() const
virtual int instanceAMBESerialGet(SWGSDRangel::SWGDVSerialDevices &response, SWGSDRangel::SWGErrorResponse &error)
void setNbOutputDevices(qint32 nb_output_devices)
virtual int devicesetChannelReportGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelReport &response, SWGSDRangel::SWGErrorResponse &error)
uint32_t getDeviceNbItems() const
void setDirection(qint32 direction)
void scan(std::vector< QString > &ambeDevices)
void setSequence(qint32 sequence)
SWGDeviceSetList * getDevicesetlist()
static MsgDeviceSetFocus * create(int deviceSetIndex)
QList< SWGAudioInputDevice * > * getInputDevices()
void setChannelType(QString *channel_type)
AudioOutput::UDPChannelCodec udpChannelCodec
void getChannelsDetail(SWGSDRangel::SWGChannelsDetail *channelsDetail, const DeviceUISet *deviceUISet)
virtual int webapiReportGet(SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
PluginAPI::ChannelRegistrations * getTxChannelRegistrations()
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
virtual int instanceAudioInputPatch(SWGSDRangel::SWGAudioInputDevice &response, const QStringList &audioInputKeys, SWGSDRangel::SWGErrorResponse &error)
static MsgRemoveLastDeviceSet * create()
bool registerController(const std::string &deviceRef)
create a new controller for the device in reference
virtual int devicesetChannelSettingsPutPatch(int deviceSetIndex, int channelIndex, bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
void setConsoleMinLogLevel(const QtMsgType &minLogLevel)
Preset * newPreset(const QString &group, const QString &description)
void setCenterFrequency(qint64 center_frequency)
DSPDeviceSourceEngine * m_deviceSourceEngine
void setChannelcount(qint32 channelcount)
virtual int instanceAudioOutputPatch(SWGSDRangel::SWGAudioOutputDevice &response, const QStringList &audioOutputKeys, SWGSDRangel::SWGErrorResponse &error)
static MsgDeletePreset * create(const Preset *preset)
QList< SWGPresetGroup * > * getGroups()
virtual qint64 getCenterFrequency() const =0
Applies to a default stream.
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
SWGLoggingInfo * getLogging()
void getDVSerialNames(std::vector< std::string > &deviceNames)
SWGPresetIdentifier * getPreset()
void setChannelcount(qint32 channelcount)
virtual int instanceAMBEDevicesPatch(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
void setDevicecount(qint32 devicecount)
virtual int webapiReportGet(SWGSDRangel::SWGDeviceReport &response, QString &errorMessage)
WebAPIAdapterGUI(MainWindow &mainWindow)
virtual int webapiSettingsPutPatch(bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
virtual int instanceLoggingPut(SWGSDRangel::SWGLoggingInfo &query, SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
virtual int getSampleRate() const =0
Sample rate exposed by the source.
QList< SWGChannel * > * getChannels()
SWGSamplingDevice * getSamplingDevice()
virtual int instanceDeviceSetDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
bool getInputDeviceName(int inputDeviceIndex, QString &deviceName) const
virtual int devicesetDevicePut(int deviceSetIndex, SWGSDRangel::SWGDeviceListItem &query, SWGSDRangel::SWGDeviceListItem &response, SWGSDRangel::SWGErrorResponse &error)
void setUdpAddress(QString *udp_address)
void setOutputDeviceInfo(int outputDeviceIndex, const OutputDeviceInfo &deviceInfo)
int getPresetCount() const
void setChannelType(QString *channel_type)
virtual int instanceLocationGet(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
virtual quint64 getCenterFrequency() const =0
Center frequency exposed by the sink.
AMBEEngine * getAMBEEngine()
virtual int instanceDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setNbDevices(qint32 nb_devices)
QList< SWGPreset * > * getPresets()
virtual int webapiSettingsPutPatch(bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
void setSampleRate(qint32 sample_rate)
QtMsgType getFileMinLogLevel() const
void getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet *deviceUISet, int deviceUISetIndex)
virtual int instanceDeviceSetPost(int direction, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setChannelcount(qint32 channelcount)
QString * getDisplayedName()
QList< SWGDVSerialDevice * > * getDvSerialDevices()
int deviceNbItems
Number of items (or streams) in the device. >1 for composite devices.
void setDirection(qint32 direction)
bool getInputDeviceInfo(const QString &deviceName, InputDeviceInfo &deviceInfo) const
void setFileMinLogLevel(const QtMsgType &minLogLevel)
void inputInfosCleanup()
Remove input info from map for input devices not present.
virtual int devicesetDeviceRunGet(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetsGet(SWGSDRangel::SWGPresets &response, SWGSDRangel::SWGErrorResponse &error)
static void webapiFormatPreferences(SWGSDRangel::SWGPreferences *apiPreferences, const Preferences &preferences)
QString * getUdpAddress()
void setNbGroups(qint32 nb_groups)
void setNbDevices(qint32 nb_devices)
virtual int webapiRun(bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
void setUdpDecimationFactor(qint32 udp_decimation_factor)
bool getOutputDeviceInfo(const QString &deviceName, OutputDeviceInfo &deviceInfo) const
QString * getChannelType()
virtual int devicesetChannelDelete(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setDeviceStreamIndex(qint32 device_stream_index)
virtual int devicesetChannelPost(int deviceSetIndex, SWGSDRangel::SWGChannelSettings &query, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setDVSerialSupport(bool support)
virtual int devicesetDeviceRunDelete(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesPut(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
void setLongitude(float longitude)
bool getOutputDeviceName(int outputDeviceIndex, QString &deviceName) const
virtual int devicesetFocusPatch(int deviceSetIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioOutputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setNbInputDevices(qint32 nb_input_devices)
void setIndex(qint32 index)
virtual int instancePresetPut(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
virtual int webapiSettingsPutPatch(bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
ChannelAPI * getChanelSourceAPIAt(int index, int streamIndex=0)
qint32 getDeviceStreamIndex()
float getLongitude() const
virtual int devicesetDeviceSettingsPutPatch(int deviceSetIndex, bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
const QList< QAudioDeviceInfo > & getOutputDevices() const
void setDirection(qint32 direction)
void unsetInputDeviceInfo(int inputDeviceIndex)
QList< SWGDeviceListItem * > * getDevices()
int claimed
This is the device set index if claimed else -1.
virtual int instanceDVSerialPatch(bool dvserial, SWGSDRangel::SWGDVSerialDevices &response, SWGSDRangel::SWGErrorResponse &error)
DSPDeviceSinkEngine * m_deviceSinkEngine
virtual int devicesetDeviceSettingsGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioOutputDelete(SWGSDRangel::SWGAudioOutputDevice &response, SWGSDRangel::SWGErrorResponse &error)
void setIndex(qint32 index)
virtual int instancePresetPost(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
void setDeviceNbStreams(qint32 device_nb_streams)
virtual int webapiSettingsGet(SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
const Preset * getPreset(int index) const
void setDeviceNbStreams(qint32 device_nb_streams)
QString * getChannelType()
QString serial
The device serial number defined by the vendor or a fake one (SDRplay)
void getDeviceEngineStateStr(QString &state)
virtual void getTitle(QString &title)=0
void setUdpChannelCodec(qint32 udp_channel_codec)
void setUseLogFile(bool useLogFile)
const QString & getSamplingDeviceSerial() const
qint32 getUdpChannelCodec()
qint32 getUdpDecimationFactor()
int getNbRxSamplingDevices() const
AudioDeviceManager * getAudioDeviceManager()
virtual int webapiRunGet(SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
AudioOutput::UDPChannelMode udpChannelMode
virtual int devicesetDeviceReportGet(int deviceSetIndex, SWGSDRangel::SWGDeviceReport &response, SWGSDRangel::SWGErrorResponse &error)
void getFileMinMessageLevelStr(QString &levelStr)
static MsgAddChannel * create(int deviceSetIndex, int channelRegistrationIndex, bool tx)
qint32 getUdpChannelMode()
virtual int devicesetChannelSettingsGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
const PluginInterface::SamplingDevice * getTxSamplingDevice(int deviceIndex) const
const Preferences & getPreferences() const
const QString & getHardwareId() const
static void getMsgTypeString(const QtMsgType &msgType, QString &level)
void getDeviceSetList(SWGSDRangel::SWGDeviceSetList *deviceSetList)
QList< SWGAudioOutputDevice * > * getOutputDevices()
virtual int instanceLocationPut(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
QList< SWGAMBEDevice * > * getAmbeDevices()
int getNbSourceChannels() const
static QtMsgType getMsgTypeFromString(const QString &msgTypeString)
SWGPreset * getWorkingPreset()
void setDevicesetcount(qint32 devicesetcount)
void setInputDeviceInfo(int inputDeviceIndex, const InputDeviceInfo &deviceInfo)
void setLatitude(float latitude)
const PluginInterface::SamplingDevice * getRxSamplingDevice(int deviceIndex) const
virtual int instanceDVSerialGet(SWGSDRangel::SWGDVSerialDevices &response, SWGSDRangel::SWGErrorResponse &error)
QString * getConsoleLevel()
void setDevicesetfocus(qint32 devicesetfocus)
qint64 getCenterFrequency()
void getConsoleMinMessageLevelStr(QString &levelStr)
StreamType streamType
This is the type of stream supported.
virtual int instanceDevices(int direction, SWGSDRangel::SWGInstanceDevicesResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int getSampleRate() const =0
Sample rate exposed by the sink.
void setCenterFrequency(qint64 center_frequency)
virtual int webapiRunGet(SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
QString * getArchitecture()
virtual int webapiRun(bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
void setSequence(qint32 sequence)
static MsgSavePreset * create(Preset *preset, int deviceSetIndex, bool newPreset)
virtual int instanceAudioInputDelete(SWGSDRangel::SWGAudioInputDevice &response, SWGSDRangel::SWGErrorResponse &error)
QtMsgType getConsoleMinLogLevel() const
static void webapiFormatPreset(SWGSDRangel::SWGPreset *apiPreset, const Preset &preset)
void setUdpUsesRtp(qint32 udp_uses_rtp)
const QString & getDescription() const
int getIndexInDeviceSet() const
virtual int instanceSummary(SWGSDRangel::SWGInstanceSummaryResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual ~WebAPIAdapterGUI()
PluginManager * m_pluginManager
virtual quint64 getCenterFrequency() const =0
Center frequency exposed by the source.
void setBandwidth(qint32 bandwidth)
static DeviceEnumerator * instance()
virtual int instancePresetDelete(SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
uint32_t getSamplingDeviceSequence() const
int deviceItemIndex
For composite devices this is the Rx or Tx stream index. -1 if not initialized.
void setDirection(qint32 direction)
void setDirection(qint32 direction)
void getLogFileName(QString &fileName)
virtual int instanceAMBEDevicesDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSet &response, SWGSDRangel::SWGErrorResponse &error)
const Preset & getWorkingPresetConst() const
virtual int devicesetChannelsReportGet(int deviceSetIndex, SWGSDRangel::SWGChannelsDetail &response, SWGSDRangel::SWGErrorResponse &error)
virtual int webapiSettingsGet(SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
const QString & getGroup() const
void setDeviceHwType(QString *device_hw_type)
void releaseController(const std::string &deviceRef)
release controller resources for the device in reference
void setLogFileName(const QString &value)
virtual int webapiReportGet(SWGSDRangel::SWGDeviceReport &response, QString &errorMessage)
void setCopyToUdp(qint32 copy_to_udp)
int getNbTxSamplingDevices() const
void setDumpToFile(qint32 dump_to_file)
static MsgDeleteChannel * create(int deviceSetIndex, int channelIndex, bool tx)
QList< SWGChannelListItem * > * getChannels()
virtual int instanceLoggingGet(SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
void setUdpChannelMode(qint32 udp_channel_mode)
qint32 getDeviceSetIndex()
virtual int instanceDeviceSetsGet(SWGSDRangel::SWGDeviceSetList &response, SWGSDRangel::SWGErrorResponse &error)
int getNbSinkChannels() const