Hamlib  3.0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tones.h
1 /*
2  * Hamlib Interface - CTCSS and DCS tables header
3  * Copyright (c) 2000-2009 by Stephane Fillod and Frank Singleton
4  *
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
22 #ifndef _TONES_H
23 #define _TONES_H 1
24 
25 
26 #include "hamlib/rig.h" /* and implicitly rig_dll.h */
27 
28 
29 /*
30  * 52 CTCSS sub-audible tones
31  */
32 #define FULL_CTCSS_LIST \
33  600, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, \
34  948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1200, 1230, 1273, \
35  1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, \
36  1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, \
37  2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \
38  0,
39 
40 static const tone_t static_full_ctcss_list[] = {
41  FULL_CTCSS_LIST
42 };
43 
44 /*
45  * 50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz
46  *
47  * \note Don't even think about changing a bit of this array, several
48  * backends depend on it. If you need to, create a copy for your
49  * own caps. --SF
50  */
51 #define COMMON_CTCSS_LIST \
52  670, 693, 719, 744, 770, 797, 825, 854, 885, 915, \
53  948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, \
54  1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, \
55  1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, \
56  2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \
57  0,
58 
59 static const tone_t static_common_ctcss_list[] = {
60  COMMON_CTCSS_LIST
61 };
62 
63 /*
64  * 104 DCS codes
65  */
66 #define COMMON_DCS_LIST \
67  23, 25, 26, 31, 32, 36, 43, 47, 51, 53, \
68  54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, \
69  132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, \
70  212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, \
71  263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, \
72  346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, \
73  445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, \
74  523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, \
75  662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \
76  0,
77 
78 static const tone_t static_common_dcs_list[] = {
79  COMMON_DCS_LIST
80 };
81 
82 /*
83  * 106 DCS codes
84  */
85 #define FULL_DCS_LIST \
86  17, 23, 25, 26, 31, 32, 36, 43, 47, 50, 51, 53, \
87  54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, \
88  132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, \
89  212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, \
90  263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, \
91  346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, \
92  445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, \
93  523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, \
94  662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \
95  0,
96 
97 static const tone_t static_full_dcs_list[] = {
98  FULL_DCS_LIST
99 };
100 
101 /*
102  * These arrays cannot be shared on Win32 systems,
103  * because DLL's vars don't have constant address.
104  */
105 #if (defined(_WIN32) || defined(__CYGWIN__)) // && !defined(IN_HAMLIB)
106 #define common_ctcss_list static_common_ctcss_list
107 #define full_ctcss_list static_full_ctcss_list
108 #define full_dcs_list static_full_dcs_list
109 #define common_dcs_list static_common_dcs_list
110 
111 #else
112 
113 extern const HAMLIB_EXPORT_VAR(tone_t) full_ctcss_list[];
114 extern const HAMLIB_EXPORT_VAR(tone_t) common_ctcss_list[];
115 extern const HAMLIB_EXPORT_VAR(tone_t) full_dcs_list[];
116 extern const HAMLIB_EXPORT_VAR(tone_t) common_dcs_list[];
117 
118 #endif
119 
120 #endif /* _TONES_H */
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:158
const tone_t full_ctcss_list[]
Definition: tones.c:47
const tone_t common_dcs_list[]
Definition: tones.c:61
Hamlib rig data structures.
const tone_t full_dcs_list[]
Definition: tones.c:66
const tone_t common_ctcss_list[]
Definition: tones.c:56

Generated by doxygen 1.8.8

Hamlib documentation for version 3.0.1 -- Wed Jan 13 2016 15:05:23
Project page: http://www.hamlib.org