| 
									
										
										
										
											2017-01-07 11:24:09 +01:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							| 
									
										
										
										
											2023-11-19 05:24:06 +01:00
										 |  |  | // Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
 | 
					
						
							|  |  |  | // written by Christian Daniel                                                   //
 | 
					
						
							|  |  |  | // Copyright (C) 2015-2019, 2021 Edouard Griffiths, F4EXB <f4exb06@gmail.com>    //
 | 
					
						
							| 
									
										
										
										
											2017-01-07 11:24:09 +01:00
										 |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // 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                  //
 | 
					
						
							| 
									
										
										
										
											2019-04-11 06:39:30 +02:00
										 |  |  | // (at your option) any later version.                                           //
 | 
					
						
							| 
									
										
										
										
											2017-01-07 11:24:09 +01:00
										 |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // 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/>.          //
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef DEVICES_HACKRF_DEVICEHACKRF_H_
 | 
					
						
							|  |  |  | #define DEVICES_HACKRF_DEVICEHACKRF_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "libhackrf/hackrf.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-17 19:54:13 +02:00
										 |  |  | #include "plugin/plugininterface.h"
 | 
					
						
							| 
									
										
										
										
											2018-03-20 13:49:21 +01:00
										 |  |  | #include "export.h"
 | 
					
						
							| 
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | class DEVICES_API DeviceHackRF | 
					
						
							| 
									
										
										
										
											2017-01-07 11:24:09 +01:00
										 |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2017-09-01 00:46:43 +02:00
										 |  |  |     static DeviceHackRF& instance(); | 
					
						
							| 
									
										
										
										
											2017-01-08 00:33:11 +01:00
										 |  |  |     static hackrf_device *open_hackrf(int sequence); | 
					
						
							| 
									
										
										
										
											2017-04-14 02:09:36 +02:00
										 |  |  |     static hackrf_device *open_hackrf(const char * const serial); | 
					
						
							| 
									
										
										
										
											2019-09-17 19:54:13 +02:00
										 |  |  |     static void enumOriginDevices(const QString& hardwareId, PluginInterface::OriginDevices& originDevices); | 
					
						
							| 
									
										
										
										
											2021-03-29 05:59:00 +02:00
										 |  |  |     static void setDevicePPMCorrection(hackrf_device *dev, qint32 loPPMTenths); | 
					
						
							| 
									
										
										
										
											2017-09-01 00:46:43 +02:00
										 |  |  | protected: | 
					
						
							|  |  |  |     DeviceHackRF(); | 
					
						
							|  |  |  |     DeviceHackRF(const DeviceHackRF&) {} | 
					
						
							| 
									
										
										
										
											2018-11-12 15:48:41 +01:00
										 |  |  |     DeviceHackRF& operator=(const DeviceHackRF& other) { (void) other; return *this; } | 
					
						
							| 
									
										
										
										
											2017-09-01 00:46:43 +02:00
										 |  |  |     ~DeviceHackRF(); | 
					
						
							| 
									
										
										
										
											2017-01-08 00:33:11 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2017-01-07 11:24:09 +01:00
										 |  |  |     static hackrf_device *open_hackrf_from_sequence(int sequence); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* DEVICES_HACKRF_DEVICEHACKRF_H_ */
 |