-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathIRigCapsNative.cs
More file actions
316 lines (179 loc) · 5.73 KB
/
IRigCapsNative.cs
File metadata and controls
316 lines (179 loc) · 5.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
//
// RigCapsNative.cs
//
// Author:
// Jae Stutzman <jaebird@gmail.com>
//
// Copyright (c) 2016 Jae Stutzman
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections.Generic;
namespace HamLibSharp
{
/// <summary>
/// Rig caps native interface.
/// There is an ABI issue with HamLib where shortfreq_t and pbwidth_t are defined as "long"
/// and setting_t is defined as "unsigned long".
/// On Linux and Posix:
/// long is defined as 32-bits on 32-bit systems
/// long is defined as 64-bits on 64-bit systems
/// On Windows:
/// long is always defined as 32-bits for both 32 and 64-bit systems.
///
/// This interface is used to abstract the native struct from the implementation so
/// each architecture specific struct can be used to Marshal the data using PtrToStructure
/// and all variables line up with native memory.
/// </summary>
internal interface IRigCapsNative
{
int Rig_model { get; }
string Model_name { get; }
string Mfg_name { get; }
string Version { get; }
string Copyright { get; }
RigBackendStatus Status { get; }
RigType Rig_type { get; }
PttType Ptt_type { get; }
RigDcd Dcd_type { get; }
RigPort Port_type { get; }
int Serial_rate_min { get; }
int Serial_rate_max { get; }
int Serial_data_bits { get; }
int Serial_stop_bits { get; }
RigSerialParity Serial_parity { get; }
RigSerialHandshake Serial_handshake { get; }
int Write_delay { get; }
int Post_write_delay { get; }
int Timeout { get; }
int Retry { get; }
uint Has_get_func { get; }
uint Has_set_func { get; }
uint Has_get_level { get; }
uint Has_set_level { get; }
uint Has_get_parm { get; }
uint Has_set_parm { get; }
Granularity[] Level_gran { get; }
Granularity[] Parm_gran { get; }
IntPtr Extparms { get; }
IntPtr Extlevels { get; }
IntPtr Ctcss_list { get; }
IntPtr Dcs_list { get; }
int[] Preamp { get; }
int[] Attenuator { get; }
int Max_rit { get; }
int Max_xit { get; }
int Max_ifshift { get; }
RigAnnounce Announces { get; }
RigVfoOperation Vfo_ops { get; }
RigScanOperation Scan_ops { get; }
int Targetable_vfo { get; }
RigTransceive Transceive { get; }
int Bank_qty { get; }
int Chan_desc_sz { get; }
IList<IChannelList> Chan_list { get; }
FrequencyRange[] Rx_range_list1 { get; }
FrequencyRange[] Tx_range_list1 { get; }
FrequencyRange[] Rx_range_list2 { get; }
FrequencyRange[] Tx_range_list2 { get; }
IList<IModeValue> Tuning_steps { get; }
IList<IModeValue> Filters_list { get; }
CalibrationTable Str_cal { get; }
IntPtr Cfgparams { get; }
IntPtr Priv { get; }
IntPtr Rig_init { get; }
IntPtr Rig_cleanup { get; }
IntPtr Rig_open { get; }
IntPtr Rig_close { get; }
IntPtr Set_freq { get; }
IntPtr Get_freq { get; }
IntPtr Set_mode { get; }
IntPtr Get_mode { get; }
IntPtr Set_vfo { get; }
IntPtr Get_vfo { get; }
IntPtr Set_ptt { get; }
IntPtr Get_ptt { get; }
IntPtr Get_dcd { get; }
IntPtr Set_rptr_shift { get; }
IntPtr Get_rptr_shift { get; }
IntPtr Set_rptr_offs { get; }
IntPtr Get_rptr_offs { get; }
IntPtr Set_split_freq { get; }
IntPtr Get_split_freq { get; }
IntPtr Set_split_mode { get; }
IntPtr Get_split_mode { get; }
IntPtr Set_split_freq_mode { get; }
IntPtr Get_split_freq_mode { get; }
IntPtr Set_split_vfo { get; }
IntPtr Get_split_vfo { get; }
IntPtr Set_rit { get; }
IntPtr Get_rit { get; }
IntPtr Set_xit { get; }
IntPtr Get_xit { get; }
IntPtr Set_ts { get; }
IntPtr Get_ts { get; }
IntPtr Set_dcs_code { get; }
IntPtr Get_dcs_code { get; }
IntPtr Set_tone { get; }
IntPtr Get_tone { get; }
IntPtr Set_ctcss_tone { get; }
IntPtr Get_ctcss_tone { get; }
IntPtr Set_dcs_sql { get; }
IntPtr Get_dcs_sql { get; }
IntPtr Set_tone_sql { get; }
IntPtr Get_tone_sql { get; }
IntPtr Set_ctcss_sql { get; }
IntPtr Get_ctcss_sql { get; }
IntPtr Power2mW { get; }
IntPtr MW2power { get; }
IntPtr Set_powerstat { get; }
IntPtr Get_powerstat { get; }
IntPtr Reset { get; }
IntPtr Set_ant { get; }
IntPtr Get_ant { get; }
IntPtr Set_level { get; }
IntPtr Get_level { get; }
IntPtr Set_func { get; }
IntPtr Get_func { get; }
IntPtr Set_parm { get; }
IntPtr Get_parm { get; }
IntPtr Set_ext_level { get; }
IntPtr Get_ext_level { get; }
IntPtr Set_ext_parm { get; }
IntPtr Get_ext_parm { get; }
IntPtr Set_conf { get; }
IntPtr Get_conf { get; }
IntPtr Send_dtmf { get; }
IntPtr Recv_dtmf { get; }
IntPtr Send_morse { get; }
IntPtr Set_bank { get; }
IntPtr Set_mem { get; }
IntPtr Get_mem { get; }
IntPtr Vfo_op { get; }
IntPtr Scan { get; }
IntPtr Set_trn { get; }
IntPtr Get_trn { get; }
IntPtr Decode_event { get; }
IntPtr Set_channel { get; }
IntPtr Get_channel { get; }
IntPtr Get_info { get; }
IntPtr Set_chan_all_cb { get; }
IntPtr Get_chan_all_cb { get; }
IntPtr Set_mem_all_cb { get; }
IntPtr Get_mem_all_cb { get; }
IntPtr Clone_combo_set { get; }
IntPtr Clone_combo_get { get; }
}
}