SoapySDR: Types.h File Reference

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

Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
Types.h File Reference
`#include <SoapySDR/Config.h>`
`#include <stddef.h>`

Go to the source code of this file.

## Classes
struct | SoapySDRRange
| Definition for a min/max numeric range. More...
struct | SoapySDRKwargs
| Definition for a key/value string map. More...
struct | SoapySDRArgInfo
| Definition for argument info. More...

## Macros
#define | SOAPY_SDR_TRUE "true"
| String definition for boolean true used in settings.
#define | SOAPY_SDR_FALSE "false"
| String definition for boolean false used in settings.

## Enumerations
enum | SoapySDRArgInfoType { SOAPY_SDR_ARG_INFO_BOOL , SOAPY_SDR_ARG_INFO_INT , SOAPY_SDR_ARG_INFO_FLOAT , SOAPY_SDR_ARG_INFO_STRING }
| Possible data types for argument info. More...

## Functions
SOAPY_SDR_API SoapySDRKwargs | SoapySDRKwargs_fromString (const char *markup)
SOAPY_SDR_API char * | SoapySDRKwargs_toString (const SoapySDRKwargs *args)
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)

## Detailed Description

Misc data type definitions used in the API.

Copyright
  Copyright (c) 2014-2020 Josh Blum SPDX-License-Identifier: BSL-1.0

## Macro Definition Documentation

## ◆ SOAPY_SDR_FALSE

#define SOAPY_SDR_FALSE "false"

String definition for boolean false used in settings.

## ◆ SOAPY_SDR_TRUE

#define SOAPY_SDR_TRUE "true"

String definition for boolean true used in settings.

## Enumeration Type Documentation

## ◆ SoapySDRArgInfoType

enum SoapySDRArgInfoType

Possible data types for argument info.

Enumerator
SOAPY_SDR_ARG_INFO_BOOL |
SOAPY_SDR_ARG_INFO_INT |
SOAPY_SDR_ARG_INFO_FLOAT |
SOAPY_SDR_ARG_INFO_STRING |

## Function Documentation

## ◆ SoapySDR_free()

SOAPY_SDR_API void SoapySDR_free | ( | void * | ptr | ) |

Free a pointer allocated by SoapySDR. For most platforms this is a simple call around free()

## ◆ SoapySDRArgInfo_clear()

SOAPY_SDR_API void SoapySDRArgInfo_clear | ( | SoapySDRArgInfo * | info | ) |

Clear the contents of a argument info structure. This frees all the underlying memory and clears the members.

## ◆ SoapySDRArgInfoList_clear()

SOAPY_SDR_API void SoapySDRArgInfoList_clear | ( | SoapySDRArgInfo * | info,
|  | const size_t | length )

Clear a list of argument info structures. This frees all the underlying memory and clears the members.

## ◆ SoapySDRKwargs_clear()

SOAPY_SDR_API void SoapySDRKwargs_clear | ( | SoapySDRKwargs * | args | ) |

Clear the contents of a kwargs structure. This frees all the underlying memory and clears the members.

## ◆ SoapySDRKwargs_fromString()

SOAPY_SDR_API SoapySDRKwargs SoapySDRKwargs_fromString | ( | const char * | markup | ) |

Convert a markup string to a key-value map. The markup format is: "key0=value0, key1=value1"

## ◆ SoapySDRKwargs_get()

SOAPY_SDR_API const char * SoapySDRKwargs_get | ( | const SoapySDRKwargs * | args,
|  | const char * | key )

Get a value given a key in a kwargs structure.

Returns
  the string or NULL if not found

## ◆ SoapySDRKwargs_set()

SOAPY_SDR_API int SoapySDRKwargs_set | ( | SoapySDRKwargs * | args,
|  | const char * | key,
|  | const char * | val )

Set a key/value pair in a kwargs structure.

Postcondition
  If the key exists, the existing entry will be modified; otherwise a new entry will be appended to args. On error, the elements of args will not be modified, and args is guaranteed to be in a good state.

Returns
  0 for success, otherwise allocation error

## ◆ SoapySDRKwargs_toString()

SOAPY_SDR_API char * SoapySDRKwargs_toString | ( | const SoapySDRKwargs * | args | ) |

Convert a key-value map to a markup string. The markup format is: "key0=value0, key1=value1"

## ◆ SoapySDRKwargsList_clear()

SOAPY_SDR_API void SoapySDRKwargsList_clear | ( | SoapySDRKwargs * | args,
|  | const size_t | length )

Clear a list of kwargs structures. This frees all the underlying memory and clears the members.

## ◆ SoapySDRStrings_clear()

SOAPY_SDR_API void SoapySDRStrings_clear | ( | char *** | elems,
|  | const size_t | length )

Clear the contents of a list of string Convenience call to deal with results that return a string list.