104#define NETAMPCTL_RET "RPRT "
125#define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2)
127#define AMP_TYPE_OTHER 0
128#define AMP_TYPE_1 AMP_FLAG_1
129#define AMP_TYPE_2 AMP_FLAG_2
130#define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2)
153#define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR)
154#define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT)
155#define AMP_LEVEL_IS_FLOAT(l) ((l)&_LEVEL_FLOAT_LIST)
156#define AMP_LEVEL_IS_STRING(l) ((l)&_LEVEL_STRING_LIST)
169#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg
266#ifndef NO_OLD_INCLUDES
297extern HAMLIB_EXPORT(
AMP *)
300extern HAMLIB_EXPORT(
int)
303extern HAMLIB_EXPORT(
int)
306extern HAMLIB_EXPORT(
int)
309extern HAMLIB_EXPORT(
int)
313HL_DEPRECATED
extern HAMLIB_EXPORT(
int)
314amp_get_conf HAMLIB_PARAMS((
AMP *
amp,
317extern HAMLIB_EXPORT(
int)
322extern HAMLIB_EXPORT(
int)
325extern HAMLIB_EXPORT(
int)
334extern HAMLIB_EXPORT(
int)
337extern HAMLIB_EXPORT(
int)
341extern HAMLIB_EXPORT(
int)
345extern HAMLIB_EXPORT(
const char *)
348extern HAMLIB_EXPORT(
int)
351extern HAMLIB_EXPORT(
int)
355extern HAMLIB_EXPORT(
int)
356amp_register HAMLIB_PARAMS((
const struct amp_caps *caps));
358extern HAMLIB_EXPORT(
int)
359amp_unregister HAMLIB_PARAMS((
amp_model_t amp_model));
361extern HAMLIB_EXPORT(
int)
362amp_list_foreach HAMLIB_PARAMS((
int (*cfunc)(
const struct amp_caps *,
366extern HAMLIB_EXPORT(
int)
367amp_load_backend HAMLIB_PARAMS((
const char *be_name));
369extern HAMLIB_EXPORT(
int)
370amp_check_backend HAMLIB_PARAMS((
amp_model_t amp_model));
372extern HAMLIB_EXPORT(
int)
373amp_load_all_backends HAMLIB_PARAMS((
void));
378extern HAMLIB_EXPORT(
int)
384extern HAMLIB_EXPORT(
const struct confparams *)
392extern HAMLIB_EXPORT(
const struct amp_caps *)
393amp_get_caps HAMLIB_PARAMS((
amp_model_t amp_model));
403extern HAMLIB_EXPORT(
const struct confparams *)
407extern HAMLIB_EXPORT(
int)
412extern HAMLIB_EXPORT(
int)
419extern HAMLIB_EXPORT(
const struct confparams *)
437#define amp_debug rig_debug
Hamlib amplifier state structure.
Hamlib amplifier model definitions.
int amp_set_freq(AMP *amp, freq_t freq)
Set the operating frequency of the amplifier.
Definition amplifier.c:687
int amp_set_ext_level(AMP *amp, hamlib_token_t level, value_t val)
Set the value of a requested extension levels token.
Definition amplifier.c:833
int amp_reset(AMP *amp, amp_reset_t reset)
Reset the amplifier.
Definition amplifier.c:608
float swr_t
Type definition for SWR (Standing Wave Ratio).
Definition amplifier.h:80
amp_reset_e
Amplifier reset tokens.
Definition amplifier.h:109
int amp_set_conf(AMP *amp, hamlib_token_t token, const char *val)
Set an amplifier configuration parameter.
Definition amp_conf.c:681
amp_type_e
Amplifier type flags.
Definition amplifier.h:117
setting_t amp_has_get_level(AMP *amp, setting_t level)
Check which level settings can be queried.
Definition amp_settings.c:103
hamlib_token_t amp_token_lookup(AMP *amp, const char *name)
Search for the token ID associated with an amplifier configuration parameter token name.
Definition amp_conf.c:646
int amp_cleanup(AMP *amp)
Release an AMP handle and free associated memory.
Definition amplifier.c:562
int amp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len)
Query the value of an amplifier configuration parameter.
Definition amp_conf.c:737
int amp_token_foreach(AMP *amp, int(*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)
Executes cfunc on all the elements stored in the configuration parameters table.
Definition amp_conf.c:522
const struct confparams * amp_ext_lookup(AMP *amp, const char *name)
Lookup an extension levels or parameters token by its name and return a pointer to the containing con...
Definition extamp.c:172
int amp_set_level(AMP *amp, setting_t level, value_t val)
Set the value of a requested level.
Definition amplifier.c:760
int amp_close(AMP *amp)
Close the communication channel to the amplifier.
Definition amplifier.c:470
int amp_set_powerstat(AMP *amp, powerstat_t status)
Turn the amplifier On or Off or toggle the Standby or Operate status.
Definition amplifier.c:906
AMP * amp_init(amp_model_t amp_model)
Allocate a new AMP handle.
Definition amplifier.c:184
void * amp_data_pointer(AMP *amp, rig_ptrx_t idx)
Get the address of amplifier data structure(s)
Definition amplifier.c:966
setting_t amp_has_set_level(AMP *amp, setting_t level)
Check which level settings can be set.
Definition amp_settings.c:70
enum amp_type_e amp_type_t
Amplifier type flags.
int amp_get_ext_level(AMP *amp, hamlib_token_t level, value_t *val)
Query the value of a requested extension levels token.
Definition amplifier.c:868
int tune_value_t
Type definition for the transmatch tuning values of capacitance and inductance.
Definition amplifier.h:98
const struct confparams * amp_confparam_lookup(AMP *amp, const char *name)
Query an amplifier configuration parameter token by its name.
Definition amp_conf.c:585
amp_level_e
Definition amplifier.h:137
int amp_get_powerstat(AMP *amp, powerstat_t *status)
Query the power or standby status of the amplifier.
Definition amplifier.c:943
int amp_get_level(AMP *amp, setting_t level, value_t *val)
Query the value of a requested level.
Definition amplifier.c:797
int amp_get_freq(AMP *amp, freq_t *freq)
Query the operating frequency of the amplifier.
Definition amplifier.c:647
struct amp AMP
Main amplifier handle type definition.
Definition amplifier.h:65
const char * amp_get_info(AMP *amp)
Query general information from the amplifier.
Definition amplifier.c:722
int amp_open(AMP *amp)
Open the communication channel to the amplifier.
Definition amplifier.c:311
enum amp_reset_e amp_reset_t
Amplifier reset tokens.
@ AMP_RESET_FAULT
Definition amplifier.h:111
@ AMP_RESET_MEM
Definition amplifier.h:110
@ AMP_RESET_AMP
Definition amplifier.h:112
@ AMP_FLAG_1
Definition amplifier.h:118
@ AMP_FLAG_2
Definition amplifier.h:119
@ AMP_LEVEL_PWR
Definition amplifier.h:147
@ AMP_LEVEL_PWR_FWD
Definition amplifier.h:143
@ AMP_LEVEL_NH
Definition amplifier.h:140
@ AMP_LEVEL_NONE
Definition amplifier.h:138
@ AMP_LEVEL_PWR_REFLECTED
Definition amplifier.h:144
@ AMP_LEVEL_PF
Definition amplifier.h:141
@ AMP_LEVEL_PWR_PEAK
Definition amplifier.h:145
@ AMP_LEVEL_PWR_INPUT
Definition amplifier.h:142
@ AMP_LEVEL_SWR
Definition amplifier.h:139
@ AMP_LEVEL_FAULT
Definition amplifier.h:146
int amp_model_t
Definition amplist.h:147
struct hamlib_port hamlib_port_t
Port definition.
setting_t amp_parse_level(const char *s)
Convert alpha string to enum AMP_LEVEL_...
Definition misc.c:1151
const char * amp_strlevel(setting_t level)
Convert enum AMP_LEVEL_... to alpha string.
Definition misc.c:1242
serial_parity_e
Serial parity.
Definition rig.h:359
long hamlib_token_t
configuration token
Definition rig.h:893
uint64_t setting_t
Setting bit mask.
Definition rig.h:1234
powerstat_t
Radio power state.
Definition rig.h:738
double freq_t
Frequency type.
Definition rig.h:484
rig_port_e
Port type.
Definition rig.h:338
serial_handshake_e
Serial handshake.
Definition rig.h:371
#define RIG_SETTING_MAX
Maximum # of rig settings.
Definition rig.h:1240
const struct confparams * rig_ext_lookup(RIG *rig, const char *name)
lookup ext token by its name, return pointer to confparams struct.
Definition ext.c:231
struct s_rig RIG
Rig structure definition (see rig for details).
Definition rig.h:290
struct gran gran_t
gran_t type
Definition rig.h:1771
rig_status_e
Development status of the backend.
Definition rig.h:443
Hamlib rig data structures.
Amplifier capabilities.
Definition amplifier.h:188
int(* get_freq)(AMP *amp, freq_t *val)
Definition amplifier.h:232
const struct confparams * cfgparams
Definition amplifier.h:211
int post_write_delay
Definition amplifier.h:207
int(* set_freq)(AMP *amp, freq_t val)
Definition amplifier.h:231
int(* amp_init)(AMP *amp)
Definition amplifier.h:226
const char * macro_name
Definition amplifier.h:260
int(* amp_open)(AMP *amp)
Definition amplifier.h:228
int(* get_ext_level)(AMP *amp, hamlib_token_t level, value_t *val)
Definition amplifier.h:246
int(* reset)(AMP *amp, amp_reset_t reset)
Definition amplifier.h:243
int amp_type
Definition amplifier.h:196
int serial_rate_min
Definition amplifier.h:199
const char * amp_model_macro_name
Definition amplifier.h:213
int(* get_level)(AMP *amp, setting_t level, value_t *val)
Definition amplifier.h:244
int serial_stop_bits
Definition amplifier.h:202
int(* get_powerstat)(AMP *amp, powerstat_t *status)
Definition amplifier.h:249
int serial_data_bits
Definition amplifier.h:201
int(* get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len)
Definition amplifier.h:235
int write_delay
Definition amplifier.h:206
const char * model_name
Definition amplifier.h:190
gran_t level_gran[64]
Definition amplifier.h:218
gran_t parm_gran[64]
Definition amplifier.h:219
int(* amp_cleanup)(AMP *amp)
Definition amplifier.h:227
enum rig_port_e port_type
Definition amplifier.h:197
int serial_rate_max
Definition amplifier.h:200
enum serial_parity_e serial_parity
Definition amplifier.h:203
int retry
Definition amplifier.h:209
const char * copyright
Definition amplifier.h:193
enum serial_handshake_e serial_handshake
Definition amplifier.h:204
int(* set_powerstat)(AMP *amp, powerstat_t status)
Definition amplifier.h:248
const struct confparams * extlevels
Definition amplifier.h:257
int(* set_level)(AMP *amp, setting_t level, value_t val)
Definition amplifier.h:245
enum rig_status_e status
Definition amplifier.h:194
int timeout
Definition amplifier.h:208
int(* amp_close)(AMP *amp)
Definition amplifier.h:229
setting_t levels
Definition amplifier.h:255
const struct confparams * extparms
Definition amplifier.h:258
const rig_ptr_t priv
Definition amplifier.h:212
const char * mfg_name
Definition amplifier.h:191
setting_t has_get_level
Definition amplifier.h:215
amp_model_t amp_model
Definition amplifier.h:189
const char * version
Definition amplifier.h:192
setting_t has_set_level
Definition amplifier.h:216
unsigned ext_levels
Definition amplifier.h:256
int(* set_conf)(AMP *amp, hamlib_token_t token, const char *val)
Definition amplifier.h:234
int(* get_conf)(AMP *amp, hamlib_token_t token, char *val)
Definition amplifier.h:236
int(* set_ext_level)(AMP *amp, hamlib_token_t level, value_t val)
Definition amplifier.h:247
Amplifier state structure.
Definition amp_state.h:55
Master amplifier structure.
Definition amplifier.h:288
struct amp_caps * caps
Definition amplifier.h:289
struct amp_state state
Definition amplifier.h:290
Configuration parameter structure.
Definition rig.h:933
Universal approach for passing values.
Definition rig.h:1058