| 
									
										
										
										
											2023-11-19 06:43:20 +01:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | // Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany     //
 | 
					
						
							|  |  |  | // written by Christian Daniel                                                       //
 | 
					
						
							|  |  |  | // Copyright (C) 2015-2021 Edouard Griffiths, F4EXB <f4exb06@gmail.com>              //
 | 
					
						
							|  |  |  | // Copyright (C) 2020, 2022 Jon Beniston, M7RCE <jon@beniston.com>                   //
 | 
					
						
							|  |  |  | //                                                                                   //
 | 
					
						
							|  |  |  | // This program is free software; you can redistribute it and/or modify              //
 | 
					
						
							|  |  |  | // it under the terms of the GNU General Public License as published by              //
 | 
					
						
							|  |  |  | // the Free Software Foundation as version 3 of the License, or                      //
 | 
					
						
							|  |  |  | // (at your option) any later version.                                               //
 | 
					
						
							|  |  |  | //                                                                                   //
 | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful,                   //
 | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of                    //
 | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                      //
 | 
					
						
							|  |  |  | // GNU General Public License V3 for more details.                                   //
 | 
					
						
							|  |  |  | //                                                                                   //
 | 
					
						
							|  |  |  | // You should have received a copy of the GNU General Public License                 //
 | 
					
						
							|  |  |  | // along with this program. If not, see <http://www.gnu.org/licenses/>.              //
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | #ifndef INCLUDE_PLUGININTERFACE_H
 | 
					
						
							|  |  |  | #define INCLUDE_PLUGININTERFACE_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QtPlugin>
 | 
					
						
							|  |  |  | #include <QString>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-20 13:49:21 +01:00
										 |  |  | #include "export.h"
 | 
					
						
							| 
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct SDRBASE_API PluginDescriptor { | 
					
						
							| 
									
										
										
										
											2019-12-16 01:03:47 +01:00
										 |  |  |     const QString hardwareId; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	// general plugin description
 | 
					
						
							|  |  |  | 	const QString displayedName; | 
					
						
							|  |  |  | 	const QString version; | 
					
						
							|  |  |  | 	const QString copyright; | 
					
						
							|  |  |  | 	const QString website; | 
					
						
							|  |  |  | 	bool licenseIsGPL; | 
					
						
							|  |  |  | 	const QString sourceCodeURL; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class PluginAPI; | 
					
						
							| 
									
										
										
										
											2019-05-08 22:11:53 +02:00
										 |  |  | class DeviceAPI; | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  | class DeviceSet; | 
					
						
							| 
									
										
										
										
											2017-10-30 00:02:28 +01:00
										 |  |  | class DeviceUISet; | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | class FeatureUISet; | 
					
						
							|  |  |  | class WebAPIAdapterInterface; | 
					
						
							| 
									
										
										
										
											2020-10-05 19:23:13 +02:00
										 |  |  | class DeviceGUI; | 
					
						
							| 
									
										
										
										
											2016-05-17 03:41:01 +02:00
										 |  |  | class QWidget; | 
					
						
							| 
									
										
										
										
											2017-09-14 08:49:31 +02:00
										 |  |  | class DeviceSampleSource; | 
					
						
							|  |  |  | class DeviceSampleSink; | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  | class DeviceSampleMIMO; | 
					
						
							| 
									
										
										
										
											2017-11-08 08:31:00 +01:00
										 |  |  | class BasebandSampleSink; | 
					
						
							|  |  |  | class BasebandSampleSource; | 
					
						
							| 
									
										
										
										
											2019-09-03 07:59:14 +02:00
										 |  |  | class MIMOChannel; | 
					
						
							| 
									
										
										
										
											2019-05-09 17:27:12 +02:00
										 |  |  | class ChannelAPI; | 
					
						
							| 
									
										
										
										
											2020-10-04 06:16:15 +02:00
										 |  |  | class ChannelGUI; | 
					
						
							| 
									
										
										
										
											2019-08-05 00:10:56 +02:00
										 |  |  | class ChannelWebAPIAdapter; | 
					
						
							| 
									
										
										
										
											2019-08-03 11:21:46 +02:00
										 |  |  | class DeviceWebAPIAdapter; | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | class FeatureWebAPIAdapter; | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | class Feature; | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  | class FeatureGUI; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 |  |  | class SDRBASE_API PluginInterface { | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2016-10-13 22:23:43 +02:00
										 |  |  | 	struct SamplingDevice | 
					
						
							| 
									
										
										
										
											2015-09-30 06:57:40 +02:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  |         enum SamplingDeviceType | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             PhysicalDevice, | 
					
						
							|  |  |  |             BuiltInDevice | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-07 18:58:20 +02:00
										 |  |  |         enum StreamType | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             StreamSingleRx, //!< Exposes a single input stream that can be one of the streams of a physical device
 | 
					
						
							|  |  |  |             StreamSingleTx, //!< Exposes a single output stream that can be one of the streams of a physical device
 | 
					
						
							| 
									
										
										
										
											2019-05-20 16:31:15 +02:00
										 |  |  |             StreamMIMO      //!< May expose any number of input and/or output streams
 | 
					
						
							| 
									
										
										
										
											2019-05-07 18:58:20 +02:00
										 |  |  |         }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  | 		QString displayedName;    //!< The human readable name
 | 
					
						
							|  |  |  | 		QString hardwareId;       //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
 | 
					
						
							|  |  |  | 		QString id;               //!< The internal plugin ID corresponding to the device (i.e. for HackRF input, for HackRF output ...)
 | 
					
						
							| 
									
										
										
										
											2017-11-02 09:17:38 +01:00
										 |  |  | 		QString serial;           //!< The device serial number defined by the vendor or a fake one (SDRplay)
 | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  | 		int sequence;             //!< The device sequence. >0 when more than one device of the same type is connected
 | 
					
						
							|  |  |  | 		SamplingDeviceType type;  //!< The sampling device type for behavior information
 | 
					
						
							| 
									
										
										
										
											2019-05-07 18:58:20 +02:00
										 |  |  | 		StreamType streamType;    //!< This is the type of stream supported
 | 
					
						
							| 
									
										
										
										
											2017-11-19 01:05:16 +01:00
										 |  |  | 		int deviceNbItems;        //!< Number of items (or streams) in the device. >1 for composite devices.
 | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  | 		int deviceItemIndex;      //!< For composite devices this is the Rx or Tx stream index. -1 if not initialized
 | 
					
						
							| 
									
										
										
										
											2024-08-24 13:17:02 +02:00
										 |  |  | 		int claimed = -1;         //!< This is the device set index if claimed else -1
 | 
					
						
							|  |  |  |         bool removed = false;     //!< Set if device has been removed
 | 
					
						
							| 
									
										
										
										
											2015-09-30 06:57:40 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-13 22:23:43 +02:00
										 |  |  | 		SamplingDevice(const QString& _displayedName, | 
					
						
							| 
									
										
										
										
											2016-12-29 12:41:10 +01:00
										 |  |  |                 const QString& _hardwareId, | 
					
						
							| 
									
										
										
										
											2015-09-30 06:57:40 +02:00
										 |  |  | 				const QString& _id, | 
					
						
							|  |  |  | 				const QString& _serial, | 
					
						
							| 
									
										
										
										
											2017-11-01 10:37:00 +01:00
										 |  |  | 				int _sequence, | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  | 				SamplingDeviceType _type, | 
					
						
							| 
									
										
										
										
											2019-05-07 18:58:20 +02:00
										 |  |  | 				StreamType _streamType, | 
					
						
							| 
									
										
										
										
											2017-11-19 01:05:16 +01:00
										 |  |  | 				int _deviceNbItems, | 
					
						
							| 
									
										
										
										
											2017-11-01 10:37:00 +01:00
										 |  |  | 				int _deviceItemIndex) : | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 			displayedName(_displayedName), | 
					
						
							| 
									
										
										
										
											2016-12-29 12:41:10 +01:00
										 |  |  | 			hardwareId(_hardwareId), | 
					
						
							| 
									
										
										
										
											2015-09-30 06:57:40 +02:00
										 |  |  | 			id(_id), | 
					
						
							|  |  |  | 			serial(_serial), | 
					
						
							| 
									
										
										
										
											2017-11-01 10:37:00 +01:00
										 |  |  | 			sequence(_sequence), | 
					
						
							| 
									
										
										
										
											2017-11-01 20:06:33 +01:00
										 |  |  | 			type(_type), | 
					
						
							| 
									
										
										
										
											2019-05-07 18:58:20 +02:00
										 |  |  | 			streamType(_streamType), | 
					
						
							| 
									
										
										
										
											2017-11-19 01:05:16 +01:00
										 |  |  | 			deviceNbItems(_deviceNbItems), | 
					
						
							| 
									
										
										
										
											2024-08-24 13:17:02 +02:00
										 |  |  | 			deviceItemIndex(_deviceItemIndex) | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 		{ } | 
					
						
							| 
									
										
										
										
											2022-12-20 21:06:39 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         bool operator==(const SamplingDevice& rhs) const | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return displayedName == rhs.displayedName | 
					
						
							|  |  |  |                 && hardwareId == rhs.hardwareId | 
					
						
							|  |  |  |                 && id == rhs.id | 
					
						
							|  |  |  |                 && serial == rhs.serial; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	}; | 
					
						
							| 
									
										
										
										
											2024-08-24 13:17:02 +02:00
										 |  |  | 	using SamplingDevices = QList<SamplingDevice>; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  |     /** This is the device from which the sampling devices are derived. For physical devices this represents
 | 
					
						
							|  |  |  |      * a single physical unit (a LimeSDR, HackRF, BladeRF, RTL-SDR dongle, ...) that is enumerated once and | 
					
						
							|  |  |  |      * reported in the system so that the "sampling devices" used in the system can be registered | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  |     struct OriginDevice | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         QString displayableName; //!< A human readable name
 | 
					
						
							|  |  |  |         QString hardwareId;      //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...)
 | 
					
						
							|  |  |  |         QString serial;          //!< The device serial number defined by the vendor or a fake one (SDRplay)
 | 
					
						
							|  |  |  |         int sequence;            //!< The device sequence in order of enumeration
 | 
					
						
							|  |  |  |         int nbRxStreams;         //!< Number of receiver streams
 | 
					
						
							|  |  |  |         int nbTxStreams;         //!< Number of transmitter streams
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         OriginDevice( | 
					
						
							|  |  |  |                 const QString& _displayableName, | 
					
						
							|  |  |  |                 const QString& _hardwareId, | 
					
						
							|  |  |  | 				const QString& _serial, | 
					
						
							|  |  |  | 				int _sequence, | 
					
						
							|  |  |  |                 int _nbRxStreams, | 
					
						
							|  |  |  |                 int _nbTxStreams | 
					
						
							|  |  |  |         ) : | 
					
						
							|  |  |  |             displayableName(_displayableName), | 
					
						
							|  |  |  |             hardwareId(_hardwareId), | 
					
						
							|  |  |  |             serial(_serial), | 
					
						
							|  |  |  |             sequence(_sequence), | 
					
						
							|  |  |  |             nbRxStreams(_nbRxStreams), | 
					
						
							|  |  |  |             nbTxStreams(_nbTxStreams) | 
					
						
							|  |  |  |         {} | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2024-08-24 13:17:02 +02:00
										 |  |  |     using OriginDevices = QList<OriginDevice>; | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-24 13:17:02 +02:00
										 |  |  |     virtual ~PluginInterface() = default; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	virtual const PluginDescriptor& getPluginDescriptor() const = 0; | 
					
						
							|  |  |  | 	virtual void initPlugin(PluginAPI* pluginAPI) = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-13 23:42:08 +02:00
										 |  |  | 	// channel Rx plugins
 | 
					
						
							| 
									
										
										
										
											2017-10-30 01:11:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |     virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							|  |  |  |         (void) bs; | 
					
						
							|  |  |  |         (void) cs; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-04 06:16:15 +02:00
										 |  |  |     virtual ChannelGUI* createRxChannelGUI( | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             DeviceUISet *deviceUISet, | 
					
						
							| 
									
										
										
										
											2019-08-01 21:27:31 +02:00
										 |  |  |             BasebandSampleSink *rxChannel) const | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         (void) rxChannel; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |     // channel Tx plugins
 | 
					
						
							| 
									
										
										
										
											2017-11-08 08:31:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |     virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |         (void) bs; | 
					
						
							|  |  |  |         (void) cs; | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-12-17 23:15:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-04 06:16:15 +02:00
										 |  |  | 	virtual ChannelGUI* createTxChannelGUI( | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             DeviceUISet *deviceUISet, | 
					
						
							| 
									
										
										
										
											2019-08-01 21:27:31 +02:00
										 |  |  |             BasebandSampleSource *txChannel) const | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         (void) txChannel; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-10-14 18:47:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |     // channel MIMO plugins
 | 
					
						
							| 
									
										
										
										
											2017-11-08 08:31:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |     virtual void createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							| 
									
										
										
										
											2020-10-01 22:47:30 +02:00
										 |  |  |         (void) bs; | 
					
						
							|  |  |  |         (void) cs; | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-12-17 23:15:42 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-04 06:16:15 +02:00
										 |  |  | 	virtual ChannelGUI* createMIMOChannelGUI( | 
					
						
							| 
									
										
										
										
											2019-09-02 18:36:56 +02:00
										 |  |  |             DeviceUISet *deviceUISet, | 
					
						
							| 
									
										
										
										
											2019-09-03 07:59:14 +02:00
										 |  |  |             MIMOChannel *mimoChannel) const | 
					
						
							| 
									
										
										
										
											2019-09-02 18:36:56 +02:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         (void) mimoChannel; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-01 18:50:21 +02:00
										 |  |  |     // any channel
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-05 00:10:56 +02:00
										 |  |  |     virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const | 
					
						
							| 
									
										
										
										
											2019-08-01 18:50:21 +02:00
										 |  |  |     { | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  |     // any feature
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual FeatureWebAPIAdapter* createFeatureWebAPIAdapter() const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  |     // any device
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual void enumOriginDevices(QStringList& listedHwIds, OriginDevices& originDevices) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) listedHwIds; | 
					
						
							|  |  |  |         (void) originDevices; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-16 01:03:47 +01:00
										 |  |  |     virtual SamplingDevice::SamplingDeviceType getSamplingDeviceType() const { | 
					
						
							|  |  |  |         return SamplingDevice::SamplingDeviceType::PhysicalDevice; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual QString getDeviceTypeId() const { | 
					
						
							|  |  |  |         return QString(""); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-17 23:15:42 +01:00
										 |  |  |     // device source plugins only
 | 
					
						
							| 
									
										
										
										
											2017-10-30 01:11:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  | 	virtual SamplingDevices enumSampleSources(const OriginDevices& originDevices) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) originDevices; | 
					
						
							|  |  |  |         return SamplingDevices(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-10-30 00:02:28 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-05 19:23:13 +02:00
										 |  |  | 	virtual DeviceGUI* createSampleSourcePluginInstanceGUI( | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             const QString& sourceId, | 
					
						
							|  |  |  |             QWidget **widget, | 
					
						
							|  |  |  |             DeviceUISet *deviceUISet) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) sourceId; | 
					
						
							|  |  |  |         (void) widget; | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-19 10:28:50 +02:00
										 |  |  |     virtual DeviceSampleSource* createSampleSourcePluginInstance( // creates the input "core"
 | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             const QString& sourceId, | 
					
						
							| 
									
										
										
										
											2019-05-08 22:11:53 +02:00
										 |  |  |             DeviceAPI *deviceAPI) | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) sourceId; | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-09-16 10:45:08 +02:00
										 |  |  | 	virtual void deleteSampleSourcePluginInstanceInput(DeviceSampleSource *source); | 
					
						
							| 
									
										
										
										
											2016-10-14 18:47:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-16 01:03:47 +01:00
										 |  |  |     virtual int getDefaultRxNbItems() const { | 
					
						
							|  |  |  |         return 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-14 18:47:19 +02:00
										 |  |  | 	// device sink plugins only
 | 
					
						
							| 
									
										
										
										
											2017-10-30 01:11:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  | 	virtual SamplingDevices enumSampleSinks(const OriginDevices& originDevices) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) originDevices; | 
					
						
							|  |  |  |         return SamplingDevices(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-10-30 01:11:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-05 19:23:13 +02:00
										 |  |  | 	virtual DeviceGUI* createSampleSinkPluginInstanceGUI( | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             const QString& sinkId, | 
					
						
							|  |  |  |             QWidget **widget, | 
					
						
							|  |  |  |             DeviceUISet *deviceUISet) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) sinkId; | 
					
						
							|  |  |  |         (void) widget; | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-19 10:28:50 +02:00
										 |  |  |     virtual DeviceSampleSink* createSampleSinkPluginInstance( // creates the output "core"
 | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |             const QString& sinkId, | 
					
						
							| 
									
										
										
										
											2019-05-08 22:11:53 +02:00
										 |  |  |             DeviceAPI *deviceAPI) | 
					
						
							| 
									
										
										
										
											2018-11-12 14:04:16 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         (void) sinkId; | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-10-30 01:11:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-16 11:34:25 +02:00
										 |  |  |     virtual void deleteSampleSinkPluginInstanceOutput(DeviceSampleSink *sink); | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-16 01:03:47 +01:00
										 |  |  |     virtual int getDefaultTxNbItems() const { | 
					
						
							|  |  |  |         return 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  |     // device MIMO plugins only
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 00:34:11 +02:00
										 |  |  | 	virtual SamplingDevices enumSampleMIMO(const OriginDevices& originDevices) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) originDevices; | 
					
						
							|  |  |  |         return SamplingDevices(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-05 19:23:13 +02:00
										 |  |  | 	virtual DeviceGUI* createSampleMIMOPluginInstanceGUI( | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  |             const QString& mimoId, | 
					
						
							|  |  |  |             QWidget **widget, | 
					
						
							|  |  |  |             DeviceUISet *deviceUISet) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) mimoId; | 
					
						
							|  |  |  |         (void) widget; | 
					
						
							|  |  |  |         (void) deviceUISet; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-19 10:28:50 +02:00
										 |  |  |     virtual DeviceSampleMIMO* createSampleMIMOPluginInstance( // creates the MIMO "core"
 | 
					
						
							| 
									
										
										
										
											2019-05-18 06:30:37 +02:00
										 |  |  |             const QString& mimoId, | 
					
						
							|  |  |  |             DeviceAPI *deviceAPI) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (void) mimoId; | 
					
						
							|  |  |  |         (void) deviceAPI; | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual void deleteSampleMIMOPluginInstanceMIMO(DeviceSampleMIMO *mimo); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-02 13:06:10 +02:00
										 |  |  |     virtual int getDefaultMIMONbItems() const { | 
					
						
							|  |  |  |         return 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-08 15:47:20 +01:00
										 |  |  |     // Callback to allow plugin to add elements to top-level GUI (such as menu items)
 | 
					
						
							| 
									
										
										
										
											2020-09-10 02:43:28 +02:00
										 |  |  |     virtual bool createTopLevelGUI() | 
					
						
							| 
									
										
										
										
											2020-09-08 15:47:20 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         return true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Serialise global plugin settings (i.e. settings that are not per-instance)
 | 
					
						
							|  |  |  |     virtual QByteArray serializeGlobalSettings() const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         QByteArray empty; | 
					
						
							|  |  |  |         return empty; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual bool deserializeGlobalSettings(const QByteArray& data) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2020-11-14 11:13:32 +01:00
										 |  |  |         (void) data; | 
					
						
							| 
									
										
										
										
											2020-09-08 15:47:20 +01:00
										 |  |  |         return true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-03 11:21:46 +02:00
										 |  |  |     // all devices
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual DeviceWebAPIAdapter* createDeviceWebAPIAdapter() const { | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Features
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  |     virtual FeatureGUI* createFeatureGUI(FeatureUISet *featureUISet, Feature *feature) const | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2020-11-14 11:13:32 +01:00
										 |  |  |         (void) featureUISet; | 
					
						
							|  |  |  |         (void) feature; | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual Feature* createFeature(WebAPIAdapterInterface *webAPIAdapterInterface) const | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2020-11-14 11:13:32 +01:00
										 |  |  |         (void) webAPIAdapterInterface; | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-01 22:22:18 +01:00
										 |  |  | Q_DECLARE_INTERFACE(PluginInterface, "SDRangel.PluginInterface/0.1") | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #endif // INCLUDE_PLUGININTERFACE_H
 |