Hamlib  4.2
Functions
extamp.c File Reference

Amplifier extension parameters and levels interface. More...

#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <hamlib/amplifier.h>
#include "token.h"
Include dependency graph for extamp.c:

Functions

int amp_ext_level_foreach (AMP *amp, int(*cfunc)(AMP *, const struct confparams *, amp_ptr_t), amp_ptr_t data)
 Executes cfunc on all the elements stored in the amp_caps::extlevels extension levels table. More...
 
int amp_ext_parm_foreach (AMP *amp, int(*cfunc)(AMP *, const struct confparams *, amp_ptr_t), amp_ptr_t data)
 Executes cfunc on all the elements stored in the amp_caps::extparms extension parameters table. More...
 
const struct confparamsamp_ext_lookup (AMP *amp, const char *name)
 Lookup an extension levels or parameters token by its name and return a pointer to the containing confparams structure member. More...
 
const struct confparamsamp_ext_lookup_tok (AMP *amp, token_t token)
 Search for an extension levels or parameters token by its constant value and return a pointer to the confparams structure member. More...
 
token_t amp_ext_token_lookup (AMP *amp, const char *name)
 Simple search returning the extension token ID associated with name. More...
 

Detailed Description

Amplifier extension parameters and levels interface.

Author
Michael Black
Date
2019

An open-ended set of extension parameters and levels are available for each amplifier, as provided in the amp_caps::extparms and amp_caps::extlevels lists. These provide a way to work with amplifier-specific functions that don't fit into the basic "virtual amplifier" of Hamlib. See amplifiers/elecraft/kpa.c for an example.