SoapySDR: Types.h Source File

| SoapySDR 0.8.1-ARCH Vendor and platform neutral SDR interface library

Loading...
Searching...
No Matches
Types.h
Go to the documentation of this file.
1
10
11#pragma once
12#include <SoapySDR/Config.h>
13#include <stddef.h> //size_t
14
15#ifdef __cplusplus
16extern "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;
31} SoapySDRRange;
32
34 typedef struct
35{
36 size_t size;
37 char **keys;
38 char **vals;
39} SoapySDRKwargs;
40
45 SOAPY_SDR_API SoapySDRKwargs SoapySDRKwargs_fromString(const char *markup);
46
51 SOAPY_SDR_API char *SoapySDRKwargs_toString(const SoapySDRKwargs *args);
52
54 typedef enum
55{
56 SOAPY_SDR_ARG_INFO_BOOL,
57 SOAPY_SDR_ARG_INFO_INT,
58 SOAPY_SDR_ARG_INFO_FLOAT,
59 SOAPY_SDR_ARG_INFO_STRING
60} SoapySDRArgInfoType;
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
85 SoapySDRArgInfoType type;
86
92 SoapySDRRange range;
93
95 size_t numOptions;
96
101 char **options;
102
107 char **optionNames;
108
109} SoapySDRArgInfo;
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
144 SOAPY_SDR_API void SoapySDRKwargs_clear(SoapySDRKwargs *args);
145
150 SOAPY_SDR_API void SoapySDRKwargsList_clear(SoapySDRKwargs *args, const size_t length);
151
156 SOAPY_SDR_API void SoapySDRArgInfo_clear(SoapySDRArgInfo *info);
157
162 SOAPY_SDR_API void SoapySDRArgInfoList_clear(SoapySDRArgInfo *info, const size_t length);
163
164#ifdef __cplusplus
165}
166#endif
Config.h
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition: Config.h:41
SoapySDR_free
SOAPY_SDR_API void SoapySDR_free(void *ptr)
SoapySDRKwargs_get
SOAPY_SDR_API const char * SoapySDRKwargs_get(const SoapySDRKwargs *args, const char *key)
SoapySDRArgInfoList_clear
SOAPY_SDR_API void SoapySDRArgInfoList_clear(SoapySDRArgInfo *info, const size_t length)
SoapySDRArgInfoType
SoapySDRArgInfoType
Possible data types for argument info.
Definition: Types.h:55
SOAPY_SDR_ARG_INFO_BOOL
@ SOAPY_SDR_ARG_INFO_BOOL
Definition: Types.h:56
SOAPY_SDR_ARG_INFO_FLOAT
@ SOAPY_SDR_ARG_INFO_FLOAT
Definition: Types.h:58
SOAPY_SDR_ARG_INFO_INT
@ SOAPY_SDR_ARG_INFO_INT
Definition: Types.h:57
SOAPY_SDR_ARG_INFO_STRING
@ SOAPY_SDR_ARG_INFO_STRING
Definition: Types.h:59
SoapySDRStrings_clear
SOAPY_SDR_API void SoapySDRStrings_clear(char ***elems, const size_t length)
SoapySDRKwargs_set
SOAPY_SDR_API int SoapySDRKwargs_set(SoapySDRKwargs *args, const char *key, const char *val)
SoapySDRKwargs_toString
SOAPY_SDR_API char * SoapySDRKwargs_toString(const SoapySDRKwargs *args)
SoapySDRKwargs_clear
SOAPY_SDR_API void SoapySDRKwargs_clear(SoapySDRKwargs *args)
SoapySDRKwargsList_clear
SOAPY_SDR_API void SoapySDRKwargsList_clear(SoapySDRKwargs *args, const size_t length)
SoapySDRArgInfo_clear
SOAPY_SDR_API void SoapySDRArgInfo_clear(SoapySDRArgInfo *info)
SoapySDRKwargs_fromString
SOAPY_SDR_API SoapySDRKwargs SoapySDRKwargs_fromString(const char *markup)
SoapySDRArgInfo
Definition for argument info.
Definition: Types.h:64
SoapySDRArgInfo::name
char * name
The displayable name of the argument (optional, use key if empty)
Definition: Types.h:76
SoapySDRArgInfo::type
SoapySDRArgInfoType type
The data type of the argument (required)
Definition: Types.h:85
SoapySDRArgInfo::numOptions
size_t numOptions
The size of the options set, or 0 when not used.
Definition: Types.h:95
SoapySDRArgInfo::range
SoapySDRRange range
Definition: Types.h:92
SoapySDRArgInfo::options
char ** options
Definition: Types.h:101
SoapySDRArgInfo::optionNames
char ** optionNames
Definition: Types.h:107
SoapySDRArgInfo::value
char * value
Definition: Types.h:73
SoapySDRArgInfo::units
char * units
The units of the argument: dB, Hz, etc (optional)
Definition: Types.h:82
SoapySDRArgInfo::key
char * key
The key used to identify the argument (required)
Definition: Types.h:66
SoapySDRArgInfo::description
char * description
A brief description about the argument (optional)
Definition: Types.h:79
SoapySDRKwargs
Definition for a key/value string map.
Definition: Types.h:35
SoapySDRKwargs::size
size_t size
Definition: Types.h:36
SoapySDRKwargs::vals
char ** vals
Definition: Types.h:38
SoapySDRKwargs::keys
char ** keys
Definition: Types.h:37
SoapySDRRange
Definition for a min/max numeric range.
Definition: Types.h:27
SoapySDRRange::minimum
double minimum
Definition: Types.h:28
SoapySDRRange::maximum
double maximum
Definition: Types.h:29
SoapySDRRange::step
double step
Definition: Types.h:30