|
Hamlib
4.0~git
|
Files | |
| file | ext.c |
| Extension request parameter interface. | |
Data Structures | |
| struct | amp_caps |
| Amplifier data structure. More... | |
| struct | amp_state |
| Live data and customized fields. More... | |
| struct | amp |
| This is the master data structure, acting as a handle for the controlled amplifier. More... | |
Macros | |
| #define | NETAMPCTL_RET "RPRT " |
| Token in the netampctl protocol for returning error code. | |
| #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) |
| #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) |
| #define | AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg |
| #define | amp_debug rig_debug |
| Convenience definition for debug level. More... | |
Typedefs | |
| typedef struct amp | AMP |
| Amplifier structure definition (see amp for details). | |
| typedef float | swr_t |
| Type definition for SWR. More... | |
| typedef int | tune_value_t |
| Type definition for tuning values capacitance and resistance. More... | |
Enumerations | |
| enum | amp_reset_t { AMP_RESET_MEM, AMP_RESET_FAULT, AMP_RESET_AMP } |
| enum | amp_type_t { AMP_FLAG_1 = (1 << 1), AMP_FLAG_2 = (1 << 2) } |
| Amplifier type flags. More... | |
| enum | amp_level_e { AMP_LEVEL_NONE = 0, AMP_LEVEL_SWR = (1 << 0), AMP_LEVEL_NH = (1 << 1), AMP_LEVEL_PF = (1 << 2), AMP_LEVEL_PWR_INPUT = (1 << 3), AMP_LEVEL_PWR_FWD = (1 << 4), AMP_LEVEL_PWR_REFLECTED = (1 << 5), AMP_LEVEL_PWR_PEAK = (1 << 6), AMP_LEVEL_FAULT = (1 << 7) } |
Functions | |
| int | amp_ext_level_foreach (AMP *amp, int(*cfunc)(AMP *, const struct confparams *, char *), char *data) |
| Executes cfunc on all the elements stored in the extlevels table. More... | |
| int | amp_ext_parm_foreach (AMP *amp, int(*cfunc)(AMP *, const struct confparams *, char *), char *data) |
| Executes cfunc on all the elements stored in the extparms table. More... | |
| const struct confparams * | amp_ext_lookup (AMP *amp, const char *name) |
| lookup ext token by its name, return pointer to confparams struct. More... | |
| const struct confparams * | amp_ext_lookup_tok (AMP *amp, token_t token) |
| lookup ext token, return pointer to confparams struct. More... | |
| token_t | amp_ext_token_lookup (AMP *amp, const char *name) |
| Simple lookup returning token id assicated with name. More... | |
| AMP * | amp_init () |
| int | amp_open () |
| int | amp_close () |
| int | amp_cleanup () |
| int | amp_set_conf () |
| int | amp_get_conf () |
| int | amp_set_powerstat () |
| int | amp_get_powerstat () |
| int | amp_get_freq () |
| int | amp_set_freq () |
| int | amp_reset () |
| const char * | amp_get_info () |
| int | amp_get_level () |
| int | amp_register () |
| int | amp_unregister () |
| int | amp_list_foreach () |
| int | amp_load_backend () |
| int | amp_check_backend () |
| int | amp_load_all_backends () |
| amp_model_t | amp_probe_all () |
| int | amp_token_foreach () |
| const struct confparams * | amp_confparam_lookup () |
| token_t | amp_token_lookup () |
| const struct amp_caps * | amp_get_caps () |
| setting_t | amp_has_get_level () |
| const struct confparams * | amp_ext_lookup () |
| int | amp_get_ext_level () |
| const char * | amp_strlevel (setting_t) |
| Convert enum AMP_LEVEL_... to alpha string. More... | |
| const struct confparams * | rig_ext_lookup () |
| #define amp_debug rig_debug |
Convenience definition for debug level.
This is just as convenience definition of the amplifier debug level, and is the same as for the rig debug level.
| typedef float swr_t |
Type definition for SWR.
The swr_t type is used as a parameter for the amp_get_swr() function.
Unless specified otherwise, the unit of swr_t is 1.0 to max reported by tuner
| typedef float tune_value_t |
Type definition for tuning values capacitance and resistance.
The tune_value_t type is used as a parameter for the amp_get_level()
Unless specified otherwise, the units of tune_value_t is pF and nH
| enum amp_level_e |
| enum amp_type_t |
Amplifier type flags.
| Enumerator | |
|---|---|
| AMP_FLAG_1 | TBD |
| AMP_FLAG_2 | TBD |
| int amp_ext_level_foreach | ( | AMP * | amp, |
| int(*)(AMP *, const struct confparams *, char *) | cfunc, | ||
| char * | data | ||
| ) |
Executes cfunc on all the elements stored in the extlevels table.
| amp | The amp handle |
| cfunc | callback function of each extlevel |
| data | cookie to be passed to cfunc callback The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of amp_ext_level_foreach. |
| const struct confparams* amp_ext_lookup | ( | AMP * | amp, |
| const char * | name | ||
| ) |
lookup ext token by its name, return pointer to confparams struct.
| amp | |
| name | Lookup extlevels table first, then fall back to extparms. |
Returns NULL if nothing found
TODO: should use Lex to speed it up, strcmp hurts!
| const struct confparams* amp_ext_lookup_tok | ( | AMP * | amp, |
| token_t | token | ||
| ) |
lookup ext token, return pointer to confparams struct.
| amp | |
| token | lookup extlevels table first, then fall back to extparms. |
Returns NULL if nothing found
| int amp_ext_parm_foreach | ( | AMP * | amp, |
| int(*)(AMP *, const struct confparams *, char *) | cfunc, | ||
| char * | data | ||
| ) |
Executes cfunc on all the elements stored in the extparms table.
| amp | The amp handle |
| cfunc | callback function of each extparm |
| data | cookie to be passed to cfunc callback The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of amp_ext_parm_foreach. |
Simple lookup returning token id assicated with name.
| amp | |
| name |
| const char* amp_strlevel | ( | setting_t | level | ) |
Convert enum AMP_LEVEL_... to alpha string.
| level | AMP_LEVEL_... |
Hamlib documentation for version 4.0~git -- Sat Apr 4 2020 16:42:11
Project page: http://www.hamlib.org