Loading...
Searching...
No Matches
Types.h
Go to the documentation of this file.
#pragma once
#include <SoapySDR/Config.h>
#include <stddef.h> //size_t
#ifdef __cplusplus
extern "C" {
#endif
#define SOAPY_SDR_TRUE "true"
#define SOAPY_SDR_FALSE "false"
typedef struct
{
double minimum;
double maximum;
double step;
} SoapySDRRange;
typedef struct
{
size_t size;
char **keys;
char **vals;
} SoapySDRKwargs;
SOAPY_SDR_API SoapySDRKwargs SoapySDRKwargs_fromString(const char *markup);
SOAPY_SDR_API char *SoapySDRKwargs_toString(const SoapySDRKwargs *args);
typedef enum
{
SOAPY_SDR_ARG_INFO_BOOL,
SOAPY_SDR_ARG_INFO_INT,
SOAPY_SDR_ARG_INFO_FLOAT,
SOAPY_SDR_ARG_INFO_STRING
} SoapySDRArgInfoType;
typedef struct
{
char *key;
char *value;
char *name;
char *description;
char *units;
SoapySDRArgInfoType type;
SoapySDRRange range;
size_t numOptions;
char **options;
char **optionNames;
} SoapySDRArgInfo;
SOAPY_SDR_API void SoapySDR_free(void *ptr);
SOAPY_SDR_API void SoapySDRStrings_clear(char ***elems, const size_t length);
SOAPY_SDR_API int SoapySDRKwargs_set(SoapySDRKwargs *args, const char *key, const char *val);
SOAPY_SDR_API const char *SoapySDRKwargs_get(const SoapySDRKwargs *args, const char *key);
SOAPY_SDR_API void SoapySDRKwargs_clear(SoapySDRKwargs *args);
SOAPY_SDR_API void SoapySDRKwargsList_clear(SoapySDRKwargs *args, const size_t length);
SOAPY_SDR_API void SoapySDRArgInfo_clear(SoapySDRArgInfo *info);
SOAPY_SDR_API void SoapySDRArgInfoList_clear(SoapySDRArgInfo *info, const size_t length);
#ifdef __cplusplus
}
#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