SoapySDR: Modules.h File Reference

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

Loading...
Searching...
No Matches
Functions
Modules.h File Reference
`#include <SoapySDR/Config.h>`
`#include <SoapySDR/Types.h>`
`#include <stddef.h>`

Go to the source code of this file.

## Functions
SOAPY_SDR_API const char * | SoapySDR_getRootPath (void)
| Query the root installation path.
SOAPY_SDR_API char ** | SoapySDR_listSearchPaths (size_t *length)
SOAPY_SDR_API char ** | SoapySDR_listModules (size_t *length)
SOAPY_SDR_API char ** | SoapySDR_listModulesPath (const char *path, size_t *length)
SOAPY_SDR_API char * | SoapySDR_loadModule (const char *path)
SOAPY_SDR_API SoapySDRKwargs | SoapySDR_getLoaderResult (const char *path)
SOAPY_SDR_API char * | SoapySDR_getModuleVersion (const char *path)
SOAPY_SDR_API char * | SoapySDR_unloadModule (const char *path)
SOAPY_SDR_API void | SoapySDR_loadModules (void)
SOAPY_SDR_API void | SoapySDR_unloadModules (void)

## Detailed Description

Utility functions to deal with modules. These utility functions are made available for advanced usage. For most use cases, the API will automatically load modules.

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

## Function Documentation

## ◆ SoapySDR_getLoaderResult()

SOAPY_SDR_API SoapySDRKwargs SoapySDR_getLoaderResult | ( | const char * | path | ) |

List all registration loader errors for a given module path. The resulting dictionary contains all registry entry names provided by the specified module. The value of each entry is an error message string or empty on successful load.

Parameters

  path | the path to a specific module file

Returns
  a dictionary of registry names to error messages

## ◆ SoapySDR_getModuleVersion()

SOAPY_SDR_API char * SoapySDR_getModuleVersion | ( | const char * | path | ) |

Get a version string for the specified module. Modules may optionally provide version strings.

Parameters

  path | the path to a specific module file

Returns
  a version string or empty if no version provided

## ◆ SoapySDR_getRootPath()

SOAPY_SDR_API const char * SoapySDR_getRootPath | ( | void |  | ) |

Query the root installation path.

## ◆ SoapySDR_listModules()

SOAPY_SDR_API char ** SoapySDR_listModules | ( | size_t * | length | ) |

List all modules found in default path. The result is an array of strings owned by the caller.

Parameters

  [out] | length | the number of elements in the result.

Returns
  a list of file paths to loadable modules

## ◆ SoapySDR_listModulesPath()

SOAPY_SDR_API char ** SoapySDR_listModulesPath | ( | const char * | path,
|  | size_t * | length
| ) |  |

List all modules found in the given path. The result is an array of strings owned by the caller.

Parameters

  | path | a directory on the system
  [out] | length | the number of elements in the result.

Returns
  a list of file paths to loadable modules

## ◆ SoapySDR_listSearchPaths()

SOAPY_SDR_API char ** SoapySDR_listSearchPaths | ( | size_t * | length | ) |

The list of paths automatically searched by loadModules().

Parameters

  [out] | length | the number of elements in the result.

Returns
  a list of automatically searched file paths

## ◆ SoapySDR_loadModule()

SOAPY_SDR_API char * SoapySDR_loadModule | ( | const char * | path | ) |

Load a single module given its file system path. The caller must free the result error string.

Parameters

  path | the path to a specific module file

Returns
  an error message, empty on success

## ◆ SoapySDR_loadModules()

SOAPY_SDR_API void SoapySDR_loadModules | ( | void |  | ) |

Load the support modules installed on this system. This call will only actually perform the load once. Subsequent calls are a NOP.

## ◆ SoapySDR_unloadModule()

SOAPY_SDR_API char * SoapySDR_unloadModule | ( | const char * | path | ) |

Unload a module that was loaded with loadModule(). The caller must free the result error string.

Parameters

  path | the path to a specific module file

Returns
  an error message, empty on success

## ◆ SoapySDR_unloadModules()

SOAPY_SDR_API void SoapySDR_unloadModules | ( | void |  | ) |

Unload all currently loaded support modules.