SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
fcdtraits.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2018 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef FCDLIB_FCDTRAITS_H_
19 #define FCDLIB_FCDTRAITS_H_
20 
21 #include <inttypes.h>
22 
23 typedef enum
24 {
25  Pro,
27 } fcd_type;
28 
29 template <fcd_type FCDType>
30 struct fcd_traits
31 {
32  static const uint16_t vendorId = 0x0;
33  static const uint16_t productId = 0x0;
34  static const int sampleRate = 48000;
35  static const int convBufSize = (1<<11);
36  static const char *alsaDeviceName;
37  static const char *qtDeviceName;
38  static const char *hardwareID;
39  static const char *interfaceIID;
40  static const char *displayedName;
41  static const char *pluginDisplayedName;
42  static const char *pluginVersion;
43  static const int64_t loLowLimitFreq;
44  static const int64_t loHighLimitFreq;
45 };
46 
47 template<>
48 struct fcd_traits<Pro>
49 {
50  static const uint16_t vendorId = 0x04D8;
51  static const uint16_t productId = 0xFB56;
52  static const int sampleRate = 96000;
53  static const int convBufSize = (1<<11);
54  static const char *alsaDeviceName;
55  static const char *qtDeviceName;
56  static const char *hardwareID;
57  static const char *interfaceIID;
58  static const char *displayedName;
59  static const char *pluginDisplayedName;
60  static const char *pluginVersion;
61  static const int64_t loLowLimitFreq;
62  static const int64_t loHighLimitFreq;
63 };
64 
65 template<>
67 {
68  static const uint16_t vendorId = 0x04D8;
69  static const uint16_t productId = 0xFB31;
70  static const int sampleRate = 192000;
71  static const int convBufSize = (1<<10);
72  static const char *alsaDeviceName;
73  static const char *qtDeviceName;
74  static const char *hardwareID;
75  static const char *interfaceIID;
76  static const char *displayedName;
77  static const char *pluginDisplayedName;
78  static const char *pluginVersion;
79  static const int64_t loLowLimitFreq;
80  static const int64_t loHighLimitFreq;
81 };
82 
83 template <fcd_type FCDType> const char *fcd_traits<FCDType>::alsaDeviceName = "";
84 template <fcd_type FCDType> const char *fcd_traits<FCDType>::hardwareID = "";
85 template <fcd_type FCDType> const char *fcd_traits<FCDType>::interfaceIID = "";
86 template <fcd_type FCDType> const char *fcd_traits<FCDType>::displayedName = "";
87 template <fcd_type FCDType> const char *fcd_traits<FCDType>::pluginDisplayedName = "";
88 template <fcd_type FCDType> const char *fcd_traits<FCDType>::pluginVersion = "---";
89 
90 #endif /* FCDLIB_FCDTRAITS_H_ */
static const char * qtDeviceName
Definition: fcdtraits.h:37
static const int64_t loHighLimitFreq
Definition: fcdtraits.h:62
static const char * qtDeviceName
Definition: fcdtraits.h:55
static const char * pluginDisplayedName
Definition: fcdtraits.h:59
static const char * pluginVersion
Definition: fcdtraits.h:60
static const char * displayedName
Definition: fcdtraits.h:40
static const char * alsaDeviceName
Definition: fcdtraits.h:72
static const int64_t loLowLimitFreq
Definition: fcdtraits.h:61
static const char * pluginDisplayedName
Definition: fcdtraits.h:41
static const int convBufSize
Definition: fcdtraits.h:35
static const int64_t loHighLimitFreq
Definition: fcdtraits.h:80
static const char * hardwareID
Definition: fcdtraits.h:56
static const char * displayedName
Definition: fcdtraits.h:58
__int64 int64_t
Definition: rtptypes_win.h:47
static const char * pluginVersion
Definition: fcdtraits.h:42
unsigned short uint16_t
Definition: rtptypes_win.h:44
static const char * alsaDeviceName
Definition: fcdtraits.h:54
static const char * hardwareID
Definition: fcdtraits.h:74
static const uint16_t productId
Definition: fcdtraits.h:33
static const uint16_t vendorId
Definition: fcdtraits.h:32
static const int64_t loLowLimitFreq
Definition: fcdtraits.h:43
static const char * interfaceIID
Definition: fcdtraits.h:75
static const char * interfaceIID
Definition: fcdtraits.h:57
static const char * displayedName
Definition: fcdtraits.h:76
fcd_type
Definition: fcdtraits.h:23
Definition: fcdtraits.h:25
static const char * pluginDisplayedName
Definition: fcdtraits.h:77
static const int64_t loHighLimitFreq
Definition: fcdtraits.h:44
static const int sampleRate
Definition: fcdtraits.h:34
static const char * interfaceIID
Definition: fcdtraits.h:39
static const char * qtDeviceName
Definition: fcdtraits.h:73
static const char * hardwareID
Definition: fcdtraits.h:38
static const char * alsaDeviceName
Definition: fcdtraits.h:36
static const char * pluginVersion
Definition: fcdtraits.h:78
static const int64_t loLowLimitFreq
Definition: fcdtraits.h:79