SoapySDR  0.8.0-gab626068
Vendor and platform neutral SDR interface library
Types.h
Go to the documentation of this file.
1 
11 #pragma once
12 #include <SoapySDR/Config.h>
13 #include <stddef.h> //size_t
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
20 #define SOAPY_SDR_TRUE "true"
21 
23 #define SOAPY_SDR_FALSE "false"
24 
26 typedef struct
27 {
28  double minimum;
29  double maximum;
30  double step;
32 
34 typedef struct
35 {
36  size_t size;
37  char **keys;
38  char **vals;
40 
46 
52 
54 typedef enum
55 {
61 
63 typedef struct
64 {
66  char *key;
67 
73  char *value;
74 
76  char *name;
77 
79  char *description;
80 
82  char *units;
83 
86 
93 
95  size_t numOptions;
96 
101  char **options;
102 
107  char **optionNames;
108 
110 
115 SOAPY_SDR_API void SoapySDR_free(void *ptr);
116 
121 SOAPY_SDR_API void SoapySDRStrings_clear(char ***elems, const size_t length);
122 
132 SOAPY_SDR_API int SoapySDRKwargs_set(SoapySDRKwargs *args, const char *key, const char *val);
133 
138 SOAPY_SDR_API const char *SoapySDRKwargs_get(const SoapySDRKwargs *args, const char *key);
139 
145 
150 SOAPY_SDR_API void SoapySDRKwargsList_clear(SoapySDRKwargs *args, const size_t length);
151 
157 
162 SOAPY_SDR_API void SoapySDRArgInfoList_clear(SoapySDRArgInfo *info, const size_t length);
163 
164 #ifdef __cplusplus
165 }
166 #endif
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition: Config.h:41
SoapySDRStrings_clear
SOAPY_SDR_API void SoapySDRStrings_clear(char ***elems, const size_t length)
SoapySDRKwargsList_clear
SOAPY_SDR_API void SoapySDRKwargsList_clear(SoapySDRKwargs *args, const size_t length)
SoapySDRArgInfo::value
char * value
Definition: Types.h:73
SoapySDRKwargs_set
SOAPY_SDR_API int SoapySDRKwargs_set(SoapySDRKwargs *args, const char *key, const char *val)
SoapySDRArgInfo::options
char ** options
Definition: Types.h:101
SoapySDRArgInfo_clear
SOAPY_SDR_API void SoapySDRArgInfo_clear(SoapySDRArgInfo *info)
SoapySDRKwargs_toString
SOAPY_SDR_API char * SoapySDRKwargs_toString(const SoapySDRKwargs *args)
SoapySDRKwargs
Definition for a key/value string map.
Definition: Types.h:34
SoapySDRArgInfo::numOptions
size_t numOptions
The size of the options set, or 0 when not used.
Definition: Types.h:95
SoapySDRArgInfo::optionNames
char ** optionNames
Definition: Types.h:107
SoapySDRArgInfoType
SoapySDRArgInfoType
Possible data types for argument info.
Definition: Types.h:54
SOAPY_SDR_ARG_INFO_INT
@ SOAPY_SDR_ARG_INFO_INT
Definition: Types.h:57
SoapySDRArgInfo::type
SoapySDRArgInfoType type
The data type of the argument (required)
Definition: Types.h:85
SoapySDRKwargs_clear
SOAPY_SDR_API void SoapySDRKwargs_clear(SoapySDRKwargs *args)
SoapySDRArgInfo::name
char * name
The displayable name of the argument (optional, use key if empty)
Definition: Types.h:76
SoapySDRKwargs::vals
char ** vals
Definition: Types.h:38
SoapySDRArgInfoList_clear
SOAPY_SDR_API void SoapySDRArgInfoList_clear(SoapySDRArgInfo *info, const size_t length)
SoapySDRRange::step
double step
Definition: Types.h:30
SoapySDRRange
Definition for a min/max numeric range.
Definition: Types.h:26
SOAPY_SDR_ARG_INFO_STRING
@ SOAPY_SDR_ARG_INFO_STRING
Definition: Types.h:59
SoapySDRRange::minimum
double minimum
Definition: Types.h:28
SOAPY_SDR_ARG_INFO_BOOL
@ SOAPY_SDR_ARG_INFO_BOOL
Definition: Types.h:56
SoapySDRArgInfo::description
char * description
A brief description about the argument (optional)
Definition: Types.h:79
Config.h
SoapySDRKwargs_get
const SOAPY_SDR_API char * SoapySDRKwargs_get(const SoapySDRKwargs *args, const char *key)
SoapySDRKwargs_fromString
SOAPY_SDR_API SoapySDRKwargs SoapySDRKwargs_fromString(const char *markup)
SoapySDRArgInfo::units
char * units
The units of the argument: dB, Hz, etc (optional)
Definition: Types.h:82
SoapySDRArgInfo
Definition for argument info.
Definition: Types.h:63
SoapySDRArgInfo::key
char * key
The key used to identify the argument (required)
Definition: Types.h:66
SoapySDRKwargs::size
size_t size
Definition: Types.h:36
SoapySDR_free
SOAPY_SDR_API void SoapySDR_free(void *ptr)
SoapySDRArgInfo::range
SoapySDRRange range
Definition: Types.h:92
SoapySDRRange::maximum
double maximum
Definition: Types.h:29
SOAPY_SDR_ARG_INFO_FLOAT
@ SOAPY_SDR_ARG_INFO_FLOAT
Definition: Types.h:58
SoapySDRKwargs::keys
char ** keys
Definition: Types.h:37