hamlib 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/hamlib.h CHANGED
@@ -159,6 +159,46 @@ class NodeHamLib : public Napi::ObjectWrap<NodeHamLib> {
159
159
  // Reset Function
160
160
  Napi::Value Reset(const Napi::CallbackInfo&);
161
161
 
162
+ // Lock Mode (Hamlib >= 4.7.0)
163
+ Napi::Value SetLockMode(const Napi::CallbackInfo&);
164
+ Napi::Value GetLockMode(const Napi::CallbackInfo&);
165
+
166
+ // Clock (Hamlib >= 4.7.0)
167
+ Napi::Value SetClock(const Napi::CallbackInfo&);
168
+ Napi::Value GetClock(const Napi::CallbackInfo&);
169
+
170
+ // VFO Info (Hamlib >= 4.7.0)
171
+ Napi::Value GetVfoInfo(const Napi::CallbackInfo&);
172
+
173
+ // Rig Info / Raw / Conf (async)
174
+ Napi::Value GetInfo(const Napi::CallbackInfo&);
175
+ Napi::Value SendRaw(const Napi::CallbackInfo&);
176
+ Napi::Value SetConf(const Napi::CallbackInfo&);
177
+ Napi::Value GetConf(const Napi::CallbackInfo&);
178
+
179
+ // Passband / Resolution (sync)
180
+ Napi::Value GetPassbandNormal(const Napi::CallbackInfo&);
181
+ Napi::Value GetPassbandNarrow(const Napi::CallbackInfo&);
182
+ Napi::Value GetPassbandWide(const Napi::CallbackInfo&);
183
+ Napi::Value GetResolution(const Napi::CallbackInfo&);
184
+
185
+ // Capability queries (sync)
186
+ Napi::Value GetSupportedParms(const Napi::CallbackInfo&);
187
+ Napi::Value GetSupportedVfoOps(const Napi::CallbackInfo&);
188
+ Napi::Value GetSupportedScanTypes(const Napi::CallbackInfo&);
189
+
190
+ // Capability queries - batch 2 (sync)
191
+ Napi::Value GetPreampValues(const Napi::CallbackInfo&);
192
+ Napi::Value GetAttenuatorValues(const Napi::CallbackInfo&);
193
+ Napi::Value GetMaxRit(const Napi::CallbackInfo&);
194
+ Napi::Value GetMaxXit(const Napi::CallbackInfo&);
195
+ Napi::Value GetMaxIfShift(const Napi::CallbackInfo&);
196
+ Napi::Value GetAvailableCtcssTones(const Napi::CallbackInfo&);
197
+ Napi::Value GetAvailableDcsCodes(const Napi::CallbackInfo&);
198
+ Napi::Value GetFrequencyRanges(const Napi::CallbackInfo&);
199
+ Napi::Value GetTuningSteps(const Napi::CallbackInfo&);
200
+ Napi::Value GetFilterList(const Napi::CallbackInfo&);
201
+
162
202
  // Static method to get supported rig models
163
203
  static Napi::Value GetSupportedRigs(const Napi::CallbackInfo&);
164
204
 
@@ -169,6 +209,10 @@ class NodeHamLib : public Napi::ObjectWrap<NodeHamLib> {
169
209
  static Napi::Value SetDebugLevel(const Napi::CallbackInfo&);
170
210
  static Napi::Value GetDebugLevel(const Napi::CallbackInfo&);
171
211
 
212
+ // Static copyright/license
213
+ static Napi::Value GetCopyright(const Napi::CallbackInfo&);
214
+ static Napi::Value GetLicense(const Napi::CallbackInfo&);
215
+
172
216
  static Napi::Function GetClass(Napi::Env);
173
217
 
174
218
  // Frequency change callback (uses basic C types via shim)
@@ -43,10 +43,10 @@ SHIM_API void shim_rig_set_debug(int level) {
43
43
  }
44
44
 
45
45
  SHIM_API int shim_rig_get_debug(void) {
46
- /* Hamlib doesn't have rig_get_debug in all versions,
47
- but we use the global variable if available */
48
- #ifdef HAVE_RIG_GET_DEBUG
49
- return (int)rig_get_debug();
46
+ #ifdef SHIM_HAS_GET_DEBUG
47
+ enum rig_debug_level_e level;
48
+ rig_get_debug(&level);
49
+ return (int)level;
50
50
  #else
51
51
  return -1; /* Not available */
52
52
  #endif
@@ -448,7 +448,7 @@ SHIM_API int shim_rig_get_split_mode(hamlib_shim_handle_t h, int vfo, int* mode,
448
448
  }
449
449
 
450
450
  SHIM_API int shim_rig_set_split_freq_mode(hamlib_shim_handle_t h, int vfo, double freq, int mode, int width) {
451
- #if HAVE_RIG_SPLIT_FREQ_MODE
451
+ #ifdef SHIM_HAS_SPLIT_FREQ_MODE
452
452
  return rig_set_split_freq_mode((RIG*)h, (vfo_t)vfo, (freq_t)freq, (rmode_t)mode, (pbwidth_t)width);
453
453
  #else
454
454
  /* Fallback: set freq and mode separately */
@@ -459,7 +459,7 @@ SHIM_API int shim_rig_set_split_freq_mode(hamlib_shim_handle_t h, int vfo, doubl
459
459
  }
460
460
 
461
461
  SHIM_API int shim_rig_get_split_freq_mode(hamlib_shim_handle_t h, int vfo, double* freq, int* mode, int* width) {
462
- #if HAVE_RIG_SPLIT_FREQ_MODE
462
+ #ifdef SHIM_HAS_SPLIT_FREQ_MODE
463
463
  freq_t f = 0;
464
464
  rmode_t m = 0;
465
465
  pbwidth_t w = 0;
@@ -712,7 +712,7 @@ SHIM_API int shim_rig_send_voice_mem(hamlib_shim_handle_t h, int vfo, int ch) {
712
712
  }
713
713
 
714
714
  SHIM_API int shim_rig_stop_voice_mem(hamlib_shim_handle_t h, int vfo) {
715
- #if HAVE_RIG_STOP_VOICE_MEM
715
+ #ifdef SHIM_HAS_STOP_VOICE_MEM
716
716
  return rig_stop_voice_mem((RIG*)h, (vfo_t)vfo);
717
717
  #else
718
718
  (void)h; (void)vfo;
@@ -794,9 +794,17 @@ SHIM_API int shim_rig_set_ptt_callback(hamlib_shim_handle_t h, shim_ptt_cb_t cb,
794
794
  return rig_set_ptt_callback((RIG*)h, shim_ptt_cb_thunk, &ptt_cb_adapter);
795
795
  }
796
796
 
797
+ /* rig_set_trn: deprecated in Hamlib 4.7.0, may be removed in future versions. */
798
+ #ifdef __GNUC__
799
+ #pragma GCC diagnostic push
800
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
801
+ #endif
797
802
  SHIM_API int shim_rig_set_trn(hamlib_shim_handle_t h, int trn) {
798
803
  return rig_set_trn((RIG*)h, trn);
799
804
  }
805
+ #ifdef __GNUC__
806
+ #pragma GCC diagnostic pop
807
+ #endif
800
808
 
801
809
  /* ===== Capability queries ===== */
802
810
 
@@ -863,3 +871,299 @@ SHIM_API const char* shim_rig_type_str(int rig_type) {
863
871
  default: return "Unknown";
864
872
  }
865
873
  }
874
+
875
+ /* ===== Lock Mode (Hamlib >= 4.7.0) ===== */
876
+
877
+ SHIM_API int shim_rig_set_lock_mode(hamlib_shim_handle_t h, int lock) {
878
+ #ifdef SHIM_HAS_LOCK_MODE
879
+ RIG *rig = (RIG *)h;
880
+ if (!rig) return -RIG_EINVAL;
881
+ return rig_set_lock_mode(rig, lock);
882
+ #else
883
+ (void)h; (void)lock;
884
+ return -RIG_ENIMPL;
885
+ #endif
886
+ }
887
+
888
+ SHIM_API int shim_rig_get_lock_mode(hamlib_shim_handle_t h, int *lock) {
889
+ #ifdef SHIM_HAS_LOCK_MODE
890
+ RIG *rig = (RIG *)h;
891
+ if (!rig) return -RIG_EINVAL;
892
+ return rig_get_lock_mode(rig, lock);
893
+ #else
894
+ (void)h; (void)lock;
895
+ return -RIG_ENIMPL;
896
+ #endif
897
+ }
898
+
899
+ /* ===== Clock (Hamlib >= 4.7.0) ===== */
900
+
901
+ SHIM_API int shim_rig_set_clock(hamlib_shim_handle_t h, int year, int month, int day,
902
+ int hour, int min, int sec, double msec, int utc_offset) {
903
+ #ifdef SHIM_HAS_CLOCK
904
+ RIG *rig = (RIG *)h;
905
+ if (!rig) return -RIG_EINVAL;
906
+ return rig_set_clock(rig, year, month, day, hour, min, sec, msec, utc_offset);
907
+ #else
908
+ (void)h; (void)year; (void)month; (void)day;
909
+ (void)hour; (void)min; (void)sec; (void)msec; (void)utc_offset;
910
+ return -RIG_ENIMPL;
911
+ #endif
912
+ }
913
+
914
+ SHIM_API int shim_rig_get_clock(hamlib_shim_handle_t h, int *year, int *month, int *day,
915
+ int *hour, int *min, int *sec, double *msec, int *utc_offset) {
916
+ #ifdef SHIM_HAS_CLOCK
917
+ RIG *rig = (RIG *)h;
918
+ if (!rig) return -RIG_EINVAL;
919
+ return rig_get_clock(rig, year, month, day, hour, min, sec, msec, utc_offset);
920
+ #else
921
+ (void)h; (void)year; (void)month; (void)day;
922
+ (void)hour; (void)min; (void)sec; (void)msec; (void)utc_offset;
923
+ return -RIG_ENIMPL;
924
+ #endif
925
+ }
926
+
927
+ /* ===== VFO Info (Hamlib >= 4.7.0) ===== */
928
+
929
+ SHIM_API int shim_rig_get_vfo_info(hamlib_shim_handle_t h, int vfo,
930
+ double *freq, uint64_t *mode,
931
+ long *width, int *split, int *satmode) {
932
+ #ifdef SHIM_HAS_VFO_INFO
933
+ RIG *rig = (RIG *)h;
934
+ if (!rig) return -RIG_EINVAL;
935
+ freq_t f = 0;
936
+ rmode_t m = 0;
937
+ pbwidth_t w = 0;
938
+ split_t s = RIG_SPLIT_OFF;
939
+ int sm = 0;
940
+ int ret = rig_get_vfo_info(rig, (vfo_t)vfo, &f, &m, &w, &s, &sm);
941
+ if (freq) *freq = (double)f;
942
+ if (mode) *mode = (uint64_t)m;
943
+ if (width) *width = (long)w;
944
+ if (split) *split = (int)s;
945
+ if (satmode) *satmode = sm;
946
+ return ret;
947
+ #else
948
+ (void)h; (void)vfo; (void)freq; (void)mode; (void)width; (void)split; (void)satmode;
949
+ return -RIG_ENIMPL;
950
+ #endif
951
+ }
952
+
953
+ /* ===== Rig info / Raw / Conf ===== */
954
+
955
+ SHIM_API const char* shim_rig_get_info(hamlib_shim_handle_t h) {
956
+ RIG *rig = (RIG *)h;
957
+ if (!rig) return "";
958
+ const char *info = rig_get_info(rig);
959
+ return info ? info : "";
960
+ }
961
+
962
+ SHIM_API int shim_rig_send_raw(hamlib_shim_handle_t h,
963
+ const unsigned char* send, int send_len,
964
+ unsigned char* reply, int reply_len, const unsigned char* term) {
965
+ #ifdef SHIM_HAS_SEND_RAW
966
+ RIG *rig = (RIG *)h;
967
+ if (!rig) return -RIG_EINVAL;
968
+ return rig_send_raw(rig, send, send_len, reply, reply_len, (unsigned char*)term);
969
+ #else
970
+ (void)h; (void)send; (void)send_len; (void)reply; (void)reply_len; (void)term;
971
+ return -RIG_ENIMPL;
972
+ #endif
973
+ }
974
+
975
+ SHIM_API int shim_rig_set_conf(hamlib_shim_handle_t h, const char* name, const char* val) {
976
+ RIG *rig = (RIG *)h;
977
+ if (!rig || !name || !val) return -RIG_EINVAL;
978
+ token_t token = rig_token_lookup(rig, name);
979
+ if (token == 0) return -RIG_EINVAL;
980
+ return rig_set_conf(rig, token, val);
981
+ }
982
+
983
+ SHIM_API int shim_rig_get_conf(hamlib_shim_handle_t h, const char* name, char* buf, int buflen) {
984
+ RIG *rig = (RIG *)h;
985
+ if (!rig || !name || !buf || buflen <= 0) return -RIG_EINVAL;
986
+ token_t token = rig_token_lookup(rig, name);
987
+ if (token == 0) return -RIG_EINVAL;
988
+ #ifdef SHIM_HAS_CONF2
989
+ return rig_get_conf2(rig, token, buf, buflen);
990
+ #else
991
+ return rig_get_conf(rig, token, buf);
992
+ #endif
993
+ }
994
+
995
+ /* ===== Passband / Resolution ===== */
996
+
997
+ SHIM_API int shim_rig_passband_normal(hamlib_shim_handle_t h, int mode) {
998
+ return (int)rig_passband_normal((RIG*)h, (rmode_t)mode);
999
+ }
1000
+
1001
+ SHIM_API int shim_rig_get_resolution(hamlib_shim_handle_t h, int mode) {
1002
+ RIG *rig = (RIG *)h;
1003
+ if (!rig) return 0;
1004
+ return (int)rig_get_resolution(rig, (rmode_t)mode);
1005
+ }
1006
+
1007
+ /* ===== Capability queries (parm / vfo_ops / scan) ===== */
1008
+
1009
+ SHIM_API uint64_t shim_rig_get_caps_has_get_parm(hamlib_shim_handle_t h) {
1010
+ RIG *rig = (RIG *)h;
1011
+ return (uint64_t)(rig->caps->has_get_parm);
1012
+ }
1013
+
1014
+ SHIM_API uint64_t shim_rig_get_caps_has_set_parm(hamlib_shim_handle_t h) {
1015
+ RIG *rig = (RIG *)h;
1016
+ return (uint64_t)(rig->caps->has_set_parm);
1017
+ }
1018
+
1019
+ SHIM_API int shim_rig_get_caps_vfo_ops(hamlib_shim_handle_t h) {
1020
+ RIG *rig = (RIG *)h;
1021
+ return (int)(rig->caps->vfo_ops);
1022
+ }
1023
+
1024
+ SHIM_API int shim_rig_get_caps_has_scan(hamlib_shim_handle_t h) {
1025
+ RIG *rig = (RIG *)h;
1026
+ return (int)(rig->caps->scan_ops);
1027
+ }
1028
+
1029
+ /* ===== Capability Query: Preamp/Attenuator/Max values ===== */
1030
+
1031
+ SHIM_API int shim_rig_get_caps_preamp(hamlib_shim_handle_t h, int* out, int max_count) {
1032
+ RIG *rig = (RIG *)h;
1033
+ if (!rig || !out || max_count <= 0) return 0;
1034
+ int count = 0;
1035
+ for (int i = 0; i < HAMLIB_MAXDBLSTSIZ && rig->caps->preamp[i] != 0 && count < max_count; i++) {
1036
+ out[count++] = rig->caps->preamp[i];
1037
+ }
1038
+ return count;
1039
+ }
1040
+
1041
+ SHIM_API int shim_rig_get_caps_attenuator(hamlib_shim_handle_t h, int* out, int max_count) {
1042
+ RIG *rig = (RIG *)h;
1043
+ if (!rig || !out || max_count <= 0) return 0;
1044
+ int count = 0;
1045
+ for (int i = 0; i < HAMLIB_MAXDBLSTSIZ && rig->caps->attenuator[i] != 0 && count < max_count; i++) {
1046
+ out[count++] = rig->caps->attenuator[i];
1047
+ }
1048
+ return count;
1049
+ }
1050
+
1051
+ SHIM_API long shim_rig_get_caps_max_rit(hamlib_shim_handle_t h) {
1052
+ RIG *rig = (RIG *)h;
1053
+ if (!rig) return 0;
1054
+ return (long)rig->caps->max_rit;
1055
+ }
1056
+
1057
+ SHIM_API long shim_rig_get_caps_max_xit(hamlib_shim_handle_t h) {
1058
+ RIG *rig = (RIG *)h;
1059
+ if (!rig) return 0;
1060
+ return (long)rig->caps->max_xit;
1061
+ }
1062
+
1063
+ SHIM_API long shim_rig_get_caps_max_ifshift(hamlib_shim_handle_t h) {
1064
+ RIG *rig = (RIG *)h;
1065
+ if (!rig) return 0;
1066
+ return (long)rig->caps->max_ifshift;
1067
+ }
1068
+
1069
+ /* ===== Capability Query: CTCSS/DCS lists ===== */
1070
+
1071
+ SHIM_API int shim_rig_get_caps_ctcss_list(hamlib_shim_handle_t h, unsigned int* out, int max_count) {
1072
+ RIG *rig = (RIG *)h;
1073
+ if (!rig || !out || max_count <= 0) return 0;
1074
+ if (!rig->caps->ctcss_list) return 0;
1075
+ int count = 0;
1076
+ for (int i = 0; rig->caps->ctcss_list[i] != 0 && count < max_count; i++) {
1077
+ out[count++] = rig->caps->ctcss_list[i];
1078
+ }
1079
+ return count;
1080
+ }
1081
+
1082
+ SHIM_API int shim_rig_get_caps_dcs_list(hamlib_shim_handle_t h, unsigned int* out, int max_count) {
1083
+ RIG *rig = (RIG *)h;
1084
+ if (!rig || !out || max_count <= 0) return 0;
1085
+ if (!rig->caps->dcs_list) return 0;
1086
+ int count = 0;
1087
+ for (int i = 0; rig->caps->dcs_list[i] != 0 && count < max_count; i++) {
1088
+ out[count++] = rig->caps->dcs_list[i];
1089
+ }
1090
+ return count;
1091
+ }
1092
+
1093
+ /* ===== Capability Query: Frequency ranges ===== */
1094
+
1095
+ SHIM_API int shim_rig_get_caps_rx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count) {
1096
+ RIG *rig = (RIG *)h;
1097
+ if (!rig || !out || max_count <= 0) return 0;
1098
+ int count = 0;
1099
+ for (int i = 0; i < HAMLIB_FRQRANGESIZ && count < max_count; i++) {
1100
+ const freq_range_t *r = &rig->caps->rx_range_list1[i];
1101
+ if (r->startf == 0 && r->endf == 0) break;
1102
+ out[count].start_freq = (double)r->startf;
1103
+ out[count].end_freq = (double)r->endf;
1104
+ out[count].modes = (uint64_t)r->modes;
1105
+ out[count].low_power = (int)r->low_power;
1106
+ out[count].high_power = (int)r->high_power;
1107
+ out[count].vfo = (int)r->vfo;
1108
+ out[count].ant = (int)r->ant;
1109
+ count++;
1110
+ }
1111
+ return count;
1112
+ }
1113
+
1114
+ SHIM_API int shim_rig_get_caps_tx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count) {
1115
+ RIG *rig = (RIG *)h;
1116
+ if (!rig || !out || max_count <= 0) return 0;
1117
+ int count = 0;
1118
+ for (int i = 0; i < HAMLIB_FRQRANGESIZ && count < max_count; i++) {
1119
+ const freq_range_t *r = &rig->caps->tx_range_list1[i];
1120
+ if (r->startf == 0 && r->endf == 0) break;
1121
+ out[count].start_freq = (double)r->startf;
1122
+ out[count].end_freq = (double)r->endf;
1123
+ out[count].modes = (uint64_t)r->modes;
1124
+ out[count].low_power = (int)r->low_power;
1125
+ out[count].high_power = (int)r->high_power;
1126
+ out[count].vfo = (int)r->vfo;
1127
+ out[count].ant = (int)r->ant;
1128
+ count++;
1129
+ }
1130
+ return count;
1131
+ }
1132
+
1133
+ /* ===== Capability Query: Tuning steps / Filters ===== */
1134
+
1135
+ SHIM_API int shim_rig_get_caps_tuning_steps(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count) {
1136
+ RIG *rig = (RIG *)h;
1137
+ if (!rig || !out || max_count <= 0) return 0;
1138
+ int count = 0;
1139
+ for (int i = 0; i < HAMLIB_TSLSTSIZ && count < max_count; i++) {
1140
+ if (rig->caps->tuning_steps[i].modes == 0) break;
1141
+ out[count].modes = (uint64_t)rig->caps->tuning_steps[i].modes;
1142
+ out[count].value = (int)rig->caps->tuning_steps[i].ts;
1143
+ count++;
1144
+ }
1145
+ return count;
1146
+ }
1147
+
1148
+ SHIM_API int shim_rig_get_caps_filters(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count) {
1149
+ RIG *rig = (RIG *)h;
1150
+ if (!rig || !out || max_count <= 0) return 0;
1151
+ int count = 0;
1152
+ for (int i = 0; i < HAMLIB_FLTLSTSIZ && count < max_count; i++) {
1153
+ if (rig->caps->filters[i].modes == 0) break;
1154
+ out[count].modes = (uint64_t)rig->caps->filters[i].modes;
1155
+ out[count].value = (int)rig->caps->filters[i].width;
1156
+ count++;
1157
+ }
1158
+ return count;
1159
+ }
1160
+
1161
+ /* ===== Static info ===== */
1162
+
1163
+ SHIM_API const char* shim_rig_copyright(void) {
1164
+ return rig_copyright();
1165
+ }
1166
+
1167
+ SHIM_API const char* shim_rig_license(void) {
1168
+ return rig_license();
1169
+ }
@@ -83,6 +83,16 @@ typedef void* hamlib_shim_handle_t;
83
83
  #define SHIM_RIG_SCAN_DELTA (1<<3)
84
84
  #define SHIM_RIG_SCAN_PRIO (1<<4)
85
85
 
86
+ /* Parm constants (bit positions for setting_t / uint64_t) */
87
+ #define SHIM_RIG_PARM_ANN (1ULL << 0)
88
+ #define SHIM_RIG_PARM_APO (1ULL << 1)
89
+ #define SHIM_RIG_PARM_BACKLIGHT (1ULL << 2)
90
+ #define SHIM_RIG_PARM_BEEP (1ULL << 4)
91
+ #define SHIM_RIG_PARM_TIME (1ULL << 5)
92
+ #define SHIM_RIG_PARM_BAT (1ULL << 6)
93
+ #define SHIM_RIG_PARM_KEYLIGHT (1ULL << 7)
94
+ #define SHIM_RIG_PARM_SCREENSAVER (1ULL << 8)
95
+
86
96
  /* Transceive mode */
87
97
  #define SHIM_RIG_TRN_POLL 1
88
98
 
@@ -504,6 +514,86 @@ SHIM_API int shim_rig_sprintf_mode(uint64_t modes, char* buf, int buflen);
504
514
  /* Rig type to string conversion */
505
515
  SHIM_API const char* shim_rig_type_str(int rig_type);
506
516
 
517
+ /* ===== Capability Query: Structured data types ===== */
518
+
519
+ /* ABI-safe struct for frequency range (no Hamlib types cross boundary) */
520
+ typedef struct {
521
+ double start_freq; /* Hz */
522
+ double end_freq; /* Hz */
523
+ uint64_t modes; /* rmode_t bitmask */
524
+ int low_power; /* mW */
525
+ int high_power; /* mW */
526
+ int vfo; /* vfo_t */
527
+ int ant; /* ant_t */
528
+ } shim_freq_range_t;
529
+
530
+ /* ABI-safe struct for tuning step / filter */
531
+ typedef struct {
532
+ uint64_t modes; /* rmode_t bitmask */
533
+ int value; /* step Hz or filter width Hz */
534
+ } shim_mode_value_t;
535
+
536
+ /* Group A: Simple value queries */
537
+ SHIM_API int shim_rig_get_caps_preamp(hamlib_shim_handle_t h, int* out, int max_count);
538
+ SHIM_API int shim_rig_get_caps_attenuator(hamlib_shim_handle_t h, int* out, int max_count);
539
+ SHIM_API long shim_rig_get_caps_max_rit(hamlib_shim_handle_t h);
540
+ SHIM_API long shim_rig_get_caps_max_xit(hamlib_shim_handle_t h);
541
+ SHIM_API long shim_rig_get_caps_max_ifshift(hamlib_shim_handle_t h);
542
+
543
+ /* Group B: Tone/code lists */
544
+ SHIM_API int shim_rig_get_caps_ctcss_list(hamlib_shim_handle_t h, unsigned int* out, int max_count);
545
+ SHIM_API int shim_rig_get_caps_dcs_list(hamlib_shim_handle_t h, unsigned int* out, int max_count);
546
+
547
+ /* Group C: Structured data */
548
+ SHIM_API int shim_rig_get_caps_rx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count);
549
+ SHIM_API int shim_rig_get_caps_tx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count);
550
+ SHIM_API int shim_rig_get_caps_tuning_steps(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count);
551
+ SHIM_API int shim_rig_get_caps_filters(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count);
552
+
553
+ /* ===== Lock Mode (Hamlib >= 4.7.0) ===== */
554
+
555
+ SHIM_API int shim_rig_set_lock_mode(hamlib_shim_handle_t h, int lock);
556
+ SHIM_API int shim_rig_get_lock_mode(hamlib_shim_handle_t h, int *lock);
557
+
558
+ /* ===== Clock (Hamlib >= 4.7.0) ===== */
559
+
560
+ SHIM_API int shim_rig_set_clock(hamlib_shim_handle_t h, int year, int month, int day,
561
+ int hour, int min, int sec, double msec, int utc_offset);
562
+ SHIM_API int shim_rig_get_clock(hamlib_shim_handle_t h, int *year, int *month, int *day,
563
+ int *hour, int *min, int *sec, double *msec, int *utc_offset);
564
+
565
+ /* ===== VFO Info (Hamlib >= 4.7.0) ===== */
566
+
567
+ SHIM_API int shim_rig_get_vfo_info(hamlib_shim_handle_t h, int vfo,
568
+ double *freq, uint64_t *mode,
569
+ long *width, int *split, int *satmode);
570
+
571
+ /* ===== Rig info / Raw / Conf ===== */
572
+
573
+ SHIM_API const char* shim_rig_get_info(hamlib_shim_handle_t h);
574
+ SHIM_API int shim_rig_send_raw(hamlib_shim_handle_t h,
575
+ const unsigned char* send, int send_len,
576
+ unsigned char* reply, int reply_len, const unsigned char* term);
577
+ SHIM_API int shim_rig_set_conf(hamlib_shim_handle_t h, const char* name, const char* val);
578
+ SHIM_API int shim_rig_get_conf(hamlib_shim_handle_t h, const char* name, char* buf, int buflen);
579
+
580
+ /* ===== Passband / Resolution ===== */
581
+
582
+ SHIM_API int shim_rig_passband_normal(hamlib_shim_handle_t h, int mode);
583
+ SHIM_API int shim_rig_get_resolution(hamlib_shim_handle_t h, int mode);
584
+
585
+ /* ===== Capability queries (parm / vfo_ops / scan) ===== */
586
+
587
+ SHIM_API uint64_t shim_rig_get_caps_has_get_parm(hamlib_shim_handle_t h);
588
+ SHIM_API uint64_t shim_rig_get_caps_has_set_parm(hamlib_shim_handle_t h);
589
+ SHIM_API int shim_rig_get_caps_vfo_ops(hamlib_shim_handle_t h);
590
+ SHIM_API int shim_rig_get_caps_has_scan(hamlib_shim_handle_t h);
591
+
592
+ /* ===== Static info ===== */
593
+
594
+ SHIM_API const char* shim_rig_copyright(void);
595
+ SHIM_API const char* shim_rig_license(void);
596
+
507
597
  #ifdef __cplusplus
508
598
  }
509
599
  #endif