Loading...
Searching...
No Matches
amp_caps Struct Reference
Amplifier API

Amplifier capabilities. More...

`#include <amplifier.h>`

Collaboration diagram for amp_caps:
[legend]

## Data Fields

amp_model_t | amp_model
const char * | model_name
const char * | mfg_name
const char * | version
const char * | copyright
enum rig_status_e | status
int | amp_type
enum rig_port_e | port_type
int | serial_rate_min
int | serial_rate_max
int | serial_data_bits
int | serial_stop_bits
enum serial_parity_e | serial_parity
enum serial_handshake_e | serial_handshake
int | write_delay
int | post_write_delay
int | timeout
int | retry
const struct confparams * | cfgparams
const rig_ptr_t | priv
const char * | amp_model_macro_name
setting_t | has_get_level
setting_t | has_set_level
gran_t | level_gran [64]
gran_t | parm_gran [64]
int(* | amp_init )(AMP *amp)
int(* | amp_cleanup )(AMP *amp)
int(* | amp_open )(AMP *amp)
int(* | amp_close )(AMP *amp)
int(* | set_freq )(AMP *amp, freq_t val)
int(* | get_freq )(AMP *amp, freq_t *val)
int(* | set_conf )(AMP *amp, hamlib_token_t token, const char *val)
int(* | get_conf2 )(AMP *amp, hamlib_token_t token, char *val, int val_len)
int(* | get_conf )(AMP *amp, hamlib_token_t token, char *val)
int(* | reset )(AMP *amp, amp_reset_t reset)
int(* | get_level )(AMP *amp, setting_t level, value_t *val)
int(* | set_level )(AMP *amp, setting_t level, value_t val)
int(* | get_ext_level )(AMP *amp, hamlib_token_t level, value_t *val)
int(* | set_ext_level )(AMP *amp, hamlib_token_t level, value_t val)
int(* | set_powerstat )(AMP *amp, powerstat_t status)
int(* | get_powerstat )(AMP *amp, powerstat_t *status)
const char *(* | get_info )(AMP *amp)
const struct confparams * | extlevels
const struct confparams * | extparms
const char * | macro_name

## Detailed Description

Amplifier capabilities.

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.

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.

## Field Documentation

## amp_cleanup

int(* amp_caps::amp_cleanup) (AMP *amp)

Pointer to backend implementation of amp_cleanup().

## amp_close

int(* amp_caps::amp_close) (AMP *amp)

Pointer to backend implementation of amp_close().

## amp_init

int(* amp_caps::amp_init) (AMP *amp)

Pointer to backend implementation of amp_init().

## amp_model

amp_model_t amp_caps::amp_model

Amplifier model as defined in amplist.h.

## amp_model_macro_name

const char* amp_caps::amp_model_macro_name

Model macro name.

## amp_open

int(* amp_caps::amp_open) (AMP *amp)

Pointer to backend implementation of amp_open().

## amp_type

int amp_caps::amp_type

Amplifier type.

## cfgparams

const struct confparams* amp_caps::cfgparams

Configuration parameters.

## copyright

const char* amp_caps::copyright

Copyright info (should be LGPL).

## extlevels

const struct confparams* amp_caps::extlevels

Extension levels list.

See also
  extamp.c

## extparms

const struct confparams* amp_caps::extparms

Extension parameters list.

See also
  extamp.c

## get_conf

int(* amp_caps::get_conf) (AMP *amp, hamlib_token_t token, char *val)

Pointer to backend implementation of amp_get_conf().

## get_conf2

int(* amp_caps::get_conf2) (AMP *amp, hamlib_token_t token, char *val, int val_len)

Pointer to backend implementation of amp_get_conf().

## get_ext_level

int(* amp_caps::get_ext_level) (AMP *amp, hamlib_token_t level, value_t *val)

Pointer to backend implementation of amp_get_ext_level().

## get_freq

int(* amp_caps::get_freq) (AMP *amp, freq_t *val)

Pointer to backend implementation of amp_get_freq().

## get_info

const char *(* amp_caps::get_info) (AMP *amp)

Pointer to backend implementation of amp_get_info().

## get_level

int(* amp_caps::get_level) (AMP *amp, setting_t level, value_t *val)

Pointer to backend implementation of amp_get_level().

## get_powerstat

int(* amp_caps::get_powerstat) (AMP *amp, powerstat_t *status)

Pointer to backend implementation of amp_get_powerstat().

## has_get_level

setting_t amp_caps::has_get_level

List of get levels.

## has_set_level

setting_t amp_caps::has_set_level

List of set levels.

## level_gran

gran_t amp_caps::level_gran[64]

Level granularity.

## macro_name

const char* amp_caps::macro_name

Amplifier model macro name.

## mfg_name

const char* amp_caps::mfg_name

Manufacturer, e.g. Moonbeam.

## model_name

const char* amp_caps::model_name

Model name, e.g. MM-5k.

## parm_gran

gran_t amp_caps::parm_gran[64]

Parameter granularity.

## port_type

enum rig_port_e amp_caps::port_type

Type of communication port (serial, ethernet, etc.).

## post_write_delay

int amp_caps::post_write_delay

Post-write delay.

## priv

const rig_ptr_t amp_caps::priv

Private data.

## reset

int(* amp_caps::reset) (AMP *amp, amp_reset_t reset)

Pointer to backend implementation of amp_reset().

## retry

int amp_caps::retry

Number of retries if a command fails.

## serial_data_bits

int amp_caps::serial_data_bits

Number of data bits.

## serial_handshake

enum serial_handshake_e amp_caps::serial_handshake

Handshake.

## serial_parity

enum serial_parity_e amp_caps::serial_parity

Parity.

## serial_rate_max

int amp_caps::serial_rate_max

Maximal serial speed.

## serial_rate_min

int amp_caps::serial_rate_min

Minimal serial speed.

## serial_stop_bits

int amp_caps::serial_stop_bits

Number of stop bits.

## set_conf

int(* amp_caps::set_conf) (AMP *amp, hamlib_token_t token, const char *val)

Pointer to backend implementation of amp_set_conf().

## set_ext_level

int(* amp_caps::set_ext_level) (AMP *amp, hamlib_token_t level, value_t val)

Pointer to backend implementation of amp_set_ext_level().

## set_freq

int(* amp_caps::set_freq) (AMP *amp, freq_t val)

Pointer to backend implementation of amp_set_freq().

## set_level

int(* amp_caps::set_level) (AMP *amp, setting_t level, value_t val)

Pointer to backend implementation of amp_get_level().

## set_powerstat

int(* amp_caps::set_powerstat) (AMP *amp, powerstat_t status)

Pointer to backend implementation of amp_set_powerstat().

## status

enum rig_status_e amp_caps::status

Driver status.

## timeout

int amp_caps::timeout

Timeout.

## version

const char* amp_caps::version

Driver version, typically in YYYYMMDD.x format.

## write_delay

int amp_caps::write_delay

Write delay.

The documentation for this struct was generated from the following file:

- amplifier.h