Hamlib  4.1
Files | Data Structures | Macros | Typedefs | Enumerations | Functions
Amp
Collaboration diagram for Amp:

Files

file  ext.c
 Extension request parameter interface.
 
file  amplifier.h
 Hamlib amplifier data structures.
 

Data Structures

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...
 
struct  amp_caps
 Amplifier data structure. More...
 

Macros

#define NETAMPCTL_RET   "RPRT "
 Token in the netampctl protocol for returning error code.
 
#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_type_t { AMP_FLAG_1 = (1 << 1) , AMP_FLAG_2 = (1 << 2) }
 Amplifier type flags. More...
 

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 extlevels 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 extparms table. More...
 
const struct confparamsamp_ext_lookup (AMP *amp, const char *name)
 lookup ext token by its name, return pointer to confparams struct. More...
 
const struct confparamsamp_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...
 

Detailed Description

Macro Definition Documentation

◆ amp_debug

#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.

See also
rig_debug()

Typedef Documentation

◆ swr_t

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

◆ tune_value_t

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

Enumeration Type Documentation

◆ amp_type_t

enum amp_type_t

Amplifier type flags.

Enumerator
AMP_FLAG_1 

TBD

AMP_FLAG_2 

TBD

Function Documentation

◆ amp_ext_level_foreach()

int amp_ext_level_foreach ( AMP amp,
int(*)(AMP *, const struct confparams *, amp_ptr_t)  cfunc,
amp_ptr_t  data 
)

Executes cfunc on all the elements stored in the extlevels table.

Parameters
ampThe amp handle
cfunccallback function of each extlevel
datacookie 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.

◆ amp_ext_lookup()

const struct confparams* amp_ext_lookup ( AMP amp,
const char *  name 
)

lookup ext token by its name, return pointer to confparams struct.

Parameters
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!

◆ amp_ext_lookup_tok()

const struct confparams* amp_ext_lookup_tok ( AMP amp,
token_t  token 
)

lookup ext token, return pointer to confparams struct.

Parameters
amp
token

lookup extlevels table first, then fall back to extparms.

Returns NULL if nothing found

◆ amp_ext_parm_foreach()

int amp_ext_parm_foreach ( AMP amp,
int(*)(AMP *, const struct confparams *, amp_ptr_t)  cfunc,
amp_ptr_t  data 
)

Executes cfunc on all the elements stored in the extparms table.

Parameters
ampThe amp handle
cfunccallback function of each extparm
datacookie 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.

◆ amp_ext_token_lookup()

token_t amp_ext_token_lookup ( AMP amp,
const char *  name 
)

Simple lookup returning token id assicated with name.

Parameters
amp
name

Generated by doxygen 1.9.1

Hamlib documentation for version 4.1 -- Mon Feb 1 2021 08:00:28
Project page: http://www.hamlib.org