diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e78cf8..560d50a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,7 @@ IF (MSVC) SET(LIQUID_INCLUDES "${PROJECT_SOURCE_DIR}/external/liquid-dsp/include/" CACHE STRING "Liquid-DSP include directory") SET(LIQUID_LIBRARIES "${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM}/libliquid.lib" CACHE STRING "Liquid-DSP Library") SET(LIQUID_DLL "${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM}/libliquid.dll" CACHE STRING "Liquid-DSP DLL") - SET(HAMLIB_DLLS "${PROJECT_SOURCE_DIR}/external/hamlib/${EX_PLATFORM}/libhamlib-2.dll" CACHE STRING "HAMLIB DLLS") + SET(HAMLIB_DLLS "${PROJECT_SOURCE_DIR}/external/hamlib/${EX_PLATFORM}/libhamlib-4.dll" CACHE STRING "HAMLIB DLLS") ELSE (MSVC) ADD_DEFINITIONS( -std=c++0x diff --git a/external/hamlib/32/libhamlib-2.def b/external/hamlib/32/libhamlib-2.def deleted file mode 100644 index 377a4415..00000000 --- a/external/hamlib/32/libhamlib-2.def +++ /dev/null @@ -1,271 +0,0 @@ -EXPORTS - azimuth_long_path @1 - dec2dmmm @2 - dec2dms @3 - distance_long_path @4 - dmmm2dec @5 - dms2dec @6 - from_bcd @7 - from_bcd_be @8 - hamlib_copyright @9 DATA - hamlib_copyright2 @10 DATA - hamlib_version @11 DATA - hamlib_version2 @12 DATA - initrigs3_adat @13 - initrigs3_alinco @14 - initrigs3_aor @15 - initrigs3_barrett @16 - initrigs3_dorji @17 - initrigs3_drake @18 - initrigs3_dummy @19 - initrigs3_flexradio @20 - initrigs3_icm710 @21 - initrigs3_icmarine @22 - initrigs3_icom @23 - initrigs3_jrc @24 - initrigs3_kachina @25 - initrigs3_kenwood @26 - initrigs3_kit @27 - initrigs3_lowe @28 - initrigs3_pcr @29 - initrigs3_prm80 @30 - initrigs3_racal @31 - initrigs3_rft @32 - initrigs3_rs @33 - initrigs3_skanti @34 - initrigs3_tapr @35 - initrigs3_tentec @36 - initrigs3_tuner @37 - initrigs3_uniden @38 - initrigs3_winradio @39 - initrigs3_wj @40 - initrigs3_yaesu @41 - initrots3_amsat @42 - initrots3_ars @43 - initrots3_celestron @44 - initrots3_cnctrk @45 - initrots3_dummy @46 - initrots3_easycomm @47 - initrots3_ether6 @48 - initrots3_fodtrack @49 - initrots3_gs232a @50 - initrots3_heathkit @51 - initrots3_kit @52 - initrots3_m2 @53 - initrots3_meade @54 - initrots3_prosistel @55 - initrots3_rotorez @56 - initrots3_sartek @57 - initrots3_spid @58 - initrots3_ts7400 @59 - locator2longlat @60 - longlat2locator @61 - par_lock @62 - par_read_control @63 - par_read_data @64 - par_read_status @65 - par_unlock @66 - par_write_control @67 - par_write_data @68 - port_close @69 - port_open @70 - probeallrigs3_adat @71 - probeallrigs3_drake @72 - probeallrigs3_icom @73 - probeallrigs3_kenwood @74 - probeallrigs3_lowe @75 - probeallrigs3_uniden @76 - probeallrigs3_yaesu @77 - qrb @78 - read_block @79 - read_string @80 - rig_check_backend @81 - rig_check_cache_timeout @82 - rig_cleanup @83 - rig_close @84 - rig_confparam_lookup @85 - rig_copyright @86 - rig_debug @87 - rig_ext_level_foreach @88 - rig_ext_lookup @89 - rig_ext_lookup_tok @90 - rig_ext_parm_foreach @91 - rig_ext_token_lookup @92 - rig_force_cache_timeout @93 - rig_get_ant @94 - rig_get_caps @95 - rig_get_chan_all @96 - rig_get_chan_all_cb @97 - rig_get_channel @98 - rig_get_conf @99 - rig_get_ctcss_sql @100 - rig_get_ctcss_tone @101 - rig_get_dcd @102 - rig_get_dcs_code @103 - rig_get_dcs_sql @104 - rig_get_ext_level @105 - rig_get_ext_parm @106 - rig_get_freq @107 - rig_get_func @108 - rig_get_info @109 - rig_get_level @110 - rig_get_mem @111 - rig_get_mem_all @112 - rig_get_mem_all_cb @113 - rig_get_mode @114 - rig_get_parm @115 - rig_get_powerstat @116 - rig_get_ptt @117 - rig_get_range @118 - rig_get_resolution @119 - rig_get_rit @120 - rig_get_rptr_offs @121 - rig_get_rptr_shift @122 - rig_get_split_freq @123 - rig_get_split_freq_mode @124 - rig_get_split_mode @125 - rig_get_split_vfo @126 - rig_get_trn @127 - rig_get_ts @128 - rig_get_vfo @129 - rig_get_xit @130 - rig_has_get_func @131 - rig_has_get_level @132 - rig_has_get_parm @133 - rig_has_scan @134 - rig_has_set_func @135 - rig_has_set_level @136 - rig_has_set_parm @137 - rig_has_vfo_op @138 - rig_init @139 - rig_license @140 - rig_list_foreach @141 - rig_load_all_backends @142 - rig_load_backend @143 - rig_lookup_mem_caps @144 - rig_mW2power @145 - rig_mem_count @146 - rig_need_debug @147 - rig_no_restore_ai @148 - rig_open @149 - rig_parse_func @150 - rig_parse_level @151 - rig_parse_mode @152 - rig_parse_mtype @153 - rig_parse_parm @154 - rig_parse_rptr_shift @155 - rig_parse_scan @156 - rig_parse_vfo @157 - rig_parse_vfo_op @158 - rig_passband_narrow @159 - rig_passband_normal @160 - rig_passband_wide @161 - rig_power2mW @162 - rig_probe @163 - rig_probe_all @164 - rig_raw2val @165 - rig_recv_dtmf @166 - rig_register @167 - rig_reset @168 - rig_scan @169 - rig_send_dtmf @170 - rig_send_morse @171 - rig_set_ant @172 - rig_set_bank @173 - rig_set_chan_all @174 - rig_set_chan_all_cb @175 - rig_set_channel @176 - rig_set_conf @177 - rig_set_ctcss_sql @178 - rig_set_ctcss_tone @179 - rig_set_dcd_callback @180 - rig_set_dcs_code @181 - rig_set_dcs_sql @182 - rig_set_debug @183 - rig_set_debug_callback @184 - rig_set_debug_file @185 - rig_set_debug_time_stamp @186 - rig_set_ext_level @187 - rig_set_ext_parm @188 - rig_set_freq @189 - rig_set_freq_callback @190 - rig_set_func @191 - rig_set_level @192 - rig_set_mem @193 - rig_set_mem_all @194 - rig_set_mem_all_cb @195 - rig_set_mode @196 - rig_set_mode_callback @197 - rig_set_parm @198 - rig_set_pltune_callback @199 - rig_set_powerstat @200 - rig_set_ptt @201 - rig_set_ptt_callback @202 - rig_set_rit @203 - rig_set_rptr_offs @204 - rig_set_rptr_shift @205 - rig_set_split_freq @206 - rig_set_split_freq_mode @207 - rig_set_split_mode @208 - rig_set_split_vfo @209 - rig_set_trn @210 - rig_set_ts @211 - rig_set_vfo @212 - rig_set_vfo_callback @213 - rig_set_xit @214 - rig_setting2idx @215 - rig_strfunc @216 - rig_strlevel @217 - rig_strmtype @218 - rig_strparm @219 - rig_strptrshift @220 - rig_strrmode @221 - rig_strscan @222 - rig_strstatus @223 - rig_strvfo @224 - rig_strvfop @225 - rig_token_foreach @226 - rig_token_lookup @227 - rig_unregister @228 - rig_version @229 - rig_vfo_op @230 - rigerror @231 - rot_check_backend @232 - rot_cleanup @233 - rot_close @234 - rot_confparam_lookup @235 - rot_get_caps @236 - rot_get_conf @237 - rot_get_info @238 - rot_get_position @239 - rot_init @240 - rot_list_foreach @241 - rot_load_all_backends @242 - rot_load_backend @243 - rot_move @244 - rot_open @245 - rot_park @246 - rot_probe_all @247 - rot_register @248 - rot_reset @249 - rot_set_conf @250 - rot_set_position @251 - rot_stop @252 - rot_token_foreach @253 - rot_token_lookup @254 - rot_unregister @255 - ser_get_car @256 - ser_get_cts @257 - ser_get_dsr @258 - ser_get_dtr @259 - ser_get_rts @260 - ser_set_brk @261 - ser_set_dtr @262 - ser_set_rts @263 - serial_flush @264 - serial_open @265 - serial_setup @266 - sprintf_freq @267 - to_bcd @268 - to_bcd_be @269 - write_block @270 diff --git a/external/hamlib/32/libhamlib-2.dll b/external/hamlib/32/libhamlib-2.dll deleted file mode 100644 index efbe7454..00000000 Binary files a/external/hamlib/32/libhamlib-2.dll and /dev/null differ diff --git a/external/hamlib/32/libhamlib-2.exp b/external/hamlib/32/libhamlib-2.exp deleted file mode 100644 index f7cef63c..00000000 Binary files a/external/hamlib/32/libhamlib-2.exp and /dev/null differ diff --git a/external/hamlib/32/libhamlib-2.lib b/external/hamlib/32/libhamlib-2.lib deleted file mode 100644 index ee25fd01..00000000 Binary files a/external/hamlib/32/libhamlib-2.lib and /dev/null differ diff --git a/external/hamlib/32/libhamlib-4.def b/external/hamlib/32/libhamlib-4.def new file mode 100644 index 00000000..1dcb8537 --- /dev/null +++ b/external/hamlib/32/libhamlib-4.def @@ -0,0 +1,395 @@ +EXPORTS + CRC32_function @1 + amp_check_backend @2 + amp_cleanup @3 + amp_close @4 + amp_confparam_lookup @5 + amp_ext_lookup @6 + amp_get_caps @7 + amp_get_conf @8 + amp_get_ext_level @9 + amp_get_freq @10 + amp_get_info @11 + amp_get_level @12 + amp_get_powerstat @13 + amp_has_get_level @14 + amp_init @15 + amp_list_foreach @16 + amp_load_all_backends @17 + amp_load_backend @18 + amp_open @19 + amp_parse_level @20 + amp_probe_all @21 + amp_register @22 + amp_reset @23 + amp_set_conf @24 + amp_set_freq @25 + amp_set_powerstat @26 + amp_sprintf_level @27 + amp_strlevel @28 + amp_token_lookup @29 + amp_unregister @30 + azimuth_long_path @31 + debugmsgsave @32 DATA + debugmsgsave2 @33 DATA + debugmsgsave3 @34 DATA + dec2dmmm @35 + dec2dms @36 + distance_long_path @37 + dmmm2dec @38 + dms2dec @39 + dot10ths_to_millis @40 + dump_hex @41 + elapsed_ms @42 + from_bcd @43 + from_bcd_be @44 + get_rig_conf_type @45 + hamlib_copyright @46 DATA + hamlib_copyright2 @47 DATA + hamlib_version @48 DATA + hamlib_version2 @49 DATA + hl_usleep @50 + initamps4_dummy @51 + initamps4_kpa1500 @52 + initrigs4_adat @53 + initrigs4_alinco @54 + initrigs4_aor @55 + initrigs4_barrett @56 + initrigs4_dorji @57 + initrigs4_drake @58 + initrigs4_dummy @59 + initrigs4_elad @60 + initrigs4_flexradio @61 + initrigs4_icm710 @62 + initrigs4_icmarine @63 + initrigs4_icom @64 + initrigs4_jrc @65 + initrigs4_kachina @66 + initrigs4_kenwood @67 + initrigs4_kit @68 + initrigs4_lowe @69 + initrigs4_pcr @70 + initrigs4_prm80 @71 + initrigs4_racal @72 + initrigs4_rft @73 + initrigs4_rs @74 + initrigs4_skanti @75 + initrigs4_tapr @76 + initrigs4_tentec @77 + initrigs4_tuner @78 + initrigs4_uniden @79 + initrigs4_winradio @80 + initrigs4_wj @81 + initrigs4_yaesu @82 + initrots4_amsat @83 + initrots4_ars @84 + initrots4_celestron @85 + initrots4_cnctrk @86 + initrots4_dummy @87 + initrots4_easycomm @88 + initrots4_ether6 @89 + initrots4_fodtrack @90 + initrots4_gs232a @91 + initrots4_heathkit @92 + initrots4_ioptron @93 + initrots4_kit @94 + initrots4_m2 @95 + initrots4_meade @96 + initrots4_prosistel @97 + initrots4_radant @98 + initrots4_rotorez @99 + initrots4_sartek @100 + initrots4_satel @101 + initrots4_spid @102 + initrots4_ts7400 @103 + locator2longlat @104 + longlat2locator @105 + millis_to_dot10ths @106 + morse_code_dot_to_millis @107 + netrigctl_get_vfo_mode @108 + par_lock @109 + par_read_control @110 + par_read_data @111 + par_read_status @112 + par_unlock @113 + par_write_control @114 + par_write_data @115 + parse_hoststr @116 + port_close @117 + port_open @118 + print_ext_param @119 + probeallrigs4_adat @120 + probeallrigs4_drake @121 + probeallrigs4_elad @122 + probeallrigs4_icom @123 + probeallrigs4_kenwood @124 + probeallrigs4_lowe @125 + probeallrigs4_uniden @126 + probeallrigs4_yaesu @127 + qrb @128 + read_block @129 + read_string @130 + rig_check_backend @131 + rig_check_cache_timeout @132 + rig_cleanup @133 + rig_close @134 + rig_confparam_lookup @135 + rig_copyright @136 + rig_debug @137 + rig_ext_func_foreach @138 + rig_ext_level_foreach @139 + rig_ext_lookup @140 + rig_ext_lookup_tok @141 + rig_ext_parm_foreach @142 + rig_ext_token_lookup @143 + rig_flush @144 + rig_force_cache_timeout @145 + rig_get_ant @146 + rig_get_cache @147 + rig_get_cache_timeout_ms @148 + rig_get_caps @149 + rig_get_caps_cptr @150 + rig_get_caps_int @151 + rig_get_chan_all @152 + rig_get_chan_all_cb @153 + rig_get_channel @154 + rig_get_conf @155 + rig_get_ctcss_sql @156 + rig_get_ctcss_tone @157 + rig_get_dcd @158 + rig_get_dcs_code @159 + rig_get_dcs_sql @160 + rig_get_ext_func @161 + rig_get_ext_level @162 + rig_get_ext_parm @163 + rig_get_freq @164 + rig_get_func @165 + rig_get_function_ptr @166 + rig_get_info @167 + rig_get_level @168 + rig_get_mem @169 + rig_get_mem_all @170 + rig_get_mem_all_cb @171 + rig_get_mode @172 + rig_get_parm @173 + rig_get_powerstat @174 + rig_get_ptt @175 + rig_get_range @176 + rig_get_resolution @177 + rig_get_rig_info @178 + rig_get_rit @179 + rig_get_rptr_offs @180 + rig_get_rptr_shift @181 + rig_get_split_freq @182 + rig_get_split_freq_mode @183 + rig_get_split_mode @184 + rig_get_split_vfo @185 + rig_get_trn @186 + rig_get_ts @187 + rig_get_twiddle @188 + rig_get_vfo @189 + rig_get_vfo_info @190 + rig_get_vfo_list @191 + rig_get_xit @192 + rig_has_get_func @193 + rig_has_get_level @194 + rig_has_get_parm @195 + rig_has_scan @196 + rig_has_set_func @197 + rig_has_set_level @198 + rig_has_set_parm @199 + rig_has_vfo_op @200 + rig_idx2setting @201 + rig_init @202 + rig_license @203 + rig_list_foreach @204 + rig_list_foreach_model @205 + rig_load_all_backends @206 + rig_load_backend @207 + rig_lookup_mem_caps @208 + rig_mW2power @209 + rig_mem_count @210 + rig_need_debug @211 + rig_no_restore_ai @212 + rig_open @213 + rig_parse_func @214 + rig_parse_level @215 + rig_parse_mode @216 + rig_parse_mtype @217 + rig_parse_parm @218 + rig_parse_rptr_shift @219 + rig_parse_scan @220 + rig_parse_vfo @221 + rig_parse_vfo_op @222 + rig_passband_narrow @223 + rig_passband_normal @224 + rig_passband_wide @225 + rig_power2mW @226 + rig_probe @227 + rig_probe_all @228 + rig_raw2val @229 + rig_raw2val_float @230 + rig_recv_dtmf @231 + rig_register @232 + rig_reset @233 + rig_scan @234 + rig_send_dtmf @235 + rig_send_morse @236 + rig_send_voice_mem @237 + rig_set_ant @238 + rig_set_bank @239 + rig_set_cache_timeout_ms @240 + rig_set_chan_all @241 + rig_set_chan_all_cb @242 + rig_set_channel @243 + rig_set_conf @244 + rig_set_ctcss_sql @245 + rig_set_ctcss_tone @246 + rig_set_dcd_callback @247 + rig_set_dcs_code @248 + rig_set_dcs_sql @249 + rig_set_debug @250 + rig_set_debug_callback @251 + rig_set_debug_file @252 + rig_set_debug_time_stamp @253 + rig_set_ext_func @254 + rig_set_ext_level @255 + rig_set_ext_parm @256 + rig_set_freq @257 + rig_set_freq_callback @258 + rig_set_func @259 + rig_set_level @260 + rig_set_mem @261 + rig_set_mem_all @262 + rig_set_mem_all_cb @263 + rig_set_mode @264 + rig_set_mode_callback @265 + rig_set_parm @266 + rig_set_pltune_callback @267 + rig_set_powerstat @268 + rig_set_ptt @269 + rig_set_ptt_callback @270 + rig_set_rit @271 + rig_set_rptr_offs @272 + rig_set_rptr_shift @273 + rig_set_split_freq @274 + rig_set_split_freq_mode @275 + rig_set_split_mode @276 + rig_set_split_vfo @277 + rig_set_trn @278 + rig_set_ts @279 + rig_set_twiddle @280 + rig_set_uplink @281 + rig_set_vfo @282 + rig_set_vfo_callback @283 + rig_set_vfo_opt @284 + rig_set_xit @285 + rig_setting2idx @286 + rig_sprintf_ant @287 + rig_sprintf_func @288 + rig_sprintf_level @289 + rig_sprintf_level_gran @290 + rig_sprintf_mode @291 + rig_sprintf_parm @292 + rig_sprintf_parm_gran @293 + rig_sprintf_scan @294 + rig_sprintf_vfo @295 + rig_sprintf_vfop @296 + rig_stop_morse @297 + rig_strfunc @298 + rig_strlevel @299 + rig_strmtype @300 + rig_strparm @301 + rig_strptrshift @302 + rig_strrmode @303 + rig_strrmodes @304 + rig_strscan @305 + rig_strstatus @306 + rig_strvfo @307 + rig_strvfop @308 + rig_token_foreach @309 + rig_token_lookup @310 + rig_unregister @311 + rig_version @312 + rig_vfo_op @313 + rig_wait_morse @314 + rigerror @315 + rot_check_backend @316 + rot_cleanup @317 + rot_close @318 + rot_confparam_lookup @319 + rot_ext_func_foreach @320 + rot_ext_level_foreach @321 + rot_ext_lookup @322 + rot_ext_lookup_tok @323 + rot_ext_parm_foreach @324 + rot_ext_token_lookup @325 + rot_get_caps @326 + rot_get_conf @327 + rot_get_ext_func @328 + rot_get_ext_level @329 + rot_get_ext_parm @330 + rot_get_func @331 + rot_get_info @332 + rot_get_level @333 + rot_get_parm @334 + rot_get_position @335 + rot_get_status @336 + rot_has_get_func @337 + rot_has_get_level @338 + rot_has_get_parm @339 + rot_has_set_func @340 + rot_has_set_level @341 + rot_has_set_parm @342 + rot_init @343 + rot_list_foreach @344 + rot_load_all_backends @345 + rot_load_backend @346 + rot_move @347 + rot_open @348 + rot_park @349 + rot_parse_func @350 + rot_parse_level @351 + rot_parse_parm @352 + rot_probe_all @353 + rot_register @354 + rot_reset @355 + rot_set_conf @356 + rot_set_ext_func @357 + rot_set_ext_level @358 + rot_set_ext_parm @359 + rot_set_func @360 + rot_set_level @361 + rot_set_parm @362 + rot_set_position @363 + rot_sprintf_func @364 + rot_sprintf_level @365 + rot_sprintf_level_gran @366 + rot_sprintf_parm @367 + rot_sprintf_parm_gran @368 + rot_sprintf_status @369 + rot_stop @370 + rot_strfunc @371 + rot_strlevel @372 + rot_strparm @373 + rot_strstatus @374 + rot_token_foreach @375 + rot_token_lookup @376 + rot_unregister @377 + ser_get_car @378 + ser_get_cts @379 + ser_get_dsr @380 + ser_get_dtr @381 + ser_get_rts @382 + ser_set_brk @383 + ser_set_dtr @384 + ser_set_rts @385 + serial_flush @386 + serial_open @387 + serial_setup @388 + sprintf_freq @389 + sprintf_level_ext @390 + to_bcd @391 + to_bcd_be @392 + vfo_fixup @393 + write_block @394 diff --git a/external/hamlib/32/libhamlib-4.dll b/external/hamlib/32/libhamlib-4.dll new file mode 100644 index 00000000..1d971d48 Binary files /dev/null and b/external/hamlib/32/libhamlib-4.dll differ diff --git a/external/hamlib/32/libhamlib-4.exp b/external/hamlib/32/libhamlib-4.exp new file mode 100644 index 00000000..7a159189 Binary files /dev/null and b/external/hamlib/32/libhamlib-4.exp differ diff --git a/external/hamlib/32/libhamlib-4.lib b/external/hamlib/32/libhamlib-4.lib new file mode 100644 index 00000000..de5df365 Binary files /dev/null and b/external/hamlib/32/libhamlib-4.lib differ diff --git a/external/hamlib/64/libhamlib-2.def b/external/hamlib/64/libhamlib-2.def deleted file mode 100644 index 377a4415..00000000 --- a/external/hamlib/64/libhamlib-2.def +++ /dev/null @@ -1,271 +0,0 @@ -EXPORTS - azimuth_long_path @1 - dec2dmmm @2 - dec2dms @3 - distance_long_path @4 - dmmm2dec @5 - dms2dec @6 - from_bcd @7 - from_bcd_be @8 - hamlib_copyright @9 DATA - hamlib_copyright2 @10 DATA - hamlib_version @11 DATA - hamlib_version2 @12 DATA - initrigs3_adat @13 - initrigs3_alinco @14 - initrigs3_aor @15 - initrigs3_barrett @16 - initrigs3_dorji @17 - initrigs3_drake @18 - initrigs3_dummy @19 - initrigs3_flexradio @20 - initrigs3_icm710 @21 - initrigs3_icmarine @22 - initrigs3_icom @23 - initrigs3_jrc @24 - initrigs3_kachina @25 - initrigs3_kenwood @26 - initrigs3_kit @27 - initrigs3_lowe @28 - initrigs3_pcr @29 - initrigs3_prm80 @30 - initrigs3_racal @31 - initrigs3_rft @32 - initrigs3_rs @33 - initrigs3_skanti @34 - initrigs3_tapr @35 - initrigs3_tentec @36 - initrigs3_tuner @37 - initrigs3_uniden @38 - initrigs3_winradio @39 - initrigs3_wj @40 - initrigs3_yaesu @41 - initrots3_amsat @42 - initrots3_ars @43 - initrots3_celestron @44 - initrots3_cnctrk @45 - initrots3_dummy @46 - initrots3_easycomm @47 - initrots3_ether6 @48 - initrots3_fodtrack @49 - initrots3_gs232a @50 - initrots3_heathkit @51 - initrots3_kit @52 - initrots3_m2 @53 - initrots3_meade @54 - initrots3_prosistel @55 - initrots3_rotorez @56 - initrots3_sartek @57 - initrots3_spid @58 - initrots3_ts7400 @59 - locator2longlat @60 - longlat2locator @61 - par_lock @62 - par_read_control @63 - par_read_data @64 - par_read_status @65 - par_unlock @66 - par_write_control @67 - par_write_data @68 - port_close @69 - port_open @70 - probeallrigs3_adat @71 - probeallrigs3_drake @72 - probeallrigs3_icom @73 - probeallrigs3_kenwood @74 - probeallrigs3_lowe @75 - probeallrigs3_uniden @76 - probeallrigs3_yaesu @77 - qrb @78 - read_block @79 - read_string @80 - rig_check_backend @81 - rig_check_cache_timeout @82 - rig_cleanup @83 - rig_close @84 - rig_confparam_lookup @85 - rig_copyright @86 - rig_debug @87 - rig_ext_level_foreach @88 - rig_ext_lookup @89 - rig_ext_lookup_tok @90 - rig_ext_parm_foreach @91 - rig_ext_token_lookup @92 - rig_force_cache_timeout @93 - rig_get_ant @94 - rig_get_caps @95 - rig_get_chan_all @96 - rig_get_chan_all_cb @97 - rig_get_channel @98 - rig_get_conf @99 - rig_get_ctcss_sql @100 - rig_get_ctcss_tone @101 - rig_get_dcd @102 - rig_get_dcs_code @103 - rig_get_dcs_sql @104 - rig_get_ext_level @105 - rig_get_ext_parm @106 - rig_get_freq @107 - rig_get_func @108 - rig_get_info @109 - rig_get_level @110 - rig_get_mem @111 - rig_get_mem_all @112 - rig_get_mem_all_cb @113 - rig_get_mode @114 - rig_get_parm @115 - rig_get_powerstat @116 - rig_get_ptt @117 - rig_get_range @118 - rig_get_resolution @119 - rig_get_rit @120 - rig_get_rptr_offs @121 - rig_get_rptr_shift @122 - rig_get_split_freq @123 - rig_get_split_freq_mode @124 - rig_get_split_mode @125 - rig_get_split_vfo @126 - rig_get_trn @127 - rig_get_ts @128 - rig_get_vfo @129 - rig_get_xit @130 - rig_has_get_func @131 - rig_has_get_level @132 - rig_has_get_parm @133 - rig_has_scan @134 - rig_has_set_func @135 - rig_has_set_level @136 - rig_has_set_parm @137 - rig_has_vfo_op @138 - rig_init @139 - rig_license @140 - rig_list_foreach @141 - rig_load_all_backends @142 - rig_load_backend @143 - rig_lookup_mem_caps @144 - rig_mW2power @145 - rig_mem_count @146 - rig_need_debug @147 - rig_no_restore_ai @148 - rig_open @149 - rig_parse_func @150 - rig_parse_level @151 - rig_parse_mode @152 - rig_parse_mtype @153 - rig_parse_parm @154 - rig_parse_rptr_shift @155 - rig_parse_scan @156 - rig_parse_vfo @157 - rig_parse_vfo_op @158 - rig_passband_narrow @159 - rig_passband_normal @160 - rig_passband_wide @161 - rig_power2mW @162 - rig_probe @163 - rig_probe_all @164 - rig_raw2val @165 - rig_recv_dtmf @166 - rig_register @167 - rig_reset @168 - rig_scan @169 - rig_send_dtmf @170 - rig_send_morse @171 - rig_set_ant @172 - rig_set_bank @173 - rig_set_chan_all @174 - rig_set_chan_all_cb @175 - rig_set_channel @176 - rig_set_conf @177 - rig_set_ctcss_sql @178 - rig_set_ctcss_tone @179 - rig_set_dcd_callback @180 - rig_set_dcs_code @181 - rig_set_dcs_sql @182 - rig_set_debug @183 - rig_set_debug_callback @184 - rig_set_debug_file @185 - rig_set_debug_time_stamp @186 - rig_set_ext_level @187 - rig_set_ext_parm @188 - rig_set_freq @189 - rig_set_freq_callback @190 - rig_set_func @191 - rig_set_level @192 - rig_set_mem @193 - rig_set_mem_all @194 - rig_set_mem_all_cb @195 - rig_set_mode @196 - rig_set_mode_callback @197 - rig_set_parm @198 - rig_set_pltune_callback @199 - rig_set_powerstat @200 - rig_set_ptt @201 - rig_set_ptt_callback @202 - rig_set_rit @203 - rig_set_rptr_offs @204 - rig_set_rptr_shift @205 - rig_set_split_freq @206 - rig_set_split_freq_mode @207 - rig_set_split_mode @208 - rig_set_split_vfo @209 - rig_set_trn @210 - rig_set_ts @211 - rig_set_vfo @212 - rig_set_vfo_callback @213 - rig_set_xit @214 - rig_setting2idx @215 - rig_strfunc @216 - rig_strlevel @217 - rig_strmtype @218 - rig_strparm @219 - rig_strptrshift @220 - rig_strrmode @221 - rig_strscan @222 - rig_strstatus @223 - rig_strvfo @224 - rig_strvfop @225 - rig_token_foreach @226 - rig_token_lookup @227 - rig_unregister @228 - rig_version @229 - rig_vfo_op @230 - rigerror @231 - rot_check_backend @232 - rot_cleanup @233 - rot_close @234 - rot_confparam_lookup @235 - rot_get_caps @236 - rot_get_conf @237 - rot_get_info @238 - rot_get_position @239 - rot_init @240 - rot_list_foreach @241 - rot_load_all_backends @242 - rot_load_backend @243 - rot_move @244 - rot_open @245 - rot_park @246 - rot_probe_all @247 - rot_register @248 - rot_reset @249 - rot_set_conf @250 - rot_set_position @251 - rot_stop @252 - rot_token_foreach @253 - rot_token_lookup @254 - rot_unregister @255 - ser_get_car @256 - ser_get_cts @257 - ser_get_dsr @258 - ser_get_dtr @259 - ser_get_rts @260 - ser_set_brk @261 - ser_set_dtr @262 - ser_set_rts @263 - serial_flush @264 - serial_open @265 - serial_setup @266 - sprintf_freq @267 - to_bcd @268 - to_bcd_be @269 - write_block @270 diff --git a/external/hamlib/64/libhamlib-2.dll b/external/hamlib/64/libhamlib-2.dll deleted file mode 100644 index 97a05aed..00000000 Binary files a/external/hamlib/64/libhamlib-2.dll and /dev/null differ diff --git a/external/hamlib/64/libhamlib-2.exp b/external/hamlib/64/libhamlib-2.exp deleted file mode 100644 index 27b3ab6c..00000000 Binary files a/external/hamlib/64/libhamlib-2.exp and /dev/null differ diff --git a/external/hamlib/64/libhamlib-2.lib b/external/hamlib/64/libhamlib-2.lib deleted file mode 100644 index 658fc7cb..00000000 Binary files a/external/hamlib/64/libhamlib-2.lib and /dev/null differ diff --git a/external/hamlib/64/libhamlib-4.def b/external/hamlib/64/libhamlib-4.def new file mode 100644 index 00000000..1dcb8537 --- /dev/null +++ b/external/hamlib/64/libhamlib-4.def @@ -0,0 +1,395 @@ +EXPORTS + CRC32_function @1 + amp_check_backend @2 + amp_cleanup @3 + amp_close @4 + amp_confparam_lookup @5 + amp_ext_lookup @6 + amp_get_caps @7 + amp_get_conf @8 + amp_get_ext_level @9 + amp_get_freq @10 + amp_get_info @11 + amp_get_level @12 + amp_get_powerstat @13 + amp_has_get_level @14 + amp_init @15 + amp_list_foreach @16 + amp_load_all_backends @17 + amp_load_backend @18 + amp_open @19 + amp_parse_level @20 + amp_probe_all @21 + amp_register @22 + amp_reset @23 + amp_set_conf @24 + amp_set_freq @25 + amp_set_powerstat @26 + amp_sprintf_level @27 + amp_strlevel @28 + amp_token_lookup @29 + amp_unregister @30 + azimuth_long_path @31 + debugmsgsave @32 DATA + debugmsgsave2 @33 DATA + debugmsgsave3 @34 DATA + dec2dmmm @35 + dec2dms @36 + distance_long_path @37 + dmmm2dec @38 + dms2dec @39 + dot10ths_to_millis @40 + dump_hex @41 + elapsed_ms @42 + from_bcd @43 + from_bcd_be @44 + get_rig_conf_type @45 + hamlib_copyright @46 DATA + hamlib_copyright2 @47 DATA + hamlib_version @48 DATA + hamlib_version2 @49 DATA + hl_usleep @50 + initamps4_dummy @51 + initamps4_kpa1500 @52 + initrigs4_adat @53 + initrigs4_alinco @54 + initrigs4_aor @55 + initrigs4_barrett @56 + initrigs4_dorji @57 + initrigs4_drake @58 + initrigs4_dummy @59 + initrigs4_elad @60 + initrigs4_flexradio @61 + initrigs4_icm710 @62 + initrigs4_icmarine @63 + initrigs4_icom @64 + initrigs4_jrc @65 + initrigs4_kachina @66 + initrigs4_kenwood @67 + initrigs4_kit @68 + initrigs4_lowe @69 + initrigs4_pcr @70 + initrigs4_prm80 @71 + initrigs4_racal @72 + initrigs4_rft @73 + initrigs4_rs @74 + initrigs4_skanti @75 + initrigs4_tapr @76 + initrigs4_tentec @77 + initrigs4_tuner @78 + initrigs4_uniden @79 + initrigs4_winradio @80 + initrigs4_wj @81 + initrigs4_yaesu @82 + initrots4_amsat @83 + initrots4_ars @84 + initrots4_celestron @85 + initrots4_cnctrk @86 + initrots4_dummy @87 + initrots4_easycomm @88 + initrots4_ether6 @89 + initrots4_fodtrack @90 + initrots4_gs232a @91 + initrots4_heathkit @92 + initrots4_ioptron @93 + initrots4_kit @94 + initrots4_m2 @95 + initrots4_meade @96 + initrots4_prosistel @97 + initrots4_radant @98 + initrots4_rotorez @99 + initrots4_sartek @100 + initrots4_satel @101 + initrots4_spid @102 + initrots4_ts7400 @103 + locator2longlat @104 + longlat2locator @105 + millis_to_dot10ths @106 + morse_code_dot_to_millis @107 + netrigctl_get_vfo_mode @108 + par_lock @109 + par_read_control @110 + par_read_data @111 + par_read_status @112 + par_unlock @113 + par_write_control @114 + par_write_data @115 + parse_hoststr @116 + port_close @117 + port_open @118 + print_ext_param @119 + probeallrigs4_adat @120 + probeallrigs4_drake @121 + probeallrigs4_elad @122 + probeallrigs4_icom @123 + probeallrigs4_kenwood @124 + probeallrigs4_lowe @125 + probeallrigs4_uniden @126 + probeallrigs4_yaesu @127 + qrb @128 + read_block @129 + read_string @130 + rig_check_backend @131 + rig_check_cache_timeout @132 + rig_cleanup @133 + rig_close @134 + rig_confparam_lookup @135 + rig_copyright @136 + rig_debug @137 + rig_ext_func_foreach @138 + rig_ext_level_foreach @139 + rig_ext_lookup @140 + rig_ext_lookup_tok @141 + rig_ext_parm_foreach @142 + rig_ext_token_lookup @143 + rig_flush @144 + rig_force_cache_timeout @145 + rig_get_ant @146 + rig_get_cache @147 + rig_get_cache_timeout_ms @148 + rig_get_caps @149 + rig_get_caps_cptr @150 + rig_get_caps_int @151 + rig_get_chan_all @152 + rig_get_chan_all_cb @153 + rig_get_channel @154 + rig_get_conf @155 + rig_get_ctcss_sql @156 + rig_get_ctcss_tone @157 + rig_get_dcd @158 + rig_get_dcs_code @159 + rig_get_dcs_sql @160 + rig_get_ext_func @161 + rig_get_ext_level @162 + rig_get_ext_parm @163 + rig_get_freq @164 + rig_get_func @165 + rig_get_function_ptr @166 + rig_get_info @167 + rig_get_level @168 + rig_get_mem @169 + rig_get_mem_all @170 + rig_get_mem_all_cb @171 + rig_get_mode @172 + rig_get_parm @173 + rig_get_powerstat @174 + rig_get_ptt @175 + rig_get_range @176 + rig_get_resolution @177 + rig_get_rig_info @178 + rig_get_rit @179 + rig_get_rptr_offs @180 + rig_get_rptr_shift @181 + rig_get_split_freq @182 + rig_get_split_freq_mode @183 + rig_get_split_mode @184 + rig_get_split_vfo @185 + rig_get_trn @186 + rig_get_ts @187 + rig_get_twiddle @188 + rig_get_vfo @189 + rig_get_vfo_info @190 + rig_get_vfo_list @191 + rig_get_xit @192 + rig_has_get_func @193 + rig_has_get_level @194 + rig_has_get_parm @195 + rig_has_scan @196 + rig_has_set_func @197 + rig_has_set_level @198 + rig_has_set_parm @199 + rig_has_vfo_op @200 + rig_idx2setting @201 + rig_init @202 + rig_license @203 + rig_list_foreach @204 + rig_list_foreach_model @205 + rig_load_all_backends @206 + rig_load_backend @207 + rig_lookup_mem_caps @208 + rig_mW2power @209 + rig_mem_count @210 + rig_need_debug @211 + rig_no_restore_ai @212 + rig_open @213 + rig_parse_func @214 + rig_parse_level @215 + rig_parse_mode @216 + rig_parse_mtype @217 + rig_parse_parm @218 + rig_parse_rptr_shift @219 + rig_parse_scan @220 + rig_parse_vfo @221 + rig_parse_vfo_op @222 + rig_passband_narrow @223 + rig_passband_normal @224 + rig_passband_wide @225 + rig_power2mW @226 + rig_probe @227 + rig_probe_all @228 + rig_raw2val @229 + rig_raw2val_float @230 + rig_recv_dtmf @231 + rig_register @232 + rig_reset @233 + rig_scan @234 + rig_send_dtmf @235 + rig_send_morse @236 + rig_send_voice_mem @237 + rig_set_ant @238 + rig_set_bank @239 + rig_set_cache_timeout_ms @240 + rig_set_chan_all @241 + rig_set_chan_all_cb @242 + rig_set_channel @243 + rig_set_conf @244 + rig_set_ctcss_sql @245 + rig_set_ctcss_tone @246 + rig_set_dcd_callback @247 + rig_set_dcs_code @248 + rig_set_dcs_sql @249 + rig_set_debug @250 + rig_set_debug_callback @251 + rig_set_debug_file @252 + rig_set_debug_time_stamp @253 + rig_set_ext_func @254 + rig_set_ext_level @255 + rig_set_ext_parm @256 + rig_set_freq @257 + rig_set_freq_callback @258 + rig_set_func @259 + rig_set_level @260 + rig_set_mem @261 + rig_set_mem_all @262 + rig_set_mem_all_cb @263 + rig_set_mode @264 + rig_set_mode_callback @265 + rig_set_parm @266 + rig_set_pltune_callback @267 + rig_set_powerstat @268 + rig_set_ptt @269 + rig_set_ptt_callback @270 + rig_set_rit @271 + rig_set_rptr_offs @272 + rig_set_rptr_shift @273 + rig_set_split_freq @274 + rig_set_split_freq_mode @275 + rig_set_split_mode @276 + rig_set_split_vfo @277 + rig_set_trn @278 + rig_set_ts @279 + rig_set_twiddle @280 + rig_set_uplink @281 + rig_set_vfo @282 + rig_set_vfo_callback @283 + rig_set_vfo_opt @284 + rig_set_xit @285 + rig_setting2idx @286 + rig_sprintf_ant @287 + rig_sprintf_func @288 + rig_sprintf_level @289 + rig_sprintf_level_gran @290 + rig_sprintf_mode @291 + rig_sprintf_parm @292 + rig_sprintf_parm_gran @293 + rig_sprintf_scan @294 + rig_sprintf_vfo @295 + rig_sprintf_vfop @296 + rig_stop_morse @297 + rig_strfunc @298 + rig_strlevel @299 + rig_strmtype @300 + rig_strparm @301 + rig_strptrshift @302 + rig_strrmode @303 + rig_strrmodes @304 + rig_strscan @305 + rig_strstatus @306 + rig_strvfo @307 + rig_strvfop @308 + rig_token_foreach @309 + rig_token_lookup @310 + rig_unregister @311 + rig_version @312 + rig_vfo_op @313 + rig_wait_morse @314 + rigerror @315 + rot_check_backend @316 + rot_cleanup @317 + rot_close @318 + rot_confparam_lookup @319 + rot_ext_func_foreach @320 + rot_ext_level_foreach @321 + rot_ext_lookup @322 + rot_ext_lookup_tok @323 + rot_ext_parm_foreach @324 + rot_ext_token_lookup @325 + rot_get_caps @326 + rot_get_conf @327 + rot_get_ext_func @328 + rot_get_ext_level @329 + rot_get_ext_parm @330 + rot_get_func @331 + rot_get_info @332 + rot_get_level @333 + rot_get_parm @334 + rot_get_position @335 + rot_get_status @336 + rot_has_get_func @337 + rot_has_get_level @338 + rot_has_get_parm @339 + rot_has_set_func @340 + rot_has_set_level @341 + rot_has_set_parm @342 + rot_init @343 + rot_list_foreach @344 + rot_load_all_backends @345 + rot_load_backend @346 + rot_move @347 + rot_open @348 + rot_park @349 + rot_parse_func @350 + rot_parse_level @351 + rot_parse_parm @352 + rot_probe_all @353 + rot_register @354 + rot_reset @355 + rot_set_conf @356 + rot_set_ext_func @357 + rot_set_ext_level @358 + rot_set_ext_parm @359 + rot_set_func @360 + rot_set_level @361 + rot_set_parm @362 + rot_set_position @363 + rot_sprintf_func @364 + rot_sprintf_level @365 + rot_sprintf_level_gran @366 + rot_sprintf_parm @367 + rot_sprintf_parm_gran @368 + rot_sprintf_status @369 + rot_stop @370 + rot_strfunc @371 + rot_strlevel @372 + rot_strparm @373 + rot_strstatus @374 + rot_token_foreach @375 + rot_token_lookup @376 + rot_unregister @377 + ser_get_car @378 + ser_get_cts @379 + ser_get_dsr @380 + ser_get_dtr @381 + ser_get_rts @382 + ser_set_brk @383 + ser_set_dtr @384 + ser_set_rts @385 + serial_flush @386 + serial_open @387 + serial_setup @388 + sprintf_freq @389 + sprintf_level_ext @390 + to_bcd @391 + to_bcd_be @392 + vfo_fixup @393 + write_block @394 diff --git a/external/hamlib/64/libhamlib-4.dll b/external/hamlib/64/libhamlib-4.dll new file mode 100644 index 00000000..f621c4c4 Binary files /dev/null and b/external/hamlib/64/libhamlib-4.dll differ diff --git a/external/hamlib/64/libhamlib-4.exp b/external/hamlib/64/libhamlib-4.exp new file mode 100644 index 00000000..b70075ba Binary files /dev/null and b/external/hamlib/64/libhamlib-4.exp differ diff --git a/external/hamlib/64/libhamlib-4.lib b/external/hamlib/64/libhamlib-4.lib new file mode 100644 index 00000000..94180fe9 Binary files /dev/null and b/external/hamlib/64/libhamlib-4.lib differ diff --git a/external/hamlib/hamlib/amplifier.h b/external/hamlib/hamlib/amplifier.h new file mode 100644 index 00000000..15624e6b --- /dev/null +++ b/external/hamlib/hamlib/amplifier.h @@ -0,0 +1,446 @@ +/* + * Hamlib Interface - Amplifier API header + * Copyright (c) 2000-2005 by Stephane Fillod + * + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef _AMPLIFIER_H +#define _AMPLIFIER_H 1 + +#include +#include + +/** + * \addtogroup amplifier + * @{ + */ + +/** + * \brief Hamlib amplifier data structures. + * + * \file amplifier.h + * + * This file contains the data structures and declarations for the Hamlib + * amplifier Application Programming Interface (API). + * + * See the amplifier.c file for details on the amplifier API functions. + */ + + + +__BEGIN_DECLS + +/* Forward struct references */ + +struct amp; +struct amp_state; + + +/** + * \brief Main amplifier handle type definition. + * + * \typedef typedef struct amp AMP + * + * The #AMP handle is returned by amp_init() and is passed as a parameter to + * every amplifier specific API call. + * + * amp_cleanup() must be called when this handle is no longer needed. + */ +typedef struct amp AMP; + + +/** + * \brief Type definition for + * SWR (Standing Wave Ratio). + * + * \typedef typedef float swr_t + * + * The \a swr_t type is used as a parameter for the amp_get_swr() function. + * + * The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's + * internal antenna system tuner, i.e. + * transmatch, + * representing the ratio of 1.0:1 to Maximum:1. + */ +typedef float swr_t; + + +/** + * \brief Type definition for the + * transmatch + * tuning values of + * capacitance + * and + * inductance. + * + * \typedef typedef float tune_value_t + * + * The \a tune_value_t type is used as a parameter for amp_get_level(). + * + * The unit of \a tune_value_t is + * picoFarads (pF) + * or + * nanoHenrys (nH). + */ +typedef int tune_value_t; + + +/** + * \brief The token in the netampctl protocol for returning an error condition code. + */ +#define NETAMPCTL_RET "RPRT " + + +//! @cond Doxygen_Suppress +typedef enum +{ + AMP_RESET_MEM, // erase tuner memory + AMP_RESET_FAULT, // reset any fault + AMP_RESET_AMP // for kpa1500 +} amp_reset_t; +//! @endcond + +/** + * \brief Amplifier type flags + */ +typedef enum +{ + AMP_FLAG_1 = (1 << 1), /*!< TBD */ + AMP_FLAG_2 = (1 << 2) /*!< TBD */ +} amp_type_t; + +//! @cond Doxygen_Suppress +// TBD AMP_TYPE +#define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2) + +#define AMP_TYPE_OTHER 0 +#define AMP_TYPE_1 AMP_FLAG_1 +#define AMP_TYPE_2 AMP_FLAG_2 +#define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2) +//! @endcond + + +//! @cond Doxygen_Suppress +enum amp_level_e +{ + AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */ + AMP_LEVEL_SWR = (1 << 0), /*!< \c SWR 1.0 or greater. */ + AMP_LEVEL_NH = (1 << 1), /*!< \c Tune setting in nanohenries. */ + AMP_LEVEL_PF = (1 << 2), /*!< \c Tune setting in picofarads. */ + AMP_LEVEL_PWR_INPUT = (1 << 3), /*!< \c Power reading from amplifier. */ + AMP_LEVEL_PWR_FWD = (1 << 4), /*!< \c Power reading forward. */ + AMP_LEVEL_PWR_REFLECTED = (1 << 5), /*!< \c Power reading reverse. */ + AMP_LEVEL_PWR_PEAK = (1 << 6), /*!< \c Power reading peak. */ + AMP_LEVEL_FAULT = (1 << 7) /*!< \c Fault code. */ +}; +//! @endcond + +//! @cond Doxygen_Suppress +#define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR) +#define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT) +#define AMP_LEVEL_IS_FLOAT(l) ((l)&_LEVEL_FLOAT_LIST) +#define AMP_LEVEL_IS_STRING(l) ((l)&_LEVEL_STRING_LIST) +//! @endcond + +/* Basic amp type, can store some useful info about different amplifiers. Each + * lib must be able to populate this structure, so we can make useful + * enquiries about capabilities. + */ + +//! @cond Doxygen_Suppress +#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg +//! @endcond + +/** + * \brief Amplifier capabilities. + * + * \struct amp_caps + * + * The main idea of this struct is that it will be defined by the backend + * amplifier driver and will remain read-only for the application. Fields + * that need to be modifiable by the application are copied into the + * amp_state structure, which is the private memory area of the #AMP instance. + * + * This way you can have several amplifiers running within the same + * application, sharing the amp_caps structure of the backend, while keeping + * their own customized data. + * + * \b Note: Don't move fields around and only add new fields at the end of the + * amp_caps structure. Shared libraries and DLLs depend on a constant + * structure to maintain compatibility. + */ +struct amp_caps +{ + amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */ + const char *model_name; /*!< Model name, e.g. MM-5k. */ + const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */ + const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ + const char *copyright; /*!< Copyright info (should be LGPL). */ + enum rig_status_e status; /*!< Driver status. */ + + int amp_type; /*!< Amplifier type. */ + enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */ + + int serial_rate_min; /*!< Minimal serial speed. */ + int serial_rate_max; /*!< Maximal serial speed. */ + int serial_data_bits; /*!< Number of data bits. */ + int serial_stop_bits; /*!< Number of stop bits. */ + enum serial_parity_e serial_parity; /*!< Parity. */ + enum serial_handshake_e serial_handshake; /*!< Handshake. */ + + int write_delay; /*!< Write delay. */ + int post_write_delay; /*!< Post-write delay. */ + int timeout; /*!< Timeout. */ + int retry; /*!< Number of retries if a command fails. */ + + const struct confparams *cfgparams; /*!< Configuration parameters. */ + const rig_ptr_t priv; /*!< Private data. */ + const char *amp_model_macro_name; /*!< Model macro name. */ + + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ + + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ + + /* + * Amp Admin API + * + */ + + int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */ + int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */ + int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */ + int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */ + + int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */ + int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */ + + int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ + int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ + + /* + * General API commands, from most primitive to least.. :() + * List Set/Get functions pairs + */ + + int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */ + int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */ + int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ + int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */ + int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */ + + + /* get firmware info, etc. */ + const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */ + +//! @cond Doxygen_Suppress + setting_t levels; + unsigned ext_levels; +//! @endcond + const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */ + const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */ + + const char *macro_name; /*!< Amplifier model macro name. */ +}; + + +/** + * \brief Amplifier state structure. + * + * \struct amp_state + * + * This structure contains live data, as well as a copy of capability fields + * that may be updated, i.e. customized while the #AMP handle is instantiated. + * + * It is fine to move fields around, as this kind of struct should not be + * initialized like amp_caps are. + */ +struct amp_state +{ + /* + * overridable fields + */ + + /* + * non overridable fields, internal use + */ + hamlib_port_t ampport; /*!< Amplifier port (internal use). */ + + int comm_state; /*!< Comm port state, opened/closed. */ + rig_ptr_t priv; /*!< Pointer to private amplifier state data. */ + rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ + + setting_t has_get_level; /*!< List of get levels. */ + + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ +}; + + +/** + * \brief Master amplifier structure. + * + * \struct amp + * + * Master amplifier data structure acting as the #AMP handle for the + * controlled amplifier. A pointer to this structure is returned by the + * amp_init() API function and is passed as a parameter to every amplifier + * specific API call. + * + * \sa amp_init(), amp_caps, amp_state + */ +struct amp +{ + struct amp_caps *caps; /*!< Amplifier caps. */ + struct amp_state state; /*!< Amplifier state. */ +}; + + +//! @cond Doxygen_Suppress +/* --------------- API function prototypes -----------------*/ + +extern HAMLIB_EXPORT(AMP *) +amp_init HAMLIB_PARAMS((amp_model_t amp_model)); + +extern HAMLIB_EXPORT(int) +amp_open HAMLIB_PARAMS((AMP *amp)); + +extern HAMLIB_EXPORT(int) +amp_close HAMLIB_PARAMS((AMP *amp)); + +extern HAMLIB_EXPORT(int) +amp_cleanup HAMLIB_PARAMS((AMP *amp)); + +extern HAMLIB_EXPORT(int) +amp_set_conf HAMLIB_PARAMS((AMP *amp, + token_t token, + const char *val)); +extern HAMLIB_EXPORT(int) +amp_get_conf HAMLIB_PARAMS((AMP *amp, + token_t token, + char *val)); +extern HAMLIB_EXPORT(int) +amp_set_powerstat HAMLIB_PARAMS((AMP *amp, + powerstat_t status)); +extern HAMLIB_EXPORT(int) +amp_get_powerstat HAMLIB_PARAMS((AMP *amp, + powerstat_t *status)); + + +/* + * General API commands, from most primitive to least.. ) + * List Set/Get functions pairs + */ +extern HAMLIB_EXPORT(int) +amp_get_freq HAMLIB_PARAMS((AMP *amp, + freq_t *freq)); +extern HAMLIB_EXPORT(int) +amp_set_freq HAMLIB_PARAMS((AMP *amp, + freq_t freq)); + +extern HAMLIB_EXPORT(int) +amp_reset HAMLIB_PARAMS((AMP *amp, + amp_reset_t reset)); + +extern HAMLIB_EXPORT(const char *) +amp_get_info HAMLIB_PARAMS((AMP *amp)); + +extern HAMLIB_EXPORT(int) +amp_get_level HAMLIB_PARAMS((AMP *amp, setting_t level, value_t *val)); + +extern HAMLIB_EXPORT(int) +amp_register HAMLIB_PARAMS((const struct amp_caps *caps)); + +extern HAMLIB_EXPORT(int) +amp_unregister HAMLIB_PARAMS((amp_model_t amp_model)); + +extern HAMLIB_EXPORT(int) +amp_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct amp_caps *, + rig_ptr_t), + rig_ptr_t data)); + +extern HAMLIB_EXPORT(int) +amp_load_backend HAMLIB_PARAMS((const char *be_name)); + +extern HAMLIB_EXPORT(int) +amp_check_backend HAMLIB_PARAMS((amp_model_t amp_model)); + +extern HAMLIB_EXPORT(int) +amp_load_all_backends HAMLIB_PARAMS((void)); + +extern HAMLIB_EXPORT(amp_model_t) +amp_probe_all HAMLIB_PARAMS((hamlib_port_t *p)); + +extern HAMLIB_EXPORT(int) +amp_token_foreach HAMLIB_PARAMS((AMP *amp, + int (*cfunc)(const struct confparams *, + rig_ptr_t), + rig_ptr_t data)); + +extern HAMLIB_EXPORT(const struct confparams *) +amp_confparam_lookup HAMLIB_PARAMS((AMP *amp, + const char *name)); + +extern HAMLIB_EXPORT(token_t) +amp_token_lookup HAMLIB_PARAMS((AMP *amp, + const char *name)); + +extern HAMLIB_EXPORT(const struct amp_caps *) +amp_get_caps HAMLIB_PARAMS((amp_model_t amp_model)); + +extern HAMLIB_EXPORT(setting_t) +amp_has_get_level HAMLIB_PARAMS((AMP *amp, + setting_t level)); + +extern HAMLIB_EXPORT(const struct confparams *) +amp_ext_lookup HAMLIB_PARAMS((AMP *amp, + const char *name)); + +extern HAMLIB_EXPORT(int) +amp_get_ext_level HAMLIB_PARAMS((AMP *amp, + token_t token, + value_t *val)); + +extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); + +extern HAMLIB_EXPORT(const struct confparams *) +rig_ext_lookup HAMLIB_PARAMS((RIG *rig, + const char *name)); + +extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s); +extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); + +//! @endcond + + +/** + * \brief Convenience macro for generating debugging messages. + * + * \def amp_debug + * + * This is an alias of the rig_debug() function call and is used in the same + * manner. + */ +#define amp_debug rig_debug + +__END_DECLS + +#endif /* _AMPLIFIER_H */ + +/** @} */ diff --git a/external/hamlib/hamlib/amplist.h b/external/hamlib/hamlib/amplist.h new file mode 100644 index 00000000..27edf06d --- /dev/null +++ b/external/hamlib/hamlib/amplist.h @@ -0,0 +1,120 @@ +/* + * Hamlib Interface - list of known amplifiers + * Copyright (c) 2000-2011 by Stephane Fillod + * Copyright (c) 2000-2002 by Frank Singleton + * Copyright (C) 2019 by Michael Black W9MDB. Derived from rotlist.h + * + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef _AMPLIST_H +#define _AMPLIST_H 1 + +//! @cond Doxygen_Suppress +#define AMP_MAKE_MODEL(a,b) ((a)*100+(b)) +#define AMP_BACKEND_NUM(a) ((a)/100) +//! @endcond + + +/** + * \addtogroup amplifier + * @{ + */ + +/** + * \brief Hamlib amplifier model definitions. + * + * \file amplist.h + * + * This file contains amplifier model definitions for the Hamlib amplifier + * Application Programming Interface (API). Each distinct amplifier type has + * a unique model number (ID) and is used by Hamlib to identify and + * distinguish between the different hardware drivers. The exact model + * numbers can be acquired using the macros in this file. To obtain a list of + * supported amplifier branches, one can use the statically defined + * AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of + * supported amplifiers (including each model in every branch), the + * foreach_opened_amp() API function can be used. + * + * The model number, or ID, is used to tell Hamlib which amplifier the client + * wishes to use which is done with the amp_init() API call. + */ + + +/** + * \brief A macro that returns the model number for an unknown model. + * + * \def AMP_MODEL_NONE + * + * The none backend, as the name suggests, does nothing. It is mainly for + * internal use. + */ +#define AMP_MODEL_NONE 0 + + +/** + * \brief A macro that returns the model number for the DUMMY backend. + * + * \def AMP_MODEL_DUMMY + * + * The DUMMY backend, as the name suggests, is a backend which performs no + * hardware operations and always behaves as one would expect. It can be + * thought of as a hardware simulator and is very useful for testing client + * applications. + */ +/** + * \brief A macro that returns the model number for the NETAMPCTL backend. + * + * \def AMP_MODEL_NETAMPCTL + * + * The NETAMPCTL backend allows use of the `ampctld` daemon through the normal + * Hamlib API. + */ +//! @cond Doxygen_Suppress +#define AMP_DUMMY 0 +#define AMP_BACKEND_DUMMY "dummy" +//! @endcond +#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1) +#define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2) + + +/** + * \brief A macro that returns the model number of the KPA1500 backend. + * + * \def AMP_MODEL_ELECRAFT_KPA1500 + * + * The KPA1500 backend can be used with amplifiers that support the Elecraft + * KPA-1500 protocol. + */ +//! @cond Doxygen_Suppress +#define AMP_ELECRAFT 2 +#define AMP_BACKEND_ELECRAFT "elecraft" +//! @endcond +#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1) +//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) + +/** + * \brief Convenience type definition for an amplifier model. + * + * \typedef typedef int amp_model_t + */ +typedef int amp_model_t; + + +#endif /* _AMPLIST_H */ + +/** @} */ diff --git a/external/hamlib/hamlib/rig.h b/external/hamlib/hamlib/rig.h index b94af30c..68014eb9 100644 --- a/external/hamlib/hamlib/rig.h +++ b/external/hamlib/hamlib/rig.h @@ -24,8 +24,13 @@ #ifndef _RIG_H #define _RIG_H 1 +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + #include #include +#include +#include +#include /* Rig list is in a separate file so as not to mess up w/ this one */ #include @@ -46,6 +51,7 @@ /* __BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use __END_DECLS at * the end of C declarations. */ +//! @cond Doxygen_Suppress #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus @@ -55,10 +61,12 @@ # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif +//! @endcond /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers * that don't understand ANSI C prototypes still work, and ANSI C * compilers can issue warnings about type mismatches. */ +//! @cond Doxygen_Suppress #undef HAMLIB_PARAMS #if defined (__STDC__) \ || defined (_AIX) \ @@ -68,20 +76,42 @@ || defined(__cplusplus) # define HAMLIB_PARAMS(protos) protos # define rig_ptr_t void * +# define amp_ptr_t void * #else # define HAMLIB_PARAMS(protos) () # define rig_ptr_t char * +# define amp_ptr_t char * #endif +//! @endcond #include +#ifndef SWIGLUA +//! @cond Doxygen_Suppress +#define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT)) +//! @endcond +#else +/* SWIG's older Lua generator doesn't grok ull due to Lua using a + double-precision floating point type internally for number + representations (max 53 bits of precision) so makes a string + constant from a constant number literal using ull */ +// #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT)) +// #define SWIGLUAHIDE +/* But this appears to have been fixed so we'll use the correct one now + If you have the older version of SWIG comment out this line and use + the two above */ +// This 1ul definition works on swig 4.0.1 and lua 5.3.5 +#define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT)) +#endif __BEGIN_DECLS +//! @cond Doxygen_Suppress extern HAMLIB_EXPORT_VAR(const char) hamlib_version[]; extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[]; extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2; extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2; +//! @endcond /** * \brief Hamlib error codes @@ -90,26 +120,35 @@ extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2; * of rig_errcode_e definitions in case of error, or 0 when successful. */ enum rig_errcode_e { - RIG_OK = 0, /*!< No error, operation completed successfully */ - RIG_EINVAL, /*!< invalid parameter */ - RIG_ECONF, /*!< invalid configuration (serial,..) */ - RIG_ENOMEM, /*!< memory shortage */ - RIG_ENIMPL, /*!< function not implemented, but will be */ - RIG_ETIMEOUT, /*!< communication timed out */ - RIG_EIO, /*!< IO error, including open failed */ - RIG_EINTERNAL, /*!< Internal Hamlib error, huh! */ - RIG_EPROTO, /*!< Protocol error */ - RIG_ERJCTED, /*!< Command rejected by the rig */ - RIG_ETRUNC, /*!< Command performed, but arg truncated */ - RIG_ENAVAIL, /*!< function not available */ - RIG_ENTARGET, /*!< VFO not targetable */ - RIG_BUSERROR, /*!< Error talking on the bus */ - RIG_BUSBUSY, /*!< Collision on the bus */ - RIG_EARG, /*!< NULL RIG handle or any invalid pointer parameter in get arg */ - RIG_EVFO, /*!< Invalid VFO */ - RIG_EDOM /*!< Argument out of domain of func */ + RIG_OK = 0, /*!< 0 No error, operation completed successfully */ + RIG_EINVAL, /*!< 1 invalid parameter */ + RIG_ECONF, /*!< 2 invalid configuration (serial,..) */ + RIG_ENOMEM, /*!< 3 memory shortage */ + RIG_ENIMPL, /*!< 4 function not implemented, but will be */ + RIG_ETIMEOUT, /*!< 5 communication timed out */ + RIG_EIO, /*!< 6 IO error, including open failed */ + RIG_EINTERNAL, /*!< 7 Internal Hamlib error, huh! */ + RIG_EPROTO, /*!< 8 Protocol error */ + RIG_ERJCTED, /*!< 9 Command rejected by the rig */ + RIG_ETRUNC, /*!< 10 Command performed, but arg truncated */ + RIG_ENAVAIL, /*!< 11 Function not available */ + RIG_ENTARGET, /*!< 12 VFO not targetable */ + RIG_BUSERROR, /*!< 13 Error talking on the bus */ + RIG_BUSBUSY, /*!< 14 Collision on the bus */ + RIG_EARG, /*!< 15 NULL RIG handle or any invalid pointer parameter in get arg */ + RIG_EVFO, /*!< 16 Invalid VFO */ + RIG_EDOM /*!< 17 Argument out of domain of func */ }; +/** + * \brief Determines if the given error code indicates a "soft" error + * Soft errors are caused by invalid parameters and software/hardware features + * and cannot be fixed by retries or by re-initializing hardware. + */ +#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \ + || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \ + || errcode == RIG_EVFO || errcode == RIG_EDOM) + /** * \brief Token in the netrigctl protocol for returning error code */ @@ -129,7 +168,8 @@ enum rig_debug_level_e { RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */ RIG_DEBUG_WARN, /*!< warning */ RIG_DEBUG_VERBOSE, /*!< verbose */ - RIG_DEBUG_TRACE /*!< tracing */ + RIG_DEBUG_TRACE, /*!< tracing */ + RIG_DEBUG_CACHE /*!< caching */ }; @@ -143,18 +183,25 @@ struct rig_state; /** * \brief Rig structure definition (see rig for details). */ -typedef struct rig RIG; +typedef struct s_rig RIG; -#define RIGNAMSIZ 30 -#define RIGVERSIZ 8 -#define FILPATHLEN 100 -#define FRQRANGESIZ 30 -#define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */ -#define TSLSTSIZ 20 /* max tuning step list size, zero ended */ -#define FLTLSTSIZ 60 /* max mode/filter list size, zero ended */ -#define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */ -#define CHANLSTSIZ 16 /* max mem_list size, zero ended */ -#define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */ +//! @cond Doxygen_Suppress +#define HAMLIB_RIGNAMSIZ 30 +#define HAMLIB_RIGVERSIZ 8 +#define HAMLIB_FILPATHLEN 512 +#define HAMLIB_FRQRANGESIZ 30 +#define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */ +#define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */ +#define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */ +#define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */ +#define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */ +#define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */ +#define HAMLIB_MAX_MODES 63 +#define HAMLIB_MAX_VFOS 31 +#define HAMLIB_MAX_ROTORS 63 +#define HAMLIB_MAX_VFO_OPS 31 +#define HAMLIB_MAX_RSCANS 31 +//! @endcond /** @@ -167,6 +214,8 @@ typedef struct rig RIG; * * Digitally-Coded Squelch codes are simple direct integers. */ +#define CTCSS_LIST_SIZE 60 +#define DCS_LIST_SIZE 128 typedef unsigned int tone_t; @@ -240,6 +289,7 @@ typedef enum { RIG_FLAG_TUNER = (1 << 11) /*!< dumb tuner */ } rig_type_t; +//! @cond Doxygen_Suppress #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER) #define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER) @@ -253,6 +303,7 @@ typedef enum { #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING) #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER) #define RIG_TYPE_TUNER RIG_FLAG_TUNER +//! @endcond /** @@ -304,12 +355,15 @@ typedef double freq_t; /** * \brief printf(3) format to be used for freq_t type */ -#define PRIfreq "f" +#define PRIfreq ".0f" /** * \brief scanf(3) format to be used for freq_t type */ #define SCNfreq "lf" +/** + * \brief printf(3) format to be used for freq_t type + */ #define FREQFMT SCNfreq @@ -320,16 +374,25 @@ typedef double freq_t; */ typedef signed long shortfreq_t; +/** \brief \c Macro to return Hz when f=Hz */ #define Hz(f) ((freq_t)(f)) +/** \brief \c Macro to return Hz when f=kHz */ #define kHz(f) ((freq_t)((f)*(freq_t)1000)) +/** \brief \c Macro to return Hz when f=MHz */ #define MHz(f) ((freq_t)((f)*(freq_t)1000000)) +/** \brief \c Macro to return Hz when f=GHz */ #define GHz(f) ((freq_t)((f)*(freq_t)1000000000)) +/** \brief \c Macro to return short Hz when f=Hz */ #define s_Hz(f) ((shortfreq_t)(f)) +/** \brief \c Macro to return short Hz when f=kHz */ #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000)) +/** \brief \c Macro to return short Hz when f=MHz */ #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000)) +/** \brief \c Macro to return short Hz when f=GHz */ #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000)) +/** \brief \c Frequency none -- used as default value for checking */ #define RIG_FREQ_NONE Hz(0) @@ -347,22 +410,71 @@ typedef signed long shortfreq_t; * Aliases may or may not be honored by a backend and are defined using * high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc. */ -typedef int vfo_t; +typedef unsigned int vfo_t; /** \brief '' -- used in caps */ + +#define RIG_VFO_N(n) ((vfo_t)(1u<<(n))) + +/** \brief \c VFONone -- vfo unknown */ #define RIG_VFO_NONE 0 -#define RIG_VFO_TX_FLAG (1<<30) +/** \brief \c VFOA -- VFO A */ +#define RIG_VFO_A RIG_VFO_N(0) -/** \brief \c currVFO -- current "tunable channel"/VFO */ -#define RIG_VFO_CURR (1<<29) +/** \brief \c VFOB -- VFO B */ +#define RIG_VFO_B RIG_VFO_N(1) -/** \brief \c MEM -- means Memory mode, to be used with set_vfo */ -#define RIG_VFO_MEM (1<<28) +/** \brief \c VFOC -- VFO C */ +#define RIG_VFO_C RIG_VFO_N(2) + +// Any addition VFOS need to go from 3-20 +// To maintain backward compatibility these values cannot change + +/** \brief \c SubA -- alias for SUB_A */ +#define RIG_VFO_SUB_A RIG_VFO_N(21) + +/** \brief \c SubB -- alias for SUB_B */ +#define RIG_VFO_SUB_B RIG_VFO_N(22) + +/** \brief \c SubC -- alias for SUB_B */ +#define RIG_VFO_SUB_C RIG_VFO_N(3) + +/** \brief \c MainA -- alias for MAIN_A */ +#define RIG_VFO_MAIN_A RIG_VFO_N(23) + +/** \brief \c MainB -- alias for MAIN_B */ +#define RIG_VFO_MAIN_B RIG_VFO_N(24) + +/** \brief \c MainC -- alias for MAIN_C */ +#define RIG_VFO_MAIN_C RIG_VFO_N(4) + +/** \brief \c Sub -- alias for SUB */ +#define RIG_VFO_SUB RIG_VFO_N(25) + +/** \brief \c Main -- alias for MAIN */ +#define RIG_VFO_MAIN RIG_VFO_N(26) /** \brief \c VFO -- means (last or any)VFO mode, with set_vfo */ -#define RIG_VFO_VFO (1<<27) +#define RIG_VFO_VFO RIG_VFO_N(27) + +/** \brief \c MEM -- means Memory mode, to be used with set_vfo */ +#define RIG_VFO_MEM RIG_VFO_N(28) + +/** \brief \c currVFO -- current "tunable channel"/VFO */ +#define RIG_VFO_CURR RIG_VFO_N(29) + +/** \brief \c Flag to set if VFO can transmit */ +#define RIG_VFO_TX_FLAG RIG_VFO_N(30) +/** \brief \c Flag to set all VFOS */ +#define RIG_VFO_ALL RIG_VFO_N(31) + +// we can also use RIG_VFO_N(31) if needed + +// Misc VFO Macros + +/** \brief \c Macro to tell you if VFO can transmit */ #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG) /** \brief \c TX -- alias for split tx or uplink, of VFO_CURR */ @@ -371,39 +483,57 @@ typedef int vfo_t; /** \brief \c RX -- alias for split rx or downlink */ #define RIG_VFO_RX RIG_VFO_CURR -/** \brief \c Main -- alias for MAIN */ -#define RIG_VFO_MAIN (1<<26) - -/** \brief \c Sub -- alias for SUB */ -#define RIG_VFO_SUB (1<<25) - -#define RIG_VFO_N(n) (1<<(n)) - -/** \brief \c VFOA -- VFO A */ -#define RIG_VFO_A RIG_VFO_N(0) -/** \brief \c VFOB -- VFO B */ -#define RIG_VFO_B RIG_VFO_N(1) -/** \brief \c VFOC -- VFO C */ -#define RIG_VFO_C RIG_VFO_N(2) - /* * targetable bitfields, for internal use. - * RIG_TARGETABLE_PURE means a pure targetable radio on every command + * In rig.c lack of a flag will case a VFO change if needed + * So setting this flag will mean the backend handles any VFO needs + * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping */ +//! @cond Doxygen_Suppress #define RIG_TARGETABLE_NONE 0 #define RIG_TARGETABLE_FREQ (1<<0) -#define RIG_TARGETABLE_MODE (1<<1) -#define RIG_TARGETABLE_PURE (1<<2) +#define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos +#define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it #define RIG_TARGETABLE_TONE (1<<3) #define RIG_TARGETABLE_FUNC (1<<4) +#define RIG_TARGETABLE_LEVEL (1<<5) +#define RIG_TARGETABLE_RITXIT (1<<6) +#define RIG_TARGETABLE_PTT (1<<7) +#define RIG_TARGETABLE_MEM (1<<8) +#define RIG_TARGETABLE_BANK (1<<9) +#define RIG_TARGETABLE_ANT (1<<10) +#define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO +#define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK) #define RIG_TARGETABLE_ALL 0x7fffffff - - +//! @endcond +// +// +// Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub +// Compared to older rigs which have one or the other +// So we need to distinguish between them +//! @cond Doxygen_Suppress +#define VFO_HAS_A_B ((rig->state.vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B)) +#define VFO_HAS_MAIN_SUB ((rig->state.vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB)) +#define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB) +#define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB) +#define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB)) +#define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B) +#define VFO_HAS_DUAL ((rig->state.vfo_list & VFO_DUAL) == VFO_DUAL) +//! @endcond + +/** + * \brief Macro for bandpass to be set to normal + * \def RIG_PASSBAND_NORMAL + */ #define RIG_PASSBAND_NORMAL s_Hz(0) + +/** + * \brief Macro for bandpass to be left alone + */ #define RIG_PASSBAND_NOCHANGE s_Hz(-1) + /** - * \brief Passband width, in Hz * * \sa rig_passband_normal(), rig_passband_narrow(), rig_passband_wide() */ @@ -431,7 +561,9 @@ typedef enum { RIG_DCD_SERIAL_CTS, /*!< DCD status from serial CTS signal */ RIG_DCD_SERIAL_CAR, /*!< DCD status from serial CD signal */ RIG_DCD_PARALLEL, /*!< DCD status from parallel port pin */ - RIG_DCD_CM108 /*!< DCD status from CM108 vol dn pin */ + RIG_DCD_CM108, /*!< DCD status from CM108 vol dn pin */ + RIG_DCD_GPIO, /*!< DCD status from GPIO pin */ + RIG_DCD_GPION, /*!< DCD status from inverted GPIO pin */ } dcd_type_t; @@ -439,7 +571,7 @@ typedef enum { * \brief PTT status */ typedef enum { - RIG_PTT_OFF = 0, /*!< PTT desactivated */ + RIG_PTT_OFF = 0, /*!< PTT deactivated */ RIG_PTT_ON, /*!< PTT activated */ RIG_PTT_ON_MIC, /*!< PTT Mic only, fallbacks on RIG_PTT_ON if unavailable */ RIG_PTT_ON_DATA /*!< PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable */ @@ -470,7 +602,9 @@ typedef enum { typedef enum { RIG_POWER_OFF = 0, /*!< Power off */ RIG_POWER_ON = (1 << 0), /*!< Power on */ - RIG_POWER_STANDBY = (1 << 1) /*!< Standby */ + RIG_POWER_STANDBY = (1 << 1), /*!< Standby */ + RIG_POWER_OPERATE = (1 << 2), /*!< Operate (from Standby) */ + RIG_POWER_UNKNOWN = (1 << 3) /*!< Unknown power status */ } powerstat_t; @@ -546,7 +680,9 @@ typedef enum { typedef long token_t; +//! @cond Doxygen_Suppress #define RIG_CONF_END 0 +//! @endcond /** @@ -559,6 +695,7 @@ typedef long token_t; * COMBO: val.i, starting from 0. Points to a table of strings or asci stored values. * STRING: val.s or val.cs * CHECKBUTTON: val.i 0/1 + * BINARY: val.b */ /* strongly inspired from soundmodem. Thanks Thomas! */ @@ -567,11 +704,14 @@ enum rig_conf_e { RIG_CONF_COMBO, /*!< Combo type */ RIG_CONF_NUMERIC, /*!< Numeric type integer or real */ RIG_CONF_CHECKBUTTON, /*!< on/off type */ - RIG_CONF_BUTTON /*!< Button type */ + RIG_CONF_BUTTON, /*!< Button type */ + RIG_CONF_BINARY /*!< Binary buffer type */ }; - -#define RIG_COMBO_MAX 8 +//! @cond Doxygen_Suppress +#define RIG_COMBO_MAX 16 +#define RIG_BIN_MAX 80 +//! @endcond /** * \brief Configuration parameter structure. @@ -612,10 +752,53 @@ typedef enum { } ann_t; +/** + * \brief Antenna typedef + * \typedef ant_t + */ /** * \brief Antenna number + * \def RIG_ANT_NONE + * No antenna set yet or unknown + */ +/** + * \brief Antenna conversion macro + * \def RIG_ANT_N + * Convert antenna number to bit mask + */ +/** + * \brief Macro for Ant#1 + * \def RIG_ANT_1 + */ +/** + * \brief Macro for Ant#2 + * \def RIG_ANT_2 + */ +/** + * \brief Macro for Ant#3 + * \def RIG_ANT_3 + */ +/** + * \brief Macro for Ant#4 + * \def RIG_ANT_4 */ -typedef int ant_t; +/** + * \brief Macro for Ant#5 + * \def RIG_ANT_5 + */ +/** + * \brief Antenna is on whatever "current" means + * \def RIG_ANT_CURR + */ +/** + * \brief Macro for unknown antenna + * \def RIG_ANT_UNKNOWN + */ +/** + * \brief Maximum antenna# + * \def RIG_ANT_MAX + */ +typedef unsigned int ant_t; #define RIG_ANT_NONE 0 #define RIG_ANT_N(n) ((ant_t)1<<(n)) @@ -625,6 +808,11 @@ typedef int ant_t; #define RIG_ANT_4 RIG_ANT_N(3) #define RIG_ANT_5 RIG_ANT_N(4) +#define RIG_ANT_UNKNOWN RIG_ANT_N(30) +#define RIG_ANT_CURR RIG_ANT_N(31) + +#define RIG_ANT_MAX 32 + /** * \brief AGC delay settings @@ -640,6 +828,9 @@ enum agc_level_e { RIG_AGC_AUTO }; +//! @cond Doxygen_Suppress +#define RIG_AGC_LAST RIG_AGC_AUTO +//! @endcond /** * \brief Level display meters @@ -652,7 +843,8 @@ enum meter_level_e { RIG_METER_IC = (1 << 3), /*< IC */ RIG_METER_DB = (1 << 4), /*< DB */ RIG_METER_PO = (1 << 5), /*< Power Out */ - RIG_METER_VDD = (1 << 6) /*< Final Amp Voltage */ + RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */ + RIG_METER_TEMP = (1 << 7) /*< Final Amp Voltage */ }; @@ -662,10 +854,16 @@ enum meter_level_e { * \sa rig_set_level(), rig_get_level(), rig_set_parm(), rig_get_parm() */ typedef union { - signed int i; /*!< Signed integer */ - float f; /*!< Single precision float */ - char *s; /*!< Pointer to char string */ - const char *cs; /*!< Pointer to constant char string */ + signed int i; /*!< Signed integer */ + float f; /*!< Single precision float */ + char *s; /*!< Pointer to char string */ + const char *cs; /*!< Pointer to constant char string */ +//! @cond Doxygen_Suppress + struct { + int l; /*!< Length of data */ + unsigned char *d; /* Pointer to data buffer */ + } b; +//! @endcond } value_t; @@ -677,51 +875,84 @@ typedef union { * * \sa rig_parse_level(), rig_strlevel() */ -enum rig_level_e { - RIG_LEVEL_NONE = 0, /*!< '' -- No Level */ - RIG_LEVEL_PREAMP = (1 << 0), /*!< \c PREAMP -- Preamp, arg int (dB) */ - RIG_LEVEL_ATT = (1 << 1), /*!< \c ATT -- Attenuator, arg int (dB) */ - RIG_LEVEL_VOX = (1 << 2), /*!< \c VOX -- VOX delay, arg int (tenth of seconds) */ - RIG_LEVEL_AF = (1 << 3), /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */ - RIG_LEVEL_RF = (1 << 4), /*!< \c RF -- RF gain (not TX power), arg float [0.0 ... 1.0] */ - RIG_LEVEL_SQL = (1 << 5), /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */ - RIG_LEVEL_IF = (1 << 6), /*!< \c IF -- IF, arg int (Hz) */ - RIG_LEVEL_APF = (1 << 7), /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */ - RIG_LEVEL_NR = (1 << 8), /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */ - RIG_LEVEL_PBT_IN = (1 << 9), /*!< \c PBT_IN -- Twin PBT (inside), arg float [0.0 ... 1.0] */ - RIG_LEVEL_PBT_OUT = (1 << 10), /*!< \c PBT_OUT -- Twin PBT (outside), arg float [0.0 ... 1.0] */ - RIG_LEVEL_CWPITCH = (1 << 11), /*!< \c CWPITCH -- CW pitch, arg int (Hz) */ - RIG_LEVEL_RFPOWER = (1 << 12), /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */ - RIG_LEVEL_MICGAIN = (1 << 13), /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */ - RIG_LEVEL_KEYSPD = (1 << 14), /*!< \c KEYSPD -- Key Speed, arg int (WPM) */ - RIG_LEVEL_NOTCHF = (1 << 15), /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */ - RIG_LEVEL_COMP = (1 << 16), /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */ - RIG_LEVEL_AGC = (1 << 17), /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */ - RIG_LEVEL_BKINDL = (1 << 18), /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */ - RIG_LEVEL_BALANCE = (1 << 19), /*!< \c BAL -- Balance (Dual Watch), arg float [0.0 ... 1.0] */ - RIG_LEVEL_METER = (1 << 20), /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */ - RIG_LEVEL_VOXGAIN = (1 << 21), /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */ - RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX, /*!< Synonym of RIG_LEVEL_VOX */ - RIG_LEVEL_ANTIVOX = (1 << 22), /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */ - RIG_LEVEL_SLOPE_LOW = (1 << 23), /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, */ - RIG_LEVEL_SLOPE_HIGH = (1 << 24), /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, */ - RIG_LEVEL_BKIN_DLYMS = (1 << 25), /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */ +typedef uint64_t rig_level_e; +#define RIG_LEVEL_NONE 0 /*!< '' -- No Level */ +#define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0) /*!< \c PREAMP -- Preamp, arg int (dB) */ +#define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1) /*!< \c ATT -- Attenuator, arg int (dB) */ +#define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2) /*!< \c VOXDELAY -- VOX delay, arg int (tenth of seconds) */ +#define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3) /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4) /*!< \c RF -- RF gain (not TX power) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5) /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6) /*!< \c IF -- IF, arg int (Hz) */ +#define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7) /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8) /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9) /*!< \c PBT_IN -- Twin PBT (inside) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10) /*!< \c PBT_OUT -- Twin PBT (outside) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11) /*!< \c CWPITCH -- CW pitch, arg int (Hz) */ +#define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12) /*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13) /*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14) /*!< \c KEYSPD -- Key Speed, arg int (WPM) */ +#define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15) /*!< \c NOTCHF -- Notch Freq., arg int (Hz) */ +#define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16) /*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17) /*!< \c AGC -- AGC, arg int (see enum agc_level_e) */ +#define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18) /*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */ +#define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19) /*!< \c BAL -- Balance (Dual Watch) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20) /*!< \c METER -- Display meter, arg int (see enum meter_level_e) */ +#define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21) /*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22) /*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23) /*!< \c SLOPE_LOW -- Slope tune, low frequency cut, arg int (Hz) */ +#define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24) /*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, arg int (Hz) */ +#define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25) /*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */ /*!< These are not settable */ - RIG_LEVEL_RAWSTR = (1 << 26), /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */ - RIG_LEVEL_SQLSTAT = (1 << 27), /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */ - RIG_LEVEL_SWR = (1 << 28), /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */ - RIG_LEVEL_ALC = (1 << 29), /*!< \c ALC -- ALC, arg float */ - RIG_LEVEL_STRENGTH = (1 << 30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ - /* RIG_LEVEL_BWC = (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */ -}; - -#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX) - -#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR) +#define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26) /*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */ +//#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */ +#define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28) /*!< \c SWR -- SWR, arg float [0.0 ... infinite] */ +#define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29) /*!< \c ALC -- ALC, arg float */ +#define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ + /* RIG_LEVEL_BWC (1<<31) */ /*!< Bandwidth Control, arg int (Hz) */ +#define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32) /*!< \c RFPOWER_METER -- RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power) */ +#define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33) /*!< \c COMP_METER -- Audio output level compression meter, arg float (dB) */ +#define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34) /*!< \c VD_METER -- Input voltage level meter, arg float (V, volts) */ +#define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35) /*!< \c ID_METER -- Current draw meter, arg float (A, amperes) */ + +#define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36) /*!< \c NOTCHF_RAW -- Notch Freq., arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37) /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38) /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */ +#define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39) /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */ +#define RIG_LEVEL_40 CONSTANT_64BIT_FLAG(40) /*!< \c Future use */ +#define RIG_LEVEL_41 CONSTANT_64BIT_FLAG(41) /*!< \c Future use */ +#define RIG_LEVEL_42 CONSTANT_64BIT_FLAG(42) /*!< \c Future use */ +#define RIG_LEVEL_43 CONSTANT_64BIT_FLAG(43) /*!< \c Future use */ +#define RIG_LEVEL_44 CONSTANT_64BIT_FLAG(44) /*!< \c Future use */ +#define RIG_LEVEL_45 CONSTANT_64BIT_FLAG(45) /*!< \c Future use */ +#define RIG_LEVEL_46 CONSTANT_64BIT_FLAG(46) /*!< \c Future use */ +#define RIG_LEVEL_47 CONSTANT_64BIT_FLAG(47) /*!< \c Future use */ +#define RIG_LEVEL_48 CONSTANT_64BIT_FLAG(48) /*!< \c Future use */ +#define RIG_LEVEL_49 CONSTANT_64BIT_FLAG(49) /*!< \c Future use */ +#define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */ +#define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51) /*!< \c Future use */ +#define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52) /*!< \c Future use */ +#define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53) /*!< \c Future use */ +#define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54) /*!< \c Future use */ +#define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55) /*!< \c Future use */ +#define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56) /*!< \c Future use */ +#define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57) /*!< \c Future use */ +#define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58) /*!< \c Future use */ +#define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59) /*!< \c Future use */ +#define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60) /*!< \c Future use */ +#define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61) /*!< \c Future use */ +#define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62) /*!< \c Future use */ +#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */ + +//! @cond Doxygen_Suppress +#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB) + +#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER) #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST) #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST) +//! @endcond /** @@ -740,17 +971,17 @@ enum rig_parm_e { RIG_PARM_BEEP = (1 << 4), /*!< \c BEEP -- Beep on keypressed, int (0,1) */ RIG_PARM_TIME = (1 << 5), /*!< \c TIME -- hh:mm:ss, int in seconds from 00:00:00 */ RIG_PARM_BAT = (1 << 6), /*!< \c BAT -- battery level, float [0.0 ... 1.0] */ - RIG_PARM_KEYLIGHT = (1 << 7) /*!< \c KEYLIGHT -- Button backlight, on/off */ + RIG_PARM_KEYLIGHT = (1 << 7), /*!< \c KEYLIGHT -- Button backlight, on/off */ + RIG_PARM_SCREENSAVER = (1 << 8) /*!< \c SCREENSAVER -- rig specific timeouts */ }; -#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT) +//! @cond Doxygen_Suppress +#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT) #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT) #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST) #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST) - - -#define RIG_SETTING_MAX 32 +//! @endcond /** * \brief Setting @@ -758,12 +989,26 @@ enum rig_parm_e { * This can be a func, a level or a parm. * Each bit designates one of them. */ -typedef unsigned long setting_t; +typedef uint64_t setting_t; /** - * \brief Tranceive mode + * \brief Maximum # of rig settings * + */ +#define RIG_SETTING_MAX 64 + +/** + * \brief Tranceive mode * The rig notifies the host of any event, like freq changed, mode changed, etc. + * \def RIG_TRN_OFF + * Turn it off + * \brief Tranceive mode + * \def RIG_TRN_RIG + * RIG_TRN_RIG means the rig acts asynchrousnly + * \brief Tranceive mode + * \def RIG_TRN_POLL + * RIG_TRN_POLL means we have to poll the rig + * */ #define RIG_TRN_OFF 0 #define RIG_TRN_RIG 1 @@ -781,57 +1026,113 @@ typedef unsigned long setting_t; /* * The C standard dictates that an enum constant is a 32 bit signed integer. * Setting a constant's bit 31 created a negative value that on amd64 had the - * upper 32 bits set as well when assigned to the misc.c:func_str structure. + * upper 32 bits set as well when assigned to the misc.c:rig_func_str structure. * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros * have been used instead as a 'const unsigned long' which cannot be used to - * initialize the func_str.func members. TNX KA6MAL, AC6SL. - N0NB - */ -#define RIG_FUNC_NONE 0 /*!< '' -- No Function */ -#define RIG_FUNC_FAGC (1UL<<0) /*!< \c FAGC -- Fast AGC */ -#define RIG_FUNC_NB (1UL<<1) /*!< \c NB -- Noise Blanker */ -#define RIG_FUNC_COMP (1UL<<2) /*!< \c COMP -- Speech Compression */ -#define RIG_FUNC_VOX (1UL<<3) /*!< \c VOX -- Voice Operated Relay */ -#define RIG_FUNC_TONE (1UL<<4) /*!< \c TONE -- CTCSS Tone */ -#define RIG_FUNC_TSQL (1UL<<5) /*!< \c TSQL -- CTCSS Activate/De-activate */ -#define RIG_FUNC_SBKIN (1UL<<6) /*!< \c SBKIN -- Semi Break-in (CW mode) */ -#define RIG_FUNC_FBKIN (1UL<<7) /*!< \c FBKIN -- Full Break-in (CW mode) */ -#define RIG_FUNC_ANF (1UL<<8) /*!< \c ANF -- Automatic Notch Filter (DSP) */ -#define RIG_FUNC_NR (1UL<<9) /*!< \c NR -- Noise Reduction (DSP) */ -#define RIG_FUNC_AIP (1UL<<10) /*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */ -#define RIG_FUNC_APF (1UL<<11) /*!< \c APF -- Auto Passband/Audio Peak Filter */ -#define RIG_FUNC_MON (1UL<<12) /*!< \c MON -- Monitor transmitted signal */ -#define RIG_FUNC_MN (1UL<<13) /*!< \c MN -- Manual Notch */ -#define RIG_FUNC_RF (1UL<<14) /*!< \c RF -- RTTY Filter */ -#define RIG_FUNC_ARO (1UL<<15) /*!< \c ARO -- Auto Repeater Offset */ -#define RIG_FUNC_LOCK (1UL<<16) /*!< \c LOCK -- Lock */ -#define RIG_FUNC_MUTE (1UL<<17) /*!< \c MUTE -- Mute */ -#define RIG_FUNC_VSC (1UL<<18) /*!< \c VSC -- Voice Scan Control */ -#define RIG_FUNC_REV (1UL<<19) /*!< \c REV -- Reverse transmit and receive frequencies */ -#define RIG_FUNC_SQL (1UL<<20) /*!< \c SQL -- Turn Squelch Monitor on/off */ -#define RIG_FUNC_ABM (1UL<<21) /*!< \c ABM -- Auto Band Mode */ -#define RIG_FUNC_BC (1UL<<22) /*!< \c BC -- Beat Canceller */ -#define RIG_FUNC_MBC (1UL<<23) /*!< \c MBC -- Manual Beat Canceller */ -#define RIG_FUNC_RIT (1UL<<24) /*!< \c RIT -- Receiver Incremental Tuning */ -#define RIG_FUNC_AFC (1UL<<25) /*!< \c AFC -- Auto Frequency Control ON/OFF */ -#define RIG_FUNC_SATMODE (1UL<<26) /*!< \c SATMODE -- Satellite mode ON/OFF */ -#define RIG_FUNC_SCOPE (1UL<<27) /*!< \c SCOPE -- Simple bandscope ON/OFF */ -#define RIG_FUNC_RESUME (1UL<<28) /*!< \c RESUME -- Scan auto-resume */ -#define RIG_FUNC_TBURST (1UL<<29) /*!< \c TBURST -- 1750 Hz tone burst */ -#define RIG_FUNC_TUNER (1UL<<30) /*!< \c TUNER -- Enable automatic tuner */ -#define RIG_FUNC_XIT (1UL<<31) /*!< \c XIT -- Transmitter Incremental Tuning */ - + * initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB + */ +#define RIG_FUNC_NONE 0 /*!< '' -- No Function */ +#define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0) /*!< \c FAGC -- Fast AGC */ +#define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1) /*!< \c NB -- Noise Blanker */ +#define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2) /*!< \c COMP -- Speech Compression */ +#define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3) /*!< \c VOX -- Voice Operated Relay */ +#define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4) /*!< \c TONE -- CTCSS Tone TX */ +#define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5) /*!< \c TSQL -- CTCSS Activate/De-activate RX */ +#define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6) /*!< \c SBKIN -- Semi Break-in (CW mode) */ +#define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7) /*!< \c FBKIN -- Full Break-in (CW mode) */ +#define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8) /*!< \c ANF -- Automatic Notch Filter (DSP) */ +#define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9) /*!< \c NR -- Noise Reduction (DSP) */ +#define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10) /*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */ +#define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11) /*!< \c APF -- Auto Passband/Audio Peak Filter */ +#define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12) /*!< \c MON -- Monitor transmitted signal */ +#define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13) /*!< \c MN -- Manual Notch */ +#define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14) /*!< \c RF -- RTTY Filter */ +#define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15) /*!< \c ARO -- Auto Repeater Offset */ +#define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16) /*!< \c LOCK -- Lock */ +#define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17) /*!< \c MUTE -- Mute */ +#define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18) /*!< \c VSC -- Voice Scan Control */ +#define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19) /*!< \c REV -- Reverse transmit and receive frequencies */ +#define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20) /*!< \c SQL -- Turn Squelch Monitor on/off */ +#define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21) /*!< \c ABM -- Auto Band Mode */ +#define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22) /*!< \c BC -- Beat Canceller */ +#define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23) /*!< \c MBC -- Manual Beat Canceller */ +#define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24) /*!< \c RIT -- Receiver Incremental Tuning */ +#define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25) /*!< \c AFC -- Auto Frequency Control ON/OFF */ +#define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26) /*!< \c SATMODE -- Satellite mode ON/OFF */ +#define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27) /*!< \c SCOPE -- Simple bandscope ON/OFF */ +#define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28) /*!< \c RESUME -- Scan auto-resume */ +#define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29) /*!< \c TBURST -- 1750 Hz tone burst */ +#define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30) /*!< \c TUNER -- Enable automatic tuner */ +#define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31) /*!< \c XIT -- Transmitter Incremental Tuning */ +#ifndef SWIGLUAHIDE +/* Hide the top 32 bits from the old Lua binding as they can't be represented */ +#define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32) /*!< \c NB2 -- 2nd Noise Blanker */ +#define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33) /*!< \c CSQL -- DCS Squelch setting */ +#define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34) /*!< \c AFLT -- AF Filter setting */ +#define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35) /*!< \c ANL -- Noise limiter setting */ +#define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36) /*!< \c BC2 -- 2nd Beat Cancel */ +#define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37) /*!< \c DUAL_WATCH -- Dual Watch / Sub Receiver */ +#define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38) /*!< \c DIVERSITY -- Diversity receive */ +#define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39) /*!< \c DSQL -- Digital modes squelch */ +#define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40) /*!< \c SCEN -- scrambler/encryption */ +#define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41) /*!< \c Rig slice selection -- Flex */ +#define RIG_FUNC_BIT42 CONSTANT_64BIT_FLAG (42) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT43 CONSTANT_64BIT_FLAG (43) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT44 CONSTANT_64BIT_FLAG (44) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c available for future RIG_FUNC items */ +#define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< \c available for future RIG_FUNC items */ +/* 63 is this highest bit number that can be used */ +#endif /** * \brief power unit macros - * + * \def mW * Converts a power level integer to milliwatts. This is limited to 2 - * Megawatts on 32 bit systems. + * megawatts on 32 bit systems. */ #define mW(p) ((int)(p)) +/** + * \brief power unit macros + * \def Watts + * + * Converts a power level integer to watts. This is limited to 2 + * gigawatts on 32 bit systems. + */ #define Watts(p) ((int)((p)*1000)) +/** + * \brief power unit macros + * \def W + * + * Same as Watts for the person who is too lazy to type Watts :-) + */ #define W(p) Watts(p) +#if 0 // deprecating kW macro as this doesn't make sense +/** + * \brief power unit macros + * \def kW + * + * Same as Watts for the person who is too lazy to type Watts :-) + */ #define kW(p) ((int)((p)*1000000L)) +#endif /** @@ -841,33 +1142,77 @@ typedef unsigned long setting_t; * \c STRING used in rigctl * * \sa rig_parse_mode(), rig_strrmode() - */ -typedef enum { - RIG_MODE_NONE = 0, /*!< '' -- None */ - RIG_MODE_AM = (1 << 0), /*!< \c AM -- Amplitude Modulation */ - RIG_MODE_CW = (1 << 1), /*!< \c CW -- CW "normal" sideband */ - RIG_MODE_USB = (1 << 2), /*!< \c USB -- Upper Side Band */ - RIG_MODE_LSB = (1 << 3), /*!< \c LSB -- Lower Side Band */ - RIG_MODE_RTTY = (1 << 4), /*!< \c RTTY -- Radio Teletype */ - RIG_MODE_FM = (1 << 5), /*!< \c FM -- "narrow" band FM */ - RIG_MODE_WFM = (1 << 6), /*!< \c WFM -- broadcast wide FM */ - RIG_MODE_CWR = (1 << 7), /*!< \c CWR -- CW "reverse" sideband */ - RIG_MODE_RTTYR = (1 << 8), /*!< \c RTTYR -- RTTY "reverse" sideband */ - RIG_MODE_AMS = (1 << 9), /*!< \c AMS -- Amplitude Modulation Synchronous */ - RIG_MODE_PKTLSB = (1 << 10), /*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */ - RIG_MODE_PKTUSB = (1 << 11), /*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */ - RIG_MODE_PKTFM = (1 << 12), /*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */ - RIG_MODE_ECSSUSB = (1 << 13), /*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */ - RIG_MODE_ECSSLSB = (1 << 14), /*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */ - RIG_MODE_FAX = (1 << 15), /*!< \c FAX -- Facsimile Mode */ - RIG_MODE_SAM = (1 << 16), /*!< \c SAM -- Synchronous AM double sideband */ - RIG_MODE_SAL = (1 << 17), /*!< \c SAL -- Synchronous AM lower sideband */ - RIG_MODE_SAH = (1 << 18), /*!< \c SAH -- Synchronous AM upper (higher) sideband */ - RIG_MODE_DSB = (1 << 19), /*!< \c DSB -- Double sideband suppressed carrier */ - RIG_MODE_FMN = (1 << 21), /*!< \c FMN -- FM Narrow Kenwood ts990s */ - RIG_MODE_TESTS_MAX /*!< \c MUST ALWAYS BE LAST, Max Count for dumpcaps.c */ -} rmode_t; - + * TODO: Add new 8600 modes to rig2icom_mode() and icom2rig_mode() in frame.c + */ +typedef uint64_t rmode_t; + +#define RIG_MODE_NONE 0 /*!< '' -- None */ +#define RIG_MODE_AM CONSTANT_64BIT_FLAG (0) /*!< \c AM -- Amplitude Modulation */ +#define RIG_MODE_CW CONSTANT_64BIT_FLAG (1) /*!< \c CW -- CW "normal" sideband */ +#define RIG_MODE_USB CONSTANT_64BIT_FLAG (2) /*!< \c USB -- Upper Side Band */ +#define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3) /*!< \c LSB -- Lower Side Band */ +#define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4) /*!< \c RTTY -- Radio Teletype */ +#define RIG_MODE_FM CONSTANT_64BIT_FLAG (5) /*!< \c FM -- "narrow" band FM */ +#define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6) /*!< \c WFM -- broadcast wide FM */ +#define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7) /*!< \c CWR -- CW "reverse" sideband */ +#define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8) /*!< \c RTTYR -- RTTY "reverse" sideband */ +#define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9) /*!< \c AMS -- Amplitude Modulation Synchronous */ +#define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10) /*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */ +#define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11) /*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */ +#define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12) /*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */ +#define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13) /*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */ +#define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14) /*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */ +#define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15) /*!< \c FAX -- Facsimile Mode */ +#define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16) /*!< \c SAM -- Synchronous AM double sideband */ +#define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17) /*!< \c SAL -- Synchronous AM lower sideband */ +#define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18) /*!< \c SAH -- Synchronous AM upper (higher) sideband */ +#define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19) /*!< \c DSB -- Double sideband suppressed carrier */ +#define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21) /*!< \c FMN -- FM Narrow Kenwood ts990s */ +#define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22) /*!< \c PKTAM -- Packet/Digital AM mode e.g. IC7300 */ +#define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23) /*!< \c P25 -- APCO/P25 VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24) /*!< \c D-Star -- VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25) /*!< \c dPMR -- digital PMR, VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26) /*!< \c NXDN-VN -- VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27) /*!< \c NXDN-N -- VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28) /*!< \c DCR -- VHF,UHF digital mode IC-R8600 */ +#define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29) /*!< \c AM-N -- Narrow band AM mode IC-R30 */ +#define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30) /*!< \c PSK - Kenwood PSK and others */ +#define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31) /*!< \c PSKR - Kenwood PSKR and others */ +#ifndef SWIGLUAHIDE +/* hide the top 32 bits from the Lua binding as they will not work */ +#define RIG_MODE_DD CONSTANT_64BIT_FLAG (32) /*!< \c DD Mode IC-9700 */ +#define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33) /*!< \c Yaesu C4FM mode */ +#define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34) /*!< \c Yaesu DATA-FM-N */ +#define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35) /*!< \c Unfiltered as in PowerSDR */ +#define RIG_MODE_BIT36 CONSTANT_64BIT_FLAG (36) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT37 CONSTANT_64BIT_FLAG (37) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT39 CONSTANT_64BIT_FLAG (39) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT40 CONSTANT_64BIT_FLAG (40) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT41 CONSTANT_64BIT_FLAG (41) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT42 CONSTANT_64BIT_FLAG (42) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT43 CONSTANT_64BIT_FLAG (43) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT44 CONSTANT_64BIT_FLAG (44) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61) /*!< \c reserved for future expansion */ +#define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62) /*!< \c reserved for future expansion */ +#define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63) /*!< \c last bit available for 64-bit enum MUST ALWAYS BE LAST, Max Count for dumpcaps.c */ +#endif /** * \brief macro for backends, not to be used by rig_set_mode et al. @@ -879,9 +1224,10 @@ typedef enum { */ #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB) - +//! @cond Doxygen_Suppress #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */ #define RIG_IS_DBLST_END(d) ((d)==0) +//! @endcond /** @@ -891,23 +1237,20 @@ typedef enum { * what frequencies your rig has access to. */ typedef struct freq_range_list { - freq_t start; /*!< Start frequency */ - freq_t end; /*!< End frequency */ + freq_t startf; /*!< Start frequency */ + freq_t endf; /*!< End frequency */ rmode_t modes; /*!< Bit field of RIG_MODE's */ int low_power; /*!< Lower RF power in mW, -1 for no power (ie. rx list) */ int high_power; /*!< Higher RF power in mW, -1 for no power (ie. rx list) */ vfo_t vfo; /*!< VFO list equipped with this range */ - ant_t ant; /*!< Antenna list equipped with this range, 0 means all */ + ant_t ant; /*!< Antenna list equipped with this range, 0 means all, RIG_ANT_CURR means dedicated to certain bands and automatically switches, no set_ant command */ + char *label; /*!< Label for this range that explains why. e.g. Icom rigs USA, EUR, ITR, TPE, KOR */ } freq_range_t; +//! @cond Doxygen_Suppress #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE} -#define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0)) - - -#define RIG_ITU_REGION1 1 -#define RIG_ITU_REGION2 2 -#define RIG_ITU_REGION3 3 - +#define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0)) +//! @endcond /** * \brief Tuning step definition @@ -930,9 +1273,11 @@ struct tuning_step_list { shortfreq_t ts; /*!< Tuning step in Hz */ }; +//! @cond Doxygen_Suppress #define RIG_TS_ANY 0 #define RIG_TS_END {RIG_MODE_NONE, 0} #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0) +//! @endcond /** @@ -962,10 +1307,11 @@ struct filter_list { rmode_t modes; /*!< Bit field of RIG_MODE's */ pbwidth_t width; /*!< Passband width in Hz */ }; - +//! @cond Doxygen_Suppress #define RIG_FLT_ANY 0 #define RIG_FLT_END {RIG_MODE_NONE, 0} #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE) +//! @endcond /** @@ -980,7 +1326,10 @@ struct filter_list { * \brief DATA port mode flag */ #define RIG_CHFLAG_DATA (1<<1) - +/** + * \brief programmed skip (PSKIP) memory channel during scan (lock out), channel_t.flags + */ +#define RIG_CHFLAG_PSKIP (1<<2) /** * \brief Extension attribute definition @@ -991,8 +1340,10 @@ struct ext_list { value_t val; /*!< Value */ }; +//! @cond Doxygen_Suppress #define RIG_EXT_END {0, {.i=0}} #define RIG_IS_EXT_END(x) ((x).token == 0) +//! @endcond /** * \brief Channel structure @@ -1005,7 +1356,7 @@ struct channel { int channel_num; /*!< Channel number */ int bank_num; /*!< Bank number */ vfo_t vfo; /*!< VFO */ - int ant; /*!< Selected antenna */ + ant_t ant; /*!< Selected antenna */ freq_t freq; /*!< Receive frequency */ rmode_t mode; /*!< Receive mode */ pbwidth_t width; /*!< Receive passband width associated with mode */ @@ -1029,8 +1380,8 @@ struct channel { tone_t dcs_code; /*!< DCS code */ tone_t dcs_sql; /*!< DCS squelch code */ int scan_group; /*!< Scan group */ - int flags; /*!< Channel flags, see RIG_CHFLAG's */ - char channel_desc[MAXCHANDESC]; /*!< Name */ + unsigned int flags; /*!< Channel flags, see RIG_CHFLAG's */ + char channel_desc[HAMLIB_MAXCHANDESC]; /*!< Name */ struct ext_list *ext_levels; /*!< Extension level value list, NULL ended. ext_levels can be NULL */ }; @@ -1118,15 +1469,17 @@ typedef enum { \endcode */ struct chan_list { - int start; /*!< Starting memory channel \b number */ - int end; /*!< Ending memory channel \b number */ + int startc; /*!< Starting memory channel \b number */ + int endc; /*!< Ending memory channel \b number */ chan_type_t type; /*!< Memory type. see chan_type_t */ channel_cap_t mem_caps; /*!< Definition of attributes that can be stored/retrieved */ }; +//! @cond Doxygen_Suppress #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE} #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE) +//! @endcond /** * \brief Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges @@ -1170,7 +1523,7 @@ struct cal_table { struct { int raw; /*!< raw (A/D) value, as returned by \a RIG_LEVEL_RAWSTR */ int val; /*!< associated value, basically the measured dB value */ - } table[MAX_CAL_LENGTH]; /*!< table of plots */ + } table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */ }; /** @@ -1187,14 +1540,45 @@ struct cal_table { */ typedef struct cal_table cal_table_t; +//! @cond Doxygen_Suppress #define EMPTY_STR_CAL { 0, { { 0, 0 }, } } +//! @endcond Doxygen_Suppress + + +/** + * \brief Calibration table struct for float values + */ +struct cal_table_float { + int size; /*!< number of plots in the table */ + struct { + int raw; /*!< raw (A/D) value */ + float val; /*!< associated value */ + } table[HAMLIB_MAX_CAL_LENGTH]; /*!< table of plots */ +}; + +/** + * \brief calibration table type for float values + * + * cal_table_float_t is a data type suited to hold linear calibration. + * cal_table_float_t.size tells the number of plots cal_table_float_t.table contains. + * + * If a value is below or equal to cal_table_float_t.table[0].raw, + * rig_raw2val_float() will return cal_table_float_t.table[0].val. + * + * If a value is greater or equal to cal_table_float_t.table[cal_table_float_t.size-1].raw, + * rig_raw2val_float() will return cal_table_float_t.table[cal_table_float_t.size-1].val. + */ +typedef struct cal_table_float cal_table_float_t; +//! @cond Doxygen_Suppress +#define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } } typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t); typedef int (* confval_cb_t)(RIG *, const struct confparams *, value_t *, rig_ptr_t); +//! @endcond /** @@ -1213,9 +1597,11 @@ typedef int (* confval_cb_t)(RIG *, * sharing the struct rig_caps of the backend, while keeping their own * customized data. * - * NB: Don't move fields around, as the backends depend on it when - * initializing their caps. + * mdblack: Don't move or add fields around without bumping the version numbers + * DLL or shared library replacement depends on order */ +//! @cond Doxygen_Suppress +#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg struct rig_caps { rig_model_t rig_model; /*!< Rig model. */ const char *model_name; /*!< Model name. */ @@ -1253,12 +1639,14 @@ struct rig_caps { const struct confparams *extparms; /*!< Extension parm list, \sa ext.c */ const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */ + const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c */ + int *ext_tokens; /*!< Extension token list */ - const tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */ - const tone_t *dcs_list; /*!< DCS code list, zero ended */ + tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */ + tone_t *dcs_list; /*!< DCS code list, zero ended */ - int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ - int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ + int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ + int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ shortfreq_t max_rit; /*!< max absolute RIT */ shortfreq_t max_xit; /*!< max absolute XIT */ shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */ @@ -1273,17 +1661,33 @@ struct rig_caps { int bank_qty; /*!< Number of banks */ int chan_desc_sz; /*!< Max length of memory channel name */ - chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */ - - freq_range_t rx_range_list1[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 1 */ - freq_range_t tx_range_list1[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 1 */ - freq_range_t rx_range_list2[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 2 */ - freq_range_t tx_range_list2[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 2 */ - - struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */ - struct filter_list filters[FLTLSTSIZ]; /*!< mode/filter table, at -6dB */ - - cal_table_t str_cal; /*!< S-meter calibration table */ + chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */ + + // As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700 + // So we currently have 5 ranges we need to deal with + // The backend for the model should fill in the label field to explain what model it is + // The the IC-9700 in ic7300.c for an example + freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #1 */ + freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #1 */ + freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #2 */ + freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #2 */ + freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #3 */ + freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #3 */ + freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #4 */ + freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #4 */ + freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list #5 */ + freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list #5 */ + + struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */ + struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< mode/filter table, at -6dB */ + + cal_table_t str_cal; /*!< S-meter calibration table */ + cal_table_float_t swr_cal; /*!< SWR meter calibration table */ + cal_table_float_t alc_cal; /*!< ALC meter calibration table */ + cal_table_float_t rfpower_meter_cal; /*!< RF power meter calibration table */ + cal_table_float_t comp_meter_cal; /*!< COMP meter calibration table */ + cal_table_float_t vd_meter_cal; /*!< Voltage meter calibration table */ + cal_table_float_t id_meter_cal; /*!< Current draw meter calibration table */ const struct confparams *cfgparams; /*!< Configuration parametres. */ const rig_ptr_t priv; /*!< Private data. */ @@ -1392,8 +1796,8 @@ struct rig_caps { int (*reset)(RIG *rig, reset_t reset); - int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant); - int (*get_ant)(RIG *rig, vfo_t vfo, ant_t *ant); + int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option); + int (*get_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx); int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val); int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val); @@ -1407,6 +1811,9 @@ struct rig_caps { int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val); int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val); + int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status); + int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status); + int (*set_ext_parm)(RIG *rig, token_t token, value_t val); int (*get_ext_parm)(RIG *rig, token_t token, value_t *val); @@ -1417,6 +1824,10 @@ struct rig_caps { int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length); int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg); + int (*stop_morse)(RIG *rig, vfo_t vfo); + int (*wait_morse)(RIG *rig, vfo_t vfo); + + int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch); int (*set_bank)(RIG *rig, vfo_t vfo, int bank); @@ -1432,13 +1843,13 @@ struct rig_caps { int (*decode_event)(RIG *rig); - int (*set_channel)(RIG *rig, const channel_t *chan); - int (*get_channel)(RIG *rig, channel_t *chan); + int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan); + int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only); const char * (*get_info)(RIG *rig); - int (*set_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t); - int (*get_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t); + int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t); + int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t); int (*set_mem_all_cb)(RIG *rig, chan_cb_t chan_cb, @@ -1449,16 +1860,161 @@ struct rig_caps { confval_cb_t parm_cb, rig_ptr_t); + int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device + int (*rig_get_vfo_info) (RIG *rig, + vfo_t vfo, + freq_t *freq, + rmode_t *mode, + pbwidth_t *width, + split_t *split); + const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */ const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */ + const char *macro_name; /*!< Rig model macro name */ +}; +//! @endcond + +/** + * \brief Enumeration of all rig_ functions + * + */ +//! @cond Doxygen_Suppress +// all functions enumerated for rig_get_function_ptr +enum rig_function_e { + RIG_FUNCTION_INIT, + RIG_FUNCTION_CLEANUP, + RIG_FUNCTION_OPEN, + RIG_FUNCTION_CLOSE, + RIG_FUNCTION_SET_FREQ, + RIG_FUNCTION_GET_FREQ, + RIG_FUNCTION_SET_MODE, + RIG_FUNCTION_GET_MODE, + RIG_FUNCTION_SET_VFO, + RIG_FUNCTION_GET_VFO, + RIG_FUNCTION_SET_PTT, + RIG_FUNCTION_GET_PTT, + RIG_FUNCTION_GET_DCD, + RIG_FUNCTION_SET_RPTR_SHIFT, + RIG_FUNCTION_GET_RPTR_SHIFT, + RIG_FUNCTION_SET_RPTR_OFFS, + RIG_FUNCTION_GET_RPTR_OFFS, + RIG_FUNCTION_SET_SPLIT_FREQ, + RIG_FUNCTION_GET_SPLIT_FREQ, + RIG_FUNCTION_SET_SPLIT_MODE, + RIG_FUNCTION_SET_SPLIT_FREQ_MODE, + RIG_FUNCTION_GET_SPLIT_FREQ_MODE, + RIG_FUNCTION_SET_SPLIT_VFO, + RIG_FUNCTION_GET_SPLIT_VFO, + RIG_FUNCTION_SET_RIT, + RIG_FUNCTION_GET_RIT, + RIG_FUNCTION_SET_XIT, + RIG_FUNCTION_GET_XIT, + RIG_FUNCTION_SET_TS, + RIG_FUNCTION_GET_TS, + RIG_FUNCTION_SET_DCS_CODE, + RIG_FUNCTION_GET_DCS_CODE, + RIG_FUNCTION_SET_TONE, + RIG_FUNCTION_GET_TONE, + RIG_FUNCTION_SET_CTCSS_TONE, + RIG_FUNCTION_GET_CTCSS_TONE, + RIG_FUNCTION_SET_DCS_SQL, + RIG_FUNCTION_GET_DCS_SQL, + RIG_FUNCTION_SET_TONE_SQL, + RIG_FUNCTION_GET_TONE_SQL, + RIG_FUNCTION_SET_CTCSS_SQL, + RIG_FUNCTION_GET_CTCSS_SQL, + RIG_FUNCTION_POWER2MW, + RIG_FUNCTION_MW2POWER, + RIG_FUNCTION_SET_POWERSTAT, + RIG_FUNCTION_GET_POWERSTAT, + RIG_FUNCTION_RESET, + RIG_FUNCTION_SET_ANT, + RIG_FUNCTION_GET_ANT, + RIG_FUNCTION_SET_LEVEL, + RIG_FUNCTION_GET_LEVEL, + RIG_FUNCTION_SET_FUNC, + RIG_FUNCTION_GET_FUNC, + RIG_FUNCTION_SET_PARM, + RIG_FUNCTION_GET_PARM, + RIG_FUNCTION_SET_EXT_LEVEL, + RIG_FUNCTION_GET_EXT_LEVEL, + RIG_FUNCTION_SET_EXT_FUNC, + RIG_FUNCTION_GET_EXT_FUNC, + RIG_FUNCTION_SET_EXT_PARM, + RIG_FUNCTION_GET_EXT_PARM, + RIG_FUNCTION_SET_CONF, + RIG_FUNCTION_GET_CONF, + RIG_FUNCTION_SEND_DTMF, + RIG_FUNCTION_SEND_MORSE, + RIG_FUNCTION_STOP_MORSE, + RIG_FUNCTION_WAIT_MORSE, + RIG_FUNCTION_SEND_VOICE_MEM, + RIG_FUNCTION_SET_BANK, + RIG_FUNCTION_SET_MEM, + RIG_FUNCTION_GET_MEM, + RIG_FUNCTION_VFO_OP, + RIG_FUNCTION_SCAN, + RIG_FUNCTION_SET_TRN, + RIG_FUNCTION_GET_TRN, + RIG_FUNCTION_DECODE_EVENT, + RIG_FUNCTION_SET_CHANNEL, + RIG_FUNCTION_GET_CHANNEL, + RIG_FUNCTION_GET_INFO, + RIG_FUNCTION_SET_CHAN_ALL_CB, + RIG_FUNCTION_GET_CHAN_ALL_CB, + RIG_FUNCTION_SET_MEM_ALL_CB, + RIG_FUNCTION_GET_MEM_ALL_CB, + RIG_FUNCTION_SET_VFO_OPT +}; + +/** + * \brief Function to return pointer to rig_* function + * + */ +//! @cond Doxygen_Suppress +extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function); + +/** + * \brief Enumeration of rig->caps values + * + */ +//! @cond Doxygen_Suppress +// values enumerated for rig->caps values +enum rig_caps_int_e { + RIG_CAPS_TARGETABLE_VFO, + RIG_CAPS_RIG_MODEL, + RIG_CAPS_PORT_TYPE, + RIG_CAPS_PTT_TYPE, + RIG_CAPS_HAS_GET_LEVEL }; +enum rig_caps_cptr_e { + RIG_CAPS_VERSION_CPTR, + RIG_CAPS_MFG_NAME_CPTR, + RIG_CAPS_MODEL_NAME_CPTR, + RIG_CAPS_STATUS_CPTR +}; + +/** + * \brief Function to return int value from rig->caps + * Does not support > 32-bit rig_caps values + */ +//! @cond Doxygen_Suppress +extern HAMLIB_EXPORT (long long) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps); + +/** + * \brief Function to return char pointer value from rig->caps + * + */ +//! @cond Doxygen_Suppress +extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps); /** * \brief Port definition * * Of course, looks like OO painstakingly programmed in C, sigh. */ +//! @cond Doxygen_Suppress typedef struct hamlib_port { union { rig_port_t rig; /*!< Communication port type */ @@ -1477,9 +2033,10 @@ typedef struct hamlib_port { } post_write_date; /*!< hamlib internal use */ int timeout; /*!< Timeout, in mS */ - int retry; /*!< Maximum number of retries, 0 to disable */ + short retry; /*!< Maximum number of retries, 0 to disable */ + short flushx; /*!< If true flush is done with read instead of TCFLUSH - MicroHam */ - char pathname[FILPATHLEN]; /*!< Port pathname */ + char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */ union { struct { @@ -1516,11 +2073,98 @@ typedef struct hamlib_port { } gpio; /*!< GPIO attributes */ } parm; /*!< Port parameter union */ } hamlib_port_t; +//! @endcond #if !defined(__APPLE__) || !defined(__cplusplus) typedef hamlib_port_t port_t; #endif +#define HAMLIB_ELAPSED_GET 0 +#define HAMLIB_ELAPSED_SET 1 +#define HAMLIB_ELAPSED_INVALIDATE 2 + +typedef enum { + HAMLIB_CACHE_ALL, // to set all cache timeouts at once + HAMLIB_CACHE_VFO, + HAMLIB_CACHE_FREQ, + HAMLIB_CACHE_MODE, + HAMLIB_CACHE_PTT, + HAMLIB_CACHE_SPLIT, + HAMLIB_CACHE_WIDTH +} hamlib_cache_t; + +typedef enum { + TWIDDLE_OFF, + TWIDDLE_ON +} twiddle_state_t; + +/** + * \brief Rig cache data + * + * This struct contains all the items we cache at the highest level + */ +struct rig_cache { + int timeout_ms; // the cache timeout for invalidating itself + vfo_t vfo; + //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1 + // other abstraction here is based on dual vfo rigs and mapped to all others + // So we have four possible states of rig + // MainA, MainB, SubA, SubB + // Main is the Main VFO and Sub is for the 2nd VFO + // Most rigs have MainA and MainB + // Dual VFO rigs can have SubA and SubB too + // For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction + freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA + freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB + freq_t freqMainC; // VFO_C, VFO_MAINC + freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs + freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs + freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs + freq_t freqMem; // VFO_MEM -- last MEM channel + rmode_t modeMainA; + rmode_t modeMainB; + rmode_t modeMainC; + rmode_t modeSubA; + rmode_t modeSubB; + rmode_t modeSubC; + rmode_t modeMem; + pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA + pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB + pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC + pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA + pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB + pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC + pbwidth_t widthMem; // if non-zero then rig has separate width for Mem + ptt_t ptt; + split_t split; + vfo_t split_vfo; // split caches two values + struct timespec time_freqMainA; + struct timespec time_freqMainB; + struct timespec time_freqMainC; + struct timespec time_freqSubA; + struct timespec time_freqSubB; + struct timespec time_freqSubC; + struct timespec time_freqMem; + struct timespec time_vfo; + struct timespec time_modeMainA; + struct timespec time_modeMainB; + struct timespec time_modeMainC; + struct timespec time_modeSubA; + struct timespec time_modeSubB; + struct timespec time_modeSubC; + struct timespec time_modeMem; + struct timespec time_widthMainA; + struct timespec time_widthMainB; + struct timespec time_widthMainC; + struct timespec time_widthSubA; + struct timespec time_widthSubB; + struct timespec time_widthSubC; + struct timespec time_widthMem; + struct timespec time_ptt; + struct timespec time_split; + int satmode; // if rig is in satellite mode +}; + /** * \brief Rig state containing live data and customized fields. @@ -1528,8 +2172,9 @@ typedef hamlib_port_t port_t; * This struct contains live data, as well as a copy of capability fields * that may be updated (ie. customized) * - * It is fine to move fields around, as this kind of struct should - * not be initialized like caps are. + * It is NOT fine to move fields around as it can break share library offset + * As of 2021-03-03 vfo_list is the last known item being reference externally + * So any additions or changes to this structure must be after vfo_list. */ struct rig_state { /* @@ -1541,17 +2186,17 @@ struct rig_state { double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */ - int itu_region; /*!< ITU region to select among freq_range_t */ - freq_range_t rx_range_list[FRQRANGESIZ]; /*!< Receive frequency range list */ - freq_range_t tx_range_list[FRQRANGESIZ]; /*!< Transmit frequency range list */ + int deprecated_itu_region; /*!< ITU region to select among freq_range_t */ + freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list */ + freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list */ - struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */ + struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]; /*!< Tuning step list */ - struct filter_list filters[FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */ + struct filter_list filters[HAMLIB_FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */ cal_table_t str_cal; /*!< S-meter calibration table */ - chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */ + chan_t chan_list[HAMLIB_CHANLSTSIZ]; /*!< Channel list, zero ended */ shortfreq_t max_rit; /*!< max absolute RIT */ shortfreq_t max_xit; /*!< max absolute XIT */ @@ -1559,8 +2204,8 @@ struct rig_state { ann_t announces; /*!< Announces bit field list */ - int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ - int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ + int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ + int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */ setting_t has_get_func; /*!< List of get functions */ setting_t has_set_func; /*!< List of set functions */ @@ -1588,15 +2233,39 @@ struct rig_state { int poll_interval; /*!< Event notification polling period in milliseconds */ freq_t current_freq; /*!< Frequency currently set */ rmode_t current_mode; /*!< Mode currently set */ + //rmode_t current_modeB; /*!< Mode currently set VFOB */ pbwidth_t current_width; /*!< Passband width currently set */ vfo_t tx_vfo; /*!< Tx VFO currently set */ - int mode_list; /*!< Complete list of modes for this rig */ + rmode_t mode_list; /*!< Complete list of modes for this rig */ + // mode_list is used by some + // so anything added to this structure must be below here int transmit; /*!< rig should be transmitting i.e. hard wired PTT asserted - used by rigs that don't do CAT while in Tx */ + freq_t lo_freq; /*!< Local oscillator frequency of any transverter */ + time_t twiddle_time; /*!< time when vfo twiddling was detected */ + int twiddle_timeout; /*!< timeout to resume from twiddling */ + // uplink allows gpredict to behave better by no reading the uplink VFO + int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ + struct rig_cache cache; + int vfo_opt; /*!< Is -o switch turned on? */ + int auto_power_on; /*!< Allow Hamlib to power on rig + automatically if supported */ + int auto_power_off; /*!< Allow Hamlib to power off rig + automatically if supported */ + int auto_disable_screensaver; /*!< Allow Hamlib to disable the + rig's screen saver automatically if + supported */ + int ptt_share; /*!< Share ptt port by open/close during get_ptt, set_ptt hogs the port while active */ + int power_now; /*!< Current RF power level in rig units */ + int power_min; /*!< Minimum RF power level in rig units */ + int power_max; /*!< Maximum RF power level in rig units */ + unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */ + int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */ + int twiddle_state; /*!< keeps track of twiddle status */ }; - +//! @cond Doxygen_Suppress typedef int (*vprintf_cb_t)(enum rig_debug_level_e, rig_ptr_t, const char *, @@ -1613,6 +2282,7 @@ typedef int (*pltune_cb_t)(RIG *, pbwidth_t *, rig_ptr_t); +//! @endcond /** * \brief Callback functions and args for rig event. @@ -1657,7 +2327,7 @@ struct rig_callbacks { * * \sa rig_init(), rig_caps(), rig_state() */ -struct rig { +struct s_rig { struct rig_caps *caps; /*!< Pointer to rig capabilities (read only) */ struct rig_state state; /*!< Rig state */ struct rig_callbacks callbacks; /*!< registered event callbacks */ @@ -1667,6 +2337,8 @@ struct rig { /* --------------- API function prototypes -----------------*/ +//! @cond Doxygen_Suppress + extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model)); extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig)); @@ -1675,6 +2347,9 @@ extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig)); * List Set/Get functions pairs */ +extern HAMLIB_EXPORT(int) +rig_flush(hamlib_port_t *port); + extern HAMLIB_EXPORT(int) rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, @@ -1702,6 +2377,21 @@ extern HAMLIB_EXPORT(int) rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo)); +extern HAMLIB_EXPORT(int) +rig_get_vfo_info HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, + freq_t *freq, + rmode_t *mode, + pbwidth_t *width, + split_t *split, + int *satmode)); + +extern HAMLIB_EXPORT(int) +rig_get_vfo_list HAMLIB_PARAMS((RIG *rig, char *buf, int buflen)); + +extern HAMLIB_EXPORT(int) +netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig)); + extern HAMLIB_EXPORT(int) rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, @@ -1914,6 +2604,17 @@ rig_get_ext_level HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val)); +extern HAMLIB_EXPORT(int) +rig_set_ext_func HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, + token_t token, + int status)); +extern HAMLIB_EXPORT(int) +rig_get_ext_func HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, + token_t token, + int *status)); + extern HAMLIB_EXPORT(int) rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, @@ -1924,6 +2625,12 @@ rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, value_t *val)); extern HAMLIB_EXPORT(int) +rig_ext_func_foreach HAMLIB_PARAMS((RIG *rig, + int (*cfunc)(RIG *, + const struct confparams *, + rig_ptr_t), + rig_ptr_t data)); +extern HAMLIB_EXPORT(int) rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG *, const struct confparams *, @@ -1970,11 +2677,16 @@ rig_cleanup HAMLIB_PARAMS((RIG *rig)); extern HAMLIB_EXPORT(int) rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - ant_t ant)); /* antenna */ + ant_t ant, /* antenna */ + value_t option)); /* optional ant info */ extern HAMLIB_EXPORT(int) rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - ant_t *ant)); + ant_t ant, + value_t *option, + ant_t *ant_curr, + ant_t *ant_tx, + ant_t *ant_rx)); extern HAMLIB_EXPORT(setting_t) rig_has_get_level HAMLIB_PARAMS((RIG *rig, @@ -2023,6 +2735,19 @@ rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *msg)); +extern HAMLIB_EXPORT(int) +rig_stop_morse HAMLIB_PARAMS((RIG *rig, + vfo_t vfo)); + +extern HAMLIB_EXPORT(int) +rig_wait_morse HAMLIB_PARAMS((RIG *rig, + vfo_t vfo)); + +extern HAMLIB_EXPORT(int) +rig_send_voice_mem HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, + int ch)); + extern HAMLIB_EXPORT(int) rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo, @@ -2057,46 +2782,56 @@ rig_has_scan HAMLIB_PARAMS((RIG *rig, scan_t scan)); extern HAMLIB_EXPORT(int) -rig_set_channel HAMLIB_PARAMS((RIG *rig, +rig_set_channel HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, const channel_t *chan)); /* mem */ extern HAMLIB_EXPORT(int) -rig_get_channel HAMLIB_PARAMS((RIG *rig, - channel_t *chan)); +rig_get_channel HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, + channel_t *chan, int read_only)); extern HAMLIB_EXPORT(int) -rig_set_chan_all HAMLIB_PARAMS((RIG *rig, +rig_set_chan_all HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, const channel_t chans[])); extern HAMLIB_EXPORT(int) -rig_get_chan_all HAMLIB_PARAMS((RIG *rig, +rig_get_chan_all HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, channel_t chans[])); extern HAMLIB_EXPORT(int) -rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, +rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t)); extern HAMLIB_EXPORT(int) -rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, +rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t)); extern HAMLIB_EXPORT(int) rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t)); extern HAMLIB_EXPORT(int) -rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig, +rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t)); extern HAMLIB_EXPORT(int) rig_set_mem_all HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, const channel_t *chan, const struct confparams *, const value_t *)); extern HAMLIB_EXPORT(int) rig_get_mem_all HAMLIB_PARAMS((RIG *rig, + vfo_t vfo, channel_t *chan, const struct confparams *, value_t *)); @@ -2144,6 +2879,18 @@ rig_set_pltune_callback HAMLIB_PARAMS((RIG *, pltune_cb_t, rig_ptr_t)); +extern HAMLIB_EXPORT(int) +rig_set_twiddle HAMLIB_PARAMS((RIG *rig, + int seconds)); + +extern HAMLIB_EXPORT(int) +rig_get_twiddle HAMLIB_PARAMS((RIG *rig, + int *seconds)); + +extern HAMLIB_EXPORT(int) +rig_set_uplink HAMLIB_PARAMS((RIG *rig, + int val)); + extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig)); @@ -2151,7 +2898,7 @@ extern HAMLIB_EXPORT(const struct rig_caps *) rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model)); extern HAMLIB_EXPORT(const freq_range_t *) -rig_get_range HAMLIB_PARAMS((const freq_range_t range_list[], +rig_get_range HAMLIB_PARAMS((const freq_range_t *range_list, freq_t freq, rmode_t mode)); @@ -2171,8 +2918,8 @@ rigerror HAMLIB_PARAMS((int errnum)); extern HAMLIB_EXPORT(int) rig_setting2idx HAMLIB_PARAMS((setting_t s)); -#define rig_idx2setting(i) (1UL<<(i)) - +extern HAMLIB_EXPORT(setting_t) +rig_idx2setting(int i); /* * Even if these functions are prefixed with "rig_", they are not rig specific * Maybe "hamlib_" would have been better. Let me know. --SF @@ -2180,11 +2927,26 @@ rig_setting2idx HAMLIB_PARAMS((setting_t s)); extern HAMLIB_EXPORT(void) rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level)); +extern HAMLIB_EXPORT(void) +rig_set_debug_time_stamp HAMLIB_PARAMS((int flag)); + #define rig_set_debug_level(level) rig_set_debug(level) extern HAMLIB_EXPORT(int) rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level)); + +// this need to be fairly big to avoid compiler warnings +#define DEBUGMSGSAVE_SIZE 24000 +extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg +extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg +extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg +#ifndef __cplusplus +#ifdef __GNUC__ +// doing the debug macro with a dummy sprintf allows gcc to check the format string +#define rig_debug(debug_level,fmt,...) do { strncpy(debugmsgsave3, debugmsgsave2,sizeof(debugmsgsave3));strncpy(debugmsgsave2, debugmsgsave, sizeof(debugmsgsave2));snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } while(0); +#endif +#endif extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...)); @@ -2206,6 +2968,10 @@ extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t), rig_ptr_t data)); +extern HAMLIB_EXPORT(int) +rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t), + rig_ptr_t data)); + extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name)); @@ -2228,6 +2994,7 @@ rig_probe HAMLIB_PARAMS((hamlib_port_t *p)); /* Misc calls */ extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode); +extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen); extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo); extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t); extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t); @@ -2252,7 +3019,21 @@ extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(()); -HAMLIB_EXPORT(void) rig_no_restore_ai(); +extern HAMLIB_EXPORT(void) rig_no_restore_ai(); + +extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection); +extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms); + +extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status); +extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode); +extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len); +extern HAMLIB_EXPORT(int) rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width); + + +typedef unsigned long rig_useconds_t; +extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec); + +//! @endcond __END_DECLS diff --git a/external/hamlib/hamlib/rig_dll.h b/external/hamlib/hamlib/rig_dll.h index 212bcd8b..a2e1d247 100644 --- a/external/hamlib/hamlib/rig_dll.h +++ b/external/hamlib/hamlib/rig_dll.h @@ -32,7 +32,7 @@ #if defined(_WIN32) && !defined(__CYGWIN__) # undef HAMLIB_IMPEXP -# undef BACKEND_IMPEXP +# undef HAMLIB_CPP_IMPEXP # undef HAMLIB_API # undef HAMLIB_EXPORT # undef HAMLIB_EXPORT_VAR @@ -53,15 +53,15 @@ /* HAMLIB_API may be set to __stdcall for VB, .. */ # define HAMLIB_API __cdecl # ifdef IN_HAMLIB -# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT +# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT # define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT # else -# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT +# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT # define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT # endif # else /* static build, only export the backend entry points for lt_dlsym */ -# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT +# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT # endif #endif @@ -70,8 +70,8 @@ #if !defined(HAMLIB_IMPEXP) # define HAMLIB_IMPEXP #endif -#if !defined(BACKEND_IMPEXP) -# define BACKEND_IMPEXP +#if !defined(HAMLIB_CPP_IMPEXP) +# define HAMLIB_CPP_IMPEXP #endif #if !defined(HAMLIB_API) # define HAMLIB_API @@ -83,8 +83,8 @@ # define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type #endif #if !defined(BACKEND_EXPORT) -# define BACKEND_EXPORT(type) BACKEND_IMPEXP type HAMLIB_API +# define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API #endif #if !defined(BACKEND_EXPORT_VAR) -# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type +# define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type #endif diff --git a/external/hamlib/hamlib/riglist.h b/external/hamlib/hamlib/riglist.h index 923cf20a..1aeac09b 100644 --- a/external/hamlib/hamlib/riglist.h +++ b/external/hamlib/hamlib/riglist.h @@ -23,8 +23,15 @@ #ifndef _RIGLIST_H #define _RIGLIST_H 1 -#define RIG_MAKE_MODEL(a,b) ((a)*100+(b)) -#define RIG_BACKEND_NUM(a) ((a)/100) +//! @cond Doxygen_Suppress + +// The rig model number is designed to fit in a 32-bit int +// As of 2020-02-18 we have 33 backends defined +// With a max of 1000 models per backend we get total a model number range of 1001-33001 +// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range +#define MAX_MODELS_PER_BACKEND 1000 +#define RIG_MAKE_MODEL(a,b) ((a)*MAX_MODELS_PER_BACKEND+(b)) +#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) /*! \file riglist.h * \brief Hamlib rig(radio) model definitions. @@ -49,7 +56,7 @@ * * The dummy backend, as the name suggests, is a backend which performs no * hardware operations and always behaves as one would expect. It can be - * thought of as a hardware simulator and is very usefull for testing client + * thought of as a hardware simulator and is very useful for testing client * applications. * * It has also been expanded to provide support to "virtual" type of rigs @@ -61,6 +68,8 @@ #define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2) #define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3) #define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4) +#define RIG_MODEL_TRXMANAGER_RIG RIG_MAKE_MODEL(RIG_DUMMY, 5) +#define RIG_MODEL_DUMMY_NOVFO RIG_MAKE_MODEL(RIG_DUMMY, 6) /* @@ -101,9 +110,17 @@ #define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31) #define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32) #define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33) -#define RIG_MODEL_FT1200 RIG_MAKE_MODEL(RIG_YAESU, 34) +#define RIG_MODEL_FTDX1200 RIG_MAKE_MODEL(RIG_YAESU, 34) #define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35) #define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36) +#define RIG_MODEL_FTDX3000 RIG_MAKE_MODEL(RIG_YAESU, 37) +#define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38) +#define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39) +#define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40) +#define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41) +#define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42) +#define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43) +#define RIG_MODEL_FTDX101MP RIG_MAKE_MODEL(RIG_YAESU, 44) /* @@ -122,7 +139,7 @@ #define RIG_MODEL_TS850 RIG_MAKE_MODEL(RIG_KENWOOD, 9) #define RIG_MODEL_TS870S RIG_MAKE_MODEL(RIG_KENWOOD, 10) #define RIG_MODEL_TS940 RIG_MAKE_MODEL(RIG_KENWOOD, 11) -#define RIG_MODEL_TS950 RIG_MAKE_MODEL(RIG_KENWOOD, 12) +#define RIG_MODEL_TS950S RIG_MAKE_MODEL(RIG_KENWOOD, 12) #define RIG_MODEL_TS950SDX RIG_MAKE_MODEL(RIG_KENWOOD, 13) #define RIG_MODEL_TS2000 RIG_MAKE_MODEL(RIG_KENWOOD, 14) #define RIG_MODEL_R5000 RIG_MAKE_MODEL(RIG_KENWOOD, 15) @@ -151,7 +168,15 @@ #define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */ #define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39) #define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */ - +#define RIG_MODEL_TS890S RIG_MAKE_MODEL(RIG_KENWOOD, 41) +#define RIG_MODEL_THD74 RIG_MAKE_MODEL(RIG_KENWOOD, 42) +#define RIG_MODEL_K3S RIG_MAKE_MODEL(RIG_KENWOOD, 43) +#define RIG_MODEL_KX2 RIG_MAKE_MODEL(RIG_KENWOOD, 44) +#define RIG_MODEL_KX3 RIG_MAKE_MODEL(RIG_KENWOOD, 45) +#define RIG_MODEL_PT8000A RIG_MAKE_MODEL(RIG_KENWOOD, 46) +#define RIG_MODEL_K4 RIG_MAKE_MODEL(RIG_KENWOOD, 47) +#define RIG_MODEL_POWERSDR RIG_MAKE_MODEL(RIG_KENWOOD, 48) +#define RIG_MODEL_MALACHITE RIG_MAKE_MODEL(RIG_KENWOOD, 49) /* * Icom @@ -190,7 +215,7 @@ #define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30) #define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31) #define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32) -#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) +//#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused #define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34) #define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35) #define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36) @@ -228,7 +253,14 @@ #define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */ #define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77) #define RIG_MODEL_IC7610 RIG_MAKE_MODEL(RIG_ICOM, 78) -/* next one is 79 */ +#define RIG_MODEL_ICR8600 RIG_MAKE_MODEL(RIG_ICOM, 79) +#define RIG_MODEL_ICR30 RIG_MAKE_MODEL(RIG_ICOM, 80) +#define RIG_MODEL_IC9700 RIG_MAKE_MODEL(RIG_ICOM, 81) +#define RIG_MODEL_ID4100 RIG_MAKE_MODEL(RIG_ICOM, 82) +#define RIG_MODEL_ID31 RIG_MAKE_MODEL(RIG_ICOM, 83) +#define RIG_MODEL_ID51 RIG_MAKE_MODEL(RIG_ICOM, 84) +#define RIG_MODEL_IC705 RIG_MAKE_MODEL(RIG_ICOM, 85) +/* next one is 86 */ /* @@ -299,7 +331,7 @@ /* * Radio Shack - * Actualy, they might be either Icom or Uniden. TBC --SF + * Actually, they might be either Icom or Uniden. TBC --SF */ #define RIG_RADIOSHACK 7 #define RIG_BACKEND_RADIOSHACK "radioshack" @@ -440,6 +472,7 @@ #define RIG_ALINCO 17 #define RIG_BACKEND_ALINCO "alinco" #define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1) +#define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2) /* @@ -492,7 +525,7 @@ /* - * VEB Funkwerk K�penick RFT + * VEB Funkwerk Köpenick RFT */ #define RIG_RFT 24 #define RIG_BACKEND_RFT "rft" @@ -571,6 +604,7 @@ #define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1) #define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2) #define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3) +#define RIG_MODEL_IC_M803 RIG_MAKE_MODEL(RIG_ICMARINE, 4) /* @@ -587,6 +621,15 @@ #define RIG_BARRETT 32 #define RIG_BACKEND_BARRETT "barrett" #define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1) +#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2) + +/* + * Elad + */ +#define RIG_ELAD 33 +#define RIG_BACKEND_ELAD "elad" +#define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1) +//! @endcond /* @@ -600,7 +643,7 @@ /*! \typedef typedef int rig_model_t \brief Convenience type definition for rig model. */ -typedef int rig_model_t; +typedef uint32_t rig_model_t; /* diff --git a/external/hamlib/hamlib/rotator.h b/external/hamlib/hamlib/rotator.h index 88bc7bde..1637a364 100644 --- a/external/hamlib/hamlib/rotator.h +++ b/external/hamlib/hamlib/rotator.h @@ -31,11 +31,13 @@ */ /** - * \file rotator.h - * \brief Hamlib rotator data structures. + * \file rotator.h + * \brief Hamlib rotator data structures. * - * This file contains the data structures and declarations for the Hamlib - * rotator API. see the rotator.c file for more details on the rotator API. + * This file contains the data structures and declarations for the Hamlib + * rotator Application Programming Interface (API). + * + * See the rotator.c file for more details on the rotator API functions. */ @@ -49,70 +51,89 @@ struct rot_state; /** - * \typedef typedef struct rot ROT - * \brief Rotator structure definition (see rot for details). + * \typedef typedef struct s_rot ROT + * \brief Main rotator handle type definition. + * + * The #ROT handle is returned by rot_init() and is passed as a parameter to + * every rotator specific API call. + * + * rot_cleanup() must be called when this handle is no longer needed. */ -typedef struct rot ROT; +typedef struct s_rot ROT; /** - * \typedef typedef float elevation_t - * \brief Type definition for elevation. + * \typedef typedef float elevation_t + * \brief Type definition for elevation. * - * The elevation_t type is used as parameter for the rot_set_position() and - * rot_get_position() functions. + * The \a elevation_t type is used as parameter for the rot_set_position() and + * rot_get_position() functions. * - * Unless specified otherwise, the unit of elevation_t is decimal degrees. + * Unless specified otherwise, the unit of \a elevation_t is decimal degrees. */ typedef float elevation_t; /** - * \typedef typedef float azimuth_t - * \brief Type definition for azimuth. + * \typedef typedef float azimuth_t + * \brief Type definition for azimuth. * - * The azimuth_t type is used as parameter for the rot_set_position() and - * rot_get_position() functions. + * The \a azimuth_t type is used as parameter for the rot_set_position() and + * rot_get_position() functions. * - * Unless specified otherwise, the unit of azimuth_t is decimal degrees. + * Unless specified otherwise, the unit of \a azimuth_t is decimal degrees. */ typedef float azimuth_t; /** - * \brief Token in the netrotctl protocol for returning error code + * \brief The token in the netrotctl protocol for returning an error condition code. */ #define NETROTCTL_RET "RPRT " /** - * \def ROT_RESET_ALL - * \brief A macro that returns the flag for the \b reset operation. - * \sa rot_reset(), rot_reset_t() + * \def ROT_RESET_ALL + * \brief A macro that returns the flag for the \b reset operation. + * + * \sa rot_reset(), rot_reset_t */ #define ROT_RESET_ALL 1 /** - * \typedef typedef int rot_reset_t - * \brief Type definition for rotator reset. + * \typedef typedef int rot_reset_t + * \brief Type definition for rotator reset. * - * The rot_reset_t type is used as parameter for the rot_reset() API - * function. + * The \a rot_reset_t type is used as parameter for the rot_reset() API + * function. */ typedef int rot_reset_t; /** - * \brief Rotator type flags + * \brief Rotator type flags for bitmasks. */ typedef enum { ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */ ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */ } rot_type_t; +//! @cond Doxygen_Suppress +/* So far only used in ests/dumpcaps_rot.c. */ #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) +//! @endcond +/** + * \def ROT_TYPE_OTHER + * \brief Other type of rotator. + * \def ROT_TYPE_AZIMUTH + * \brief Azimuth only rotator. + * \def ROT_TYPE_ELEVATION + * \brief Elevation only rotator. + * \def ROT_TYPE_AZEL + * \brief Combination azimuth/elevation rotator. + */ #define ROT_TYPE_OTHER 0 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION @@ -120,112 +141,223 @@ typedef enum { /** - * \def ROT_MOVE_UP - * \brief A macro that returns the flag for the \b UP direction. + * \def ROT_MOVE_UP + * \brief A macro that returns the flag for the \b UP direction. * - * This macro defines the value of the \b UP direction which can be - * used with the rot_move() function. + * This macro defines the value of the \b UP direction which can be + * used with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_RIGHT, ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_RIGHT, ROT_MOVE_CW */ #define ROT_MOVE_UP (1<<1) /** - * \def ROT_MOVE_DOWN - * \brief A macro that returns the flag for the \b DOWN direction. + * \def ROT_MOVE_DOWN + * \brief A macro that returns the flag for the \b DOWN direction. * - * This macro defines the value of the \b DOWN direction which can be - * used with the rot_move() function. + * This macro defines the value of the \b DOWN direction which can be + * used with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_DOWN (1<<2) /** - * \def ROT_MOVE_LEFT - * \brief A macro that returns the flag for the \b LEFT direction. + * \def ROT_MOVE_LEFT + * \brief A macro that returns the flag for the \b LEFT direction. * - * This macro defines the value of the \b LEFT direction which can be - * used with the rot_move function. + * This macro defines the value of the \b LEFT direction which can be + * used with the rot_move function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_LEFT (1<<3) /** - * \def ROT_MOVE_CCW - * \brief A macro that returns the flag for the \b counterclockwise direction. + * \def ROT_MOVE_CCW + * \brief A macro that returns the flag for the \b counterclockwise direction. * - * This macro defines the value of the \b counterclockwise direction which - * can be used with the rot_move() function. This value is equivalent to - * ROT_MOVE_LEFT . + * This macro defines the value of the \b counterclockwise direction which + * can be used with the rot_move() function. This value is equivalent to + * ROT_MOVE_LEFT. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_CCW ROT_MOVE_LEFT /** - * \def ROT_MOVE_RIGHT - * \brief A macro that returns the flag for the \b RIGHT direction. + * \def ROT_MOVE_RIGHT + * \brief A macro that returns the flag for the \b RIGHT direction. * - * This macro defines the value of the \b RIGHT direction which can be used - * with the rot_move() function. + * This macro defines the value of the \b RIGHT direction which can be used + * with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_CW */ #define ROT_MOVE_RIGHT (1<<4) /** - * \def ROT_MOVE_CW - * \brief A macro that returns the flag for the \b clockwise direction. + * \def ROT_MOVE_CW + * \brief A macro that returns the flag for the \b clockwise direction. * - * This macro defines the value of the \b clockwise direction wich can be - * used with the rot_move() function. This value is equivalent to - * ROT_MOVE_RIGHT . + * This macro defines the value of the \b clockwise direction which can be + * used with the rot_move() function. This value is equivalent to + * ROT_MOVE_RIGHT. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_RIGHT + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_RIGHT */ #define ROT_MOVE_CW ROT_MOVE_RIGHT +/** + * \brief Rotator status flags + */ +typedef enum { + ROT_STATUS_NONE = 0, /*!< '' -- No status. */ + ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */ + ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */ + ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */ + ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */ + ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */ + ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */ + ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */ + ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */ + ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */ + ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/ + ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */ + ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */ + ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */ + ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */ + ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */ + ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */ +} rot_status_t; + +//! @cond Doxygen_Suppress +/* So far only used in tests/sprintflst.c. */ +#define ROT_STATUS_N(n) (1u<<(n)) +//! @endcond + +/** + * \brief Macro for not changing the rotator speed with move() function. + */ +#define ROT_SPEED_NOCHANGE (-1) + + +/** + * \brief Rotator Level Settings. + * + * Various operating levels supported by a rotator. + * + * \c STRING used in the \c rotctl and \c rotctld utilities. + * + * \sa rot_parse_level(), rot_strlevel() + */ +enum rot_level_e { + ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */ + ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */ + ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */ +}; + + +//! @cond Doxygen_Suppress +#define ROT_LEVEL_FLOAT_LIST (0) + +#define ROT_LEVEL_READONLY_LIST (0) + +#define ROT_LEVEL_IS_FLOAT(l) ((l)&ROT_LEVEL_FLOAT_LIST) +#define ROT_LEVEL_SET(l) ((l)&~ROT_LEVEL_READONLY_LIST) +//! @endcond + + +/** @cond Doxygen_Suppress + * FIXME: The following needs more explanation about how STRING relates + * to this macro. + * @endcond + */ +/** + * \brief Rotator Parameters + * + * Parameters are settings that are not related to core rotator functionality, + * i.e. antenna rotation. + * + * \c STRING used in the \c rotctl and \c rotctld utilities. + * + * \sa rot_parse_parm(), rot_strparm() + */ +enum rot_parm_e { + ROT_PARM_NONE = 0, /*!< '' -- No Parm */ +}; + + +//! @cond Doxygen_Suppress +#define ROT_PARM_FLOAT_LIST (0) +#define ROT_PARM_READONLY_LIST (0) + +#define ROT_PARM_IS_FLOAT(l) ((l)&ROT_PARM_FLOAT_LIST) +#define ROT_PARM_SET(l) ((l)&~ROT_PARM_READONLY_LIST) +//! @endcond + + +/** @cond Doxygen_Suppress + * FIXME: The following needs more explanation about how STRING relates + * to these macros. + * @endcond + */ +/** + * \brief Rotator Function Settings. + * + * Various operating functions supported by a rotator. + * + * \c STRING used in the \c rotctl and \c rotctld utilities. + * + * \sa rot_parse_func(), rot_strfunc() + */ +#define ROT_FUNC_NONE 0 /*!< '' -- No Function */ +#ifndef SWIGLUAHIDE +/* Hide the top 32 bits from the old Lua binding as they can't be represented */ +#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */ +/* 63 is this highest bit number that can be used */ +#endif + + /* Basic rot type, can store some useful info about different rotators. Each * lib must be able to populate this structure, so we can make useful - * enquiries about capablilities. + * enquiries about capabilities. */ /** - * Rotator Caps * \struct rot_caps - * \brief Rotator data structure. + * \brief Rotator capability data structure. * - * The main idea of this struct is that it will be defined by the backend - * rotator driver, and will remain readonly for the application. Fields that - * need to be modifiable by the application are copied into the struct - * rot_state, which is a kind of private of the ROT instance. + * The main idea of this structure is that it will be defined by the backend + * rotator driver, and will remain read-only for the application. Fields that + * need to be modifiable by the application are copied into the rot_state + * structure, which is the private memory area of the #ROT instance. * - * This way, you can have several rigs running within the same application, - * sharing the struct rot_caps of the backend, while keeping their own - * customized data. + * This way, you can have several rotators running within the same + * application, sharing the rot_caps structure of the backend, while keeping + * their own customized data. * - * n.b.: Don't move fields around, as the backends depend on it when - * initializing their caps. + * \b Note: Don't move fields around and only add new fields at the end of the + * rot_caps structure. Shared libraries and DLLs depend on a constant + * structure to maintain compatibility. */ struct rot_caps { - rot_model_t rot_model; /*!< Rotator model. */ - const char *model_name; /*!< Model name. */ - const char *mfg_name; /*!< Manufacturer. */ - const char *version; /*!< Driver version. */ - const char *copyright; /*!< Copyright info. */ + rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */ + const char *model_name; /*!< Model name, e.g. TT-360. */ + const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */ + const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ + const char *copyright; /*!< Copyright info (should be LGPL). */ enum rig_status_e status; /*!< Driver status. */ int rot_type; /*!< Rotator type. */ - enum rig_port_e port_type; /*!< Type of communication port. */ + enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */ int serial_rate_min; /*!< Minimal serial speed. */ int serial_rate_max; /*!< Maximal serial speed. */ @@ -237,7 +369,24 @@ struct rot_caps { int write_delay; /*!< Write delay. */ int post_write_delay; /*!< Post-write delay. */ int timeout; /*!< Timeout. */ - int retry; /*!< Number of retry if command fails. */ + int retry; /*!< Number of retries if command fails. */ + + setting_t has_get_func; /*!< List of get functions. */ + setting_t has_set_func; /*!< List of set functions. */ + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ + setting_t has_get_parm; /*!< List of get parameters. */ + setting_t has_set_parm; /*!< List of set parameters. */ + + rot_status_t has_status; /*!< Supported status flags. */ + + gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */ + + const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */ + const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */ + const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */ + int *ext_tokens; /*!< Extension token list. */ /* * Movement range, az is relative to North @@ -251,7 +400,7 @@ struct rot_caps { max_el; /*!< Upper limit for elevation. */ - const struct confparams *cfgparams; /*!< Configuration parametres. */ + const struct confparams *cfgparams; /*!< Configuration parameters. */ const rig_ptr_t priv; /*!< Private data. */ /* @@ -259,44 +408,66 @@ struct rot_caps { * */ - int (*rot_init)(ROT *rot); - int (*rot_cleanup)(ROT *rot); - int (*rot_open)(ROT *rot); - int (*rot_close)(ROT *rot); + int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */ + int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */ + int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */ + int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */ - int (*set_conf)(ROT *rot, token_t token, const char *val); - int (*get_conf)(ROT *rot, token_t token, char *val); + int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ + int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ - int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); - int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); + int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */ + int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */ - int (*stop)(ROT *rot); - int (*park)(ROT *rot); - int (*reset)(ROT *rot, rot_reset_t reset); - int (*move)(ROT *rot, int direction, int speed); + int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */ + int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */ + int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */ + int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */ /* get firmware info, etc. */ - const char * (*get_info)(ROT *rot); + const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */ + + int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */ + int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */ + + int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */ + int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */ - /* more to come... */ + int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */ + int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */ + + int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ + int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ + + int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ + int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ + + int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ + int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ + + int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */ + + const char *macro_name; /*!< Rotator model macro name. */ }; +//! @cond Doxygen_Suppress +#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg +//! @endcond /** - * Rotator state * \struct rot_state - * \brief Live data and customized fields. + * \brief Rotator state structure * - * This struct contains live data, as well as a copy of capability fields - * that may be updated (ie. customized) + * This structure contains live data, as well as a copy of capability fields + * that may be updated, i.e. customized while the #ROT handle is instantiated. * - * It is fine to move fields around, as this kind of struct should - * not be initialized like caps are. + * It is fine to move fields around, as this kind of structure should not be + * initialized like rot_caps are. */ struct rot_state { /* @@ -306,38 +477,54 @@ struct rot_state { azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */ elevation_t min_el; /*!< Lower limit for elevation (overridable). */ elevation_t max_el; /*!< Upper limit for elevation (overridable). */ + int south_zero; /*!< South is zero degrees. */ + azimuth_t az_offset; /*!< Offset to be applied to azimuth. */ + elevation_t el_offset; /*!< Offset to be applied to elevation. */ + + setting_t has_get_func; /*!< List of get functions. */ + setting_t has_set_func; /*!< List of set functions. */ + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ + setting_t has_get_parm; /*!< List of get parameters. */ + setting_t has_set_parm; /*!< List of set parameters. */ + + rot_status_t has_status; /*!< Supported status flags. */ + + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ /* * non overridable fields, internal use */ hamlib_port_t rotport; /*!< Rotator port (internal use). */ - int comm_state; /*!< Comm port state, opened/closed. */ + int comm_state; /*!< Comm port state, i.e. opened or closed. */ rig_ptr_t priv; /*!< Pointer to private rotator state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ + int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */ /* etc... */ }; /** - * Rotator structure - * \struct rot - * \brief This is the master data structure, - * acting as a handle for the controlled rotator. + * \struct s_rot + * \brief Master rotator structure. * - * This is the master data structure, acting as a handle for the controlled - * rotator. A pointer to this structure is returned by the rot_init() API - * function and is passed as a parameter to every rotator specific API call. + * This is the master data structure acting as the #ROT handle for the + * controlled rotator. A pointer to this structure is returned by the + * rot_init() API function and is passed as a parameter to every rotator + * specific API call. * - * \sa rot_init(), rot_caps(), rot_state() + * \sa rot_init(), rot_caps, rot_state */ -struct rot { +struct s_rot { struct rot_caps *caps; /*!< Rotator caps. */ struct rot_state state; /*!< Rotator state. */ }; +//! @cond Doxygen_Suppress /* --------------- API function prototypes -----------------*/ extern HAMLIB_EXPORT(ROT *) @@ -389,9 +576,88 @@ rot_move HAMLIB_PARAMS((ROT *rot, int direction, int speed)); +extern HAMLIB_EXPORT(setting_t) +rot_has_get_level HAMLIB_PARAMS((ROT *rot, + setting_t level)); +extern HAMLIB_EXPORT(setting_t) +rot_has_set_level HAMLIB_PARAMS((ROT *rot, + setting_t level)); + +extern HAMLIB_EXPORT(setting_t) +rot_has_get_parm HAMLIB_PARAMS((ROT *rot, + setting_t parm)); +extern HAMLIB_EXPORT(setting_t) +rot_has_set_parm HAMLIB_PARAMS((ROT *rot, + setting_t parm)); + +extern HAMLIB_EXPORT(setting_t) +rot_has_get_func HAMLIB_PARAMS((ROT *rot, + setting_t func)); +extern HAMLIB_EXPORT(setting_t) +rot_has_set_func HAMLIB_PARAMS((ROT *rot, + setting_t func)); + +extern HAMLIB_EXPORT(int) +rot_set_func HAMLIB_PARAMS((ROT *rot, + setting_t func, + int status)); +extern HAMLIB_EXPORT(int) +rot_get_func HAMLIB_PARAMS((ROT *rot, + setting_t func, + int *status)); + +extern HAMLIB_EXPORT(int) +rot_set_level HAMLIB_PARAMS((ROT *rig, + setting_t level, + value_t val)); +extern HAMLIB_EXPORT(int) +rot_get_level HAMLIB_PARAMS((ROT *rig, + setting_t level, + value_t *val)); + +extern HAMLIB_EXPORT(int) +rot_set_parm HAMLIB_PARAMS((ROT *rig, + setting_t parm, + value_t val)); +extern HAMLIB_EXPORT(int) +rot_get_parm HAMLIB_PARAMS((ROT *rig, + setting_t parm, + value_t *val)); + +extern HAMLIB_EXPORT(int) +rot_set_ext_level HAMLIB_PARAMS((ROT *rig, + token_t token, + value_t val)); +extern HAMLIB_EXPORT(int) +rot_get_ext_level HAMLIB_PARAMS((ROT *rig, + token_t token, + value_t *val)); + +extern HAMLIB_EXPORT(int) +rot_set_ext_func HAMLIB_PARAMS((ROT *rig, + token_t token, + int status)); +extern HAMLIB_EXPORT(int) +rot_get_ext_func HAMLIB_PARAMS((ROT *rig, + token_t token, + int *status)); + +extern HAMLIB_EXPORT(int) +rot_set_ext_parm HAMLIB_PARAMS((ROT *rig, + token_t token, + value_t val)); +extern HAMLIB_EXPORT(int) +rot_get_ext_parm HAMLIB_PARAMS((ROT *rig, + token_t token, + value_t *val)); + extern HAMLIB_EXPORT(const char *) rot_get_info HAMLIB_PARAMS((ROT *rot)); +extern HAMLIB_EXPORT(int) +rot_get_status HAMLIB_PARAMS((ROT *rot, + rot_status_t *status)); + extern HAMLIB_EXPORT(int) rot_register HAMLIB_PARAMS((const struct rot_caps *caps)); @@ -429,6 +695,36 @@ extern HAMLIB_EXPORT(token_t) rot_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); +extern HAMLIB_EXPORT(int) +rot_ext_func_foreach HAMLIB_PARAMS((ROT *rot, + int (*cfunc)(ROT *, + const struct confparams *, + rig_ptr_t), + rig_ptr_t data)); +extern HAMLIB_EXPORT(int) +rot_ext_level_foreach HAMLIB_PARAMS((ROT *rot, + int (*cfunc)(ROT *, + const struct confparams *, + rig_ptr_t), + rig_ptr_t data)); +extern HAMLIB_EXPORT(int) +rot_ext_parm_foreach HAMLIB_PARAMS((ROT *rot, + int (*cfunc)(ROT *, + const struct confparams *, + rig_ptr_t), + rig_ptr_t data)); + +extern HAMLIB_EXPORT(const struct confparams *) +rot_ext_lookup HAMLIB_PARAMS((ROT *rot, + const char *name)); + +extern HAMLIB_EXPORT(const struct confparams *) +rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot, + token_t token)); +extern HAMLIB_EXPORT(token_t) +rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot, + const char *name)); + extern HAMLIB_EXPORT(const struct rot_caps *) rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model)); @@ -479,17 +775,25 @@ dec2dmmm HAMLIB_PARAMS((double dec, extern HAMLIB_EXPORT(double) dmmm2dec HAMLIB_PARAMS((int degrees, double minutes, + double seconds, int sw)); +extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s); +extern HAMLIB_EXPORT(setting_t) rot_parse_level(const char *s); +extern HAMLIB_EXPORT(setting_t) rot_parse_parm(const char *s); +extern HAMLIB_EXPORT(const char *) rot_strfunc(setting_t); +extern HAMLIB_EXPORT(const char *) rot_strlevel(setting_t); +extern HAMLIB_EXPORT(const char *) rot_strparm(setting_t); +extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t); + +//! @endcond /** - * \def rot_debug - * \brief Convenience definition for debug level. - * - * This is just as convenience definition of the rotator debug level, - * and is the same as for the rig debug level. + * \def rot_debug + * \brief Convenience macro for generating debugging messages. * - * \sa rig_debug() + * This is an alias of the rig_debug() function call and is used in the same + * manner. */ #define rot_debug rig_debug diff --git a/external/hamlib/hamlib/rotlist.h b/external/hamlib/hamlib/rotlist.h index a8b94362..939cad56 100644 --- a/external/hamlib/hamlib/rotlist.h +++ b/external/hamlib/hamlib/rotlist.h @@ -23,8 +23,10 @@ #ifndef _ROTLIST_H #define _ROTLIST_H 1 +//! @cond Doxygen_Suppress #define ROT_MAKE_MODEL(a,b) ((a)*100+(b)) #define ROT_BACKEND_NUM(a) ((a)/100) +//! @endcond /** @@ -33,123 +35,151 @@ */ /** - * \file rotlist.h - * \brief Hamlib rotator model definitions. + * \file rotlist.h + * \brief Hamlib rotator model definitions. * - * This file contains rotator model definitions for the Hamlib rotator API. - * Each distinct rotator type has a unique model number (ID) and is used by - * hamlib to identify and distinguish between the different hardware drivers. - * The exact model numbers can be acquired using the macros in this file. To - * obtain a list of supported rotator branches, one can use the statically - * defined ROT_BACKEND_LIST macro. To obtain a full list of supported - * rotators (including each model in every branch), the foreach_opened_rot() - * API function can be used. + * This file contains rotator model definitions for the Hamlib rotator + * Application Programming Interface (API). Each distinct rotator type has a + * unique model number (ID) and is used by Hamlib to identify and distinguish + * between the different hardware drivers. The exact model numbers can be + * acquired using the macros in this file. To obtain a list of supported + * rotator branches, one can use the statically defined ROT_BACKEND_LIST macro + * (defined in configure.ac). To obtain a full list of supported rotators + * (including each model in every branch), the foreach_opened_rot() API + * function can be used. * - * The model number, or ID, is used to tell Hamlib which rotator the client - * whishes to use. It is done with the rot_init() API call. + * The model number, or ID, is used to tell Hamlib which rotator the client + * wishes to use which is done with the rot_init() API call. */ - +/** + * \def ROT_MODEL_NONE + * \brief A macro that returns the model number for an unknown model. + * + * The none backend, as the name suggests, does nothing. It is mainly for + * internal use. + */ #define ROT_MODEL_NONE 0 /** - * \def ROT_MODEL_DUMMY - * \brief A macro that returns the model number for the dummy backend. + * \brief A macro that returns the model number for the DUMMY backend. * - * The dummy backend, as the name suggests, is a backend which performs - * no hardware operations and always behaves as one would expect. It can - * be thought of as a hardware simulator and is very usefull for testing - * client applications. + * \def ROT_MODEL_DUMMY + * + * The DUMMY backend, as the name suggests, is a backend which performs + * no hardware operations and always behaves as one would expect. It can + * be thought of as a hardware simulator and is very useful for testing + * client applications. */ /** - * \def ROT_MODEL_NETROTCTL - * \brief A macro that returns the model number for the Network backend. + * \brief A macro that returns the model number for the NETROTCTL backend. + * + * \def ROT_MODEL_NETROTCTL * - * This backend allows use of the rotctld daemon through the normal - * Hamlib API. + * The NETROTCTL backend allows use of the `rotctld` daemon through the normal + * Hamlib API. */ +//! @cond Doxygen_Suppress #define ROT_DUMMY 0 #define ROT_BACKEND_DUMMY "dummy" +//! @endcond #define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) #define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) -/* - * Easycomm +/** + * \brief A macro that returns the model number of the EASYCOMM 1 backend. + * + * \def ROT_MODEL_EASYCOMM1 + * + * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM + * I Standard. */ - /** - * \def ROT_MODEL_EASYCOMM1 - * \brief A macro that returns the model number of the EasyComm 1 backend. + * \brief A macro that returns the model number of the EASYCOMM 2 backend. + * + * \def ROT_MODEL_EASYCOMM2 * - * The EasyComm 1 backend can be used with rotators that support the - * EASYCOMM I Standard. + * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM + * II Standard. */ /** - * \def ROT_MODEL_EASYCOMM2 - * \brief A macro that returns the model number of the EasyComm 2 backend. + * \brief A macro that returns the model number of the EASYCOMM 3 backend. * - * The EasyComm 2 backend can be used with rotators that support the - * EASYCOMM II Standard. + * \def ROT_MODEL_EASYCOMM3 + * + * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM + * III Standard. */ +//! @cond Doxygen_Suppress #define ROT_EASYCOMM 2 #define ROT_BACKEND_EASYCOMM "easycomm" +//! @endcond #define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) #define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) -#define ROT_MODEL_TRAKBOX ROT_MAKE_MODEL(ROT_EASYCOMM, 3) #define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4) /** - * \def ROT_MODEL_FODTRACK - * \brief A macro that returns the model number of the Fodtrack backend. + * \brief A macro that returns the model number of the FODTRACK backend. + * + * \def ROT_MODEL_FODTRACK * - * The Fodtrack backend can be used with rotators that support the - * FODTRACK Standard. + * The FODTRACK backend can be used with rotators that support the FODTRACK + * Standard. */ +//! @cond Doxygen_Suppress #define ROT_FODTRACK 3 #define ROT_BACKEND_FODTRACK "fodtrack" +//! @endcond #define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) /** - * \def ROT_MODEL_ROTOREZ - * \brief A macro that returns the model number of the Rotor-EZ backend. + * \brief A macro that returns the model number of the ROTOREZ backend. + * + * \def ROT_MODEL_ROTOREZ * - * The Rotor-EZ backend can be used with Hy-Gain rotators that support - * the extended DCU command set by Idiom Press Rotor-EZ board. + * The ROTOREZ backend can be used with Hy-Gain rotators that support the + * extended DCU command set by the Idiom Press Rotor-EZ board. */ /** - * \def ROT_MODEL_ROTORCARD - * \brief A macro that returns the model number of the Rotor Card backend. + * \brief A macro that returns the model number of the ROTORCARD backend. * - * The Rotor-EZ backend can be used with Yaesu rotators that support the - * extended DCU command set by Idiom Press Rotor Card board. + * \def ROT_MODEL_ROTORCARD + * + * The ROTORCARD backend can be used with Yaesu rotators that support the + * extended DCU command set by the Idiom Press Rotor Card board. */ /** - * \def ROT_MODEL_DCU - * \brief A macro that returns the model number of the DCU backend. + * \brief A macro that returns the model number of the DCU backend. + * + * \def ROT_MODEL_DCU * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by Hy-Gain (currently the DCU-1). + * The DCU backend can be used with rotators that support the DCU command set + * by Hy-Gain (currently the DCU-1). */ /** - * \def ROT_MODEL_ERC - * \brief A macro that returns the model number of the ERC backend. + * \brief A macro that returns the model number of the ERC backend. * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by DF9GR (currently the ERC). + * \def ROT_MODEL_ERC + * + * The ERC backend can be used with rotators that support the DCU command set + * by DF9GR (currently the ERC). */ /** - * \def ROT_MODEL_RT21 - * \brief A macro that returns the model number of the RT21 backend. + * \brief A macro that returns the model number of the RT21 backend. + * + * \def ROT_MODEL_RT21 * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by Green Heron (currently the RT-21). + * The RT21 backend can be used with rotators that support the DCU command set + * by Green Heron (currently the RT-21). */ +//! @cond Doxygen_Suppress #define ROT_ROTOREZ 4 #define ROT_BACKEND_ROTOREZ "rotorez" +//! @endcond #define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) #define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) #define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) @@ -158,201 +188,441 @@ /** - * \def ROT_MODEL_SARTEK1 - * \brief A macro that returns the model number of the SARtek-1 backend. + * \brief A macro that returns the model number of the SARTEK1 backend. * - * The sartek backend can be used with rotators that support the SARtek - * protocol. + * \def ROT_MODEL_SARTEK1 + * + * The SARTEK1 backend can be used with rotators that support the SARtek + * protocol. */ +//! @cond Doxygen_Suppress #define ROT_SARTEK 5 #define ROT_BACKEND_SARTEK "sartek" +//! @endcond #define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) /** - * \def ROT_MODEL_GS232A - * \brief A macro that returns the model number of the GS-232A backend. + * \brief A macro that returns the model number of the GS232A backend. + * + * \def ROT_MODEL_GS232A * - * The GS-232A backend can be used with rotators that support the GS-232A - * protocol. + * The GS232A backend can be used with rotators that support the GS-232A + * protocol. */ /** - * \def ROT_MODEL_GS232 - * \brief A macro that returns the model number of the GS-232 backend. + * \brief A macro that returns the model number of the GS232 backend. * - * The GS-232 backend can be used with rotators that support the GS-232 - * protocol. + * \def ROT_MODEL_GS232_GENERIC + * + * The GS232_GENERIC backend can be used with rotators that support the + * generic (even if not coded correctly) GS-232 protocol. */ /** - * \def ROT_MODEL_GS232B - * \brief A macro that returns the model number of the GS-232B backend. + * \brief A macro that returns the model number of the GS232B backend. + * + * \def ROT_MODEL_GS232B * - * The GS-232B backend can be used with rotators that support the GS-232B - * protocol. + * The GS232B backend can be used with rotators that support the GS232B + * protocol. */ /** - * \def ROT_MODEL_F1TETRACKER - * \brief A macro that returns the model number of the F1TETRACKER backend. + * \brief A macro that returns the model number of the F1TETRACKER backend. * - * The F1TETRACKER backend can be used with rotators that support the - * F1TETRACKER protocol. + * \def ROT_MODEL_F1TETRACKER + * + * The F1TETRACKER backend can be used with rotators that support the F1TE + * Tracker protocol. */ +/** + * \brief A macro that returns the model number of the GS23 backend. + * + * \def ROT_MODEL_GS23 + * + * The GS23 backend can be used with rotators that support the GS-23 protocol. + */ +/** + * \brief A macro that returns the model number of the GS232 backend. + * + * \def ROT_MODEL_GS232 + * + * The GS232 backend can be used with rotators that support the GS-232 + * protocol. + */ +/** + * \brief A macro that returns the model number of the LVB backend. + * + * \def ROT_MODEL_LVB + * + * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB + * Tracker GS-232 based protocol. + */ +/** + * \brief A macro that returns the model number of the ST2 backend. + * + * \def ROT_MODEL_ST2 + * + * The ST2 backend can be used with rotators that support the Fox Delta ST2 + * GS-232 based protocol. + */ +/** + * \brief A macro that returns the model number of the GS232A_AZ Azimuth backend. + * + * \def ROT_MODEL_GS232A_AZ + * + * The GS232A_AZ backend can be used with azimuth rotators that support the + * GS-232A protocol. + */ +/** + * \brief A macro that returns the model number of the GS232A_EL Elevation backend. + * + * \def ROT_MODEL_GS232A_EL + * + * The GS232A_EL backend can be used with elevation rotators that support the + * GS-232A protocol. + */ +/** + * \brief A macro that returns the model number of the GS232B_AZ Azimuth backend. + * + * \def ROT_MODEL_GS232B_AZ + * + * The GS232B_AZ backend can be used with azimuth rotators that support the + * GS-232B protocol. + */ +/** + * \brief A macro that returns the model number of the GS232B_EL Elevation backend. + * + * \def ROT_MODEL_GS232B_EL + * + * The GS232B_EL backend can be used with elevation rotators that support the + * GS-232B protocol. + */ + +//! @cond Doxygen_Suppress #define ROT_GS232A 6 #define ROT_BACKEND_GS232A "gs232a" +//! @endcond #define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) -#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 2) /* Not A or B */ +#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */ #define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3) #define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4) +#define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5) +#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */ +#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7) +#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8) +#define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9) +#define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10) +#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11) +#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12) /** - * \def ROT_MODEL_PCROTOR - * \brief A macro that returns the model number of the PcRotor/WA6UFQ backend. + * \brief A macro that returns the model number of the PCROTOR backend. + * + * \def ROT_MODEL_PCROTOR * - * The kit backend can be used with home brewed rotators. + * The PCROTOR backend is a member of the kit backend group that can be used + * with home brewed rotators. */ +//! @cond Doxygen_Suppress #define ROT_KIT 7 #define ROT_BACKEND_KIT "kit" +//! @endcond #define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) /** - * \def ROT_MODEL_HD1780 - * \brief A macro that returns the model number of the HD 1780 backend. + * \brief A macro that returns the model number of the HD1780 backend. + * + * \def ROT_MODEL_HD1780 + * + * The HD1780 backend can be used with rotators that support the Heathkit + * HD-1780 protocol. */ +//! @cond Doxygen_Suppress #define ROT_HEATHKIT 8 #define ROT_BACKEND_HEATHKIT "heathkit" +//! @endcond #define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) /** - * \def ROT_MODEL_SPID_ROT2PROG - * \brief A macro that returns the model number of the ROT2PROG backend. + * \brief A macro that returns the model number of the ROT2PROG backend. + * + * \def ROT_MODEL_SPID_ROT2PROG * - * The SPID backend can be used with rotators that support the SPID protocol. + * The SPID_ROT2PROG backend can be used with rotators that support the SPID + * azimuth and elevation protocol. */ /** - * \def ROT_MODEL_SPID_ROT1PROG - * \brief A macro that returns the model number of the ROT1PROG backend. + * \brief A macro that returns the model number of the ROT1PROG backend. * - * The SPID backend can be used with rotators that support the SPID protocol. + * \def ROT_MODEL_SPID_ROT1PROG + * + * The SPID_ROT1PROG backend can be used with rotators that support the SPID + * azimuth protocol. */ /** - * \def ROT_MODEL_SPID_MD01_ROT2PROG - * \brief A macro that returns the model number of the MD-01/02 (ROT2PROG protocol) backend. + * \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend. + * + * \def ROT_MODEL_SPID_MD01_ROT2PROG * - * The SPID backend can be used with rotators that support the SPID protocol. + * The SPID_MD01_ROT2PROG backend can be used with rotators that support the + * extended SPID ROT2PROG azimuth and elevation protocol. */ +//! @cond Doxygen_Suppress #define ROT_SPID 9 #define ROT_BACKEND_SPID "spid" +//! @endcond #define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1) #define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2) #define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3) /** - * \def ROT_MODEL_RC2800 - * \brief A macro that returns the model number of the RC2800 backend. + * \brief A macro that returns the model number of the RC2800 backend. * - * The M2 backend can be used with rotators that support the RC2800 protocol - * and alike. + * \def ROT_MODEL_RC2800 + * + * The RC2800 backend can be used with rotators that support the M2 (M + * Squared) RC2800 protocol. */ +/** + * \brief A macro that returns the model number of the RC2800_EARLY_AZ + * backend. + * + * \def ROT_MODEL_RC2800_EARLY_AZ + * + * The RC2800_EARLY_AZ backend can be used with rotators that support the M2 + * (M Squared) RC2800 early azimuth protocol. + */ +/** + * \brief A macro that returns the model number of the RC2800_EARLY_AZEL + * backend. + * + * \def ROT_MODEL_RC2800_EARLY_AZEL + * + * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 + * (M Squared) RC2800 early azimuth and elevation protocol. + */ +//! @cond Doxygen_Suppress #define ROT_M2 10 #define ROT_BACKEND_M2 "m2" +//! @endcond #define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1) +#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2) +#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3) /** - * \def ROT_MODEL_RCI_AZEL - * \brief A macro that returns the model number of the RCI_AZEL backend. + * \brief A macro that returns the model number of the RCI_AZEL backend. + * + * \def ROT_MODEL_RCI_AZEL * - * The ARS backend can be used with rotators that support the ARS protocol. + * The RCI_AZEL backend can be used with rotators that support the ARS azimuth + * and elevation protocol. */ /** - * \def ROT_MODEL_RCI_AZ - * \brief A macro that returns the model number of the RCI_AZ backend. + * \brief A macro that returns the model number of the RCI_AZ backend. + * + * \def ROT_MODEL_RCI_AZ * - * The ARS backend can be used with rotators that support the ARS protocol. + * The RCI_AZ backend can be used with rotators that support the ARS azimuth + * protocol. */ +//! @cond Doxygen_Suppress #define ROT_ARS 11 #define ROT_BACKEND_ARS "ars" +//! @endcond #define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1) #define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2) /** - * \def ROT_MODEL_IF100 - * \brief A macro that returns the model number of the IF-100 backend. + * \brief A macro that returns the model number of the IF100 backend. * - * The AMSAT backend can be used with rotators that support, among other, the - * IF-100 interface. + * \def ROT_MODEL_IF100 + * + * The IF100 backend can be used with rotators that support the AMSAT IF-100 + * interface. */ +//! @cond Doxygen_Suppress #define ROT_AMSAT 12 #define ROT_BACKEND_AMSAT "amsat" +//! @endcond #define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1) /** - * \def ROT_MODEL_TS7400 - * \brief A macro that returns the model number of the TS7400 backend. + * \brief A macro that returns the model number of the TS7400 backend. + * + * \def ROT_MODEL_TS7400 * - * The TS-7400 backend supports and embedded ARM board using the TS-7400 - * Linux board. More information is at http://www.embeddedarm.com + * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux + * board. More information is at https://www.embeddedarm.com */ +//! @cond Doxygen_Suppress #define ROT_TS7400 13 #define ROT_BACKEND_TS7400 "ts7400" +//! @endcond #define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1) /** - * \def ROT_MODEL_NEXSTAR - * \brief A macro that returns the model number of the NEXSTAR backend. + * \brief A macro that returns the model number of the NEXSTAR backend. * - * The CELESTRON backend can be used with rotators that support the Celestron - * protocol and alike. + * \def ROT_MODEL_NEXSTAR + * + * The NEXSTAR backend can be used with rotators that support the Celestron + * NexStar protocol and alike. */ +//! @cond Doxygen_Suppress #define ROT_CELESTRON 14 #define ROT_BACKEND_CELESTRON "celestron" +//! @endcond #define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1) /** - * \def ROT_MODEL_ETHER6 - * \brief A macro that returns the model number of the Ether6 backend. + * \brief A macro that returns the model number of the ETHER6 backend. + * + * \def ROT_MODEL_ETHER6 * - * The Ether6 backend can be used with rotators that support the Ether6 - * protocol and alike. + * The ETHER6 backend can be used with rotators that support the Ether6 + * protocol. */ +//! @cond Doxygen_Suppress #define ROT_ETHER6 15 #define ROT_BACKEND_ETHER6 "ether6" +//! @endcond #define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1) /** - * \def ROT_MODEL_CNCTRK - * \brief A macro that returns the model number of the CNCTRK backend. + * \brief A macro that returns the model number of the CNCTRK backend. * - * The CNCTRK backend can be used with rotators that support the LinuxCNC - * running Axis GUI interface. + * \def ROT_MODEL_CNCTRK + * + * The CNCTRK backend can be used with rotators that support the LinuxCNC + * running Axis GUI interface. */ +//! @cond Doxygen_Suppress #define ROT_CNCTRK 16 #define ROT_BACKEND_CNCTRK "cnctrk" +//! @endcond #define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1) /** - * \def ROT_MODEL_PROSISTEL - * \brief A macro that returns the model number of the PROSISTEL backend. + * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend. + * + * \def ROT_MODEL_PROSISTEL_D_AZ * + * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel + * azimuth protocol. */ +/** + * \brief A macro that returns the model number of the PROSISTEL_D_EL backend. + * + * \def ROT_MODEL_PROSISTEL_D_EL + * + * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel + * elevation protocol. + */ +/** + * \brief A macro that returns the model number of the + * PROSISTEL_COMBI_TRACK_AZEL backend. + * + * \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL + * + * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that + * support the Prosistel combination azimuth and elevation protocol. + */ +//! @cond Doxygen_Suppress #define ROT_PROSISTEL 17 #define ROT_BACKEND_PROSISTEL "prosistel" -#define ROT_MODEL_PROSISTEL ROT_MAKE_MODEL(ROT_PROSISTEL, 1) +//! @endcond +#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) +#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) +#define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) /** - * \typedef typedef int rot_model_t - * \brief Convenience type definition for rotator model. + * \brief A macro that returns the model number of the MEADE backend. + * + * \def ROT_MODEL_MEADE + * + * The MEADE backend can be used with Meade telescope rotators like the + * DS-2000. + */ +//! @cond Doxygen_Suppress +#define ROT_MEADE 18 +#define ROT_BACKEND_MEADE "meade" +//! @endcond +#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1) + +/** + * \brief A macro that returns the model number of the IOPTRON backend. + * + * \def ROT_MODEL_IOPTRON + * + * The IOPTRON backend can be used with IOPTRON telescope mounts. + */ +//! @cond Doxygen_Suppress +#define ROT_IOPTRON 19 +#define ROT_BACKEND_IOPTRON "ioptron" +//! @endcond +#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1) + + +/** + * \brief A macro that returns the model number of the INDI backend. + * + * \def ROT_MODEL_INDI + * + * The INDI backend can be used with rotators that support the INDI interface. + */ +//! @cond Doxygen_Suppress +#define ROT_INDI 20 +#define ROT_BACKEND_INDI "indi" +//! @endcond +#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1) + + +/** + * \brief A macro that returns the model number of the SATEL backend. + * + * \def ROT_MODEL_SATEL + * + * The SATEL backend can be used with rotators that support the VE5FP + * interface. + */ +//! @cond Doxygen_Suppress +#define ROT_SATEL 21 +#define ROT_BACKEND_SATEL "satel" +//! @endcond +#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1) + + +/** + * \brief A macro that returns the model number of the RADANT backend. + * + * \def ROT_MODEL_RADANT + * + * The RADANT backend can be used with rotators that support the MS232 + * interface. + */ +//! @cond Doxygen_Suppress +#define ROT_RADANT 22 +#define ROT_BACKEND_RADANT "radant" +//! @endcond +#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1) + + +/** + * \brief Convenience type definition for a rotator model. + * + * \typedef typedef int rot_model_t */ typedef int rot_model_t; diff --git a/external/msvc/x86/libgcc_s_sjlj-1.dll b/external/msvc/x86/libgcc_s_sjlj-1.dll index 26edd0d6..4c3d5e84 100644 Binary files a/external/msvc/x86/libgcc_s_sjlj-1.dll and b/external/msvc/x86/libgcc_s_sjlj-1.dll differ diff --git a/src/rig/RigThread.cpp b/src/rig/RigThread.cpp index dccee9ef..60e70eb2 100644 --- a/src/rig/RigThread.cpp +++ b/src/rig/RigThread.cpp @@ -114,7 +114,7 @@ void RigThread::run() { std::cout << "Rig thread starting." << std::endl; rig = rig_init(rigModel); - strncpy(rig->state.rigport.pathname, rigFile.c_str(), FILPATHLEN - 1); + strncpy(rig->state.rigport.pathname, rigFile.c_str(), HAMLIB_FILPATHLEN - 1); rig->state.rigport.parm.serial.rate = serialRate; retcode = rig_open(rig);