SoapySDR  0.4.4-gdb459f4f
Vendor and platform neutral SDR interface library
Classes | Typedefs | Functions
SoapySDR Namespace Reference

Classes

class  ArgInfo
 
class  Device
 
class  Range
 
class  Registry
 

Typedefs

typedef SoapySDRLogLevel LogLevel
 
typedef SoapySDRLogHandler LogHandler
 
typedef KwargsList(* FindFunction) (const Kwargs &)
 typedef for a device enumeration function More...
 
typedef Device *(* MakeFunction) (const Kwargs &)
 typedef for a device factory function More...
 
typedef std::map< std::string, FindFunctionFindFunctions
 typedef for a dictionary of find functions More...
 
typedef std::map< std::string, MakeFunctionMakeFunctions
 typedef for a dictionary of make functions More...
 
typedef std::map< std::string, std::string > Kwargs
 Typedef for a dictionary of key-value string arguments. More...
 
typedef std::vector< KwargsKwargsList
 Typedef for a list of key-word dictionaries. More...
 
typedef std::vector< RangeRangeList
 
typedef std::vector< ArgInfoArgInfoList
 

Functions

SOAPY_SDR_API const char * errToStr (const int errorCode)
 
SOAPY_SDR_API size_t formatToSize (const std::string &format)
 
SOAPY_SDR_API void log (const LogLevel logLevel, const std::string &message)
 
SOAPY_SDR_API void vlogf (const SoapySDRLogLevel logLevel, const char *format, va_list argList)
 
static void logf (const SoapySDRLogLevel logLevel, const char *format,...)
 
SOAPY_SDR_API void registerLogHandler (const LogHandler &handler)
 
SOAPY_SDR_API void setLogLevel (const LogLevel logLevel)
 
SOAPY_SDR_API std::string getRootPath (void)
 Query the root installation path. More...
 
SOAPY_SDR_API std::vector< std::string > listModules (void)
 
SOAPY_SDR_API std::vector< std::string > listModules (const std::string &path)
 
SOAPY_SDR_API std::string loadModule (const std::string &path)
 
SOAPY_SDR_API Kwargs getLoaderResult (const std::string &path)
 
SOAPY_SDR_API std::string unloadModule (const std::string &path)
 
SOAPY_SDR_API void loadModules (void)
 
static long long ticksToTimeNs (const long long ticks, const double rate)
 
static long long timeNsToTicks (const long long timeNs, const double rate)
 
SOAPY_SDR_API std::string getAPIVersion (void)
 Query the API version string. More...
 
SOAPY_SDR_API std::string getABIVersion (void)
 

Typedef Documentation

typedef std::vector<ArgInfo> SoapySDR::ArgInfoList

Typedef for a list of Argument infos.

typedef KwargsList(* SoapySDR::FindFunction) (const Kwargs &)

typedef for a device enumeration function

typedef std::map<std::string, FindFunction> SoapySDR::FindFunctions

typedef for a dictionary of find functions

typedef std::map<std::string, std::string> SoapySDR::Kwargs

Typedef for a dictionary of key-value string arguments.

typedef std::vector<Kwargs> SoapySDR::KwargsList

Typedef for a list of key-word dictionaries.

Typedef for the registered log handler function.

typedef Device*(* SoapySDR::MakeFunction) (const Kwargs &)

typedef for a device factory function

typedef std::map<std::string, MakeFunction> SoapySDR::MakeFunctions

typedef for a dictionary of make functions

typedef std::vector<Range> SoapySDR::RangeList

Typedef for a list of min/max range pairs. Overall minimum: rl.front().minimum(); Overall maximum: rl.back().maximum();

Function Documentation

SOAPY_SDR_API const char* SoapySDR::errToStr ( const int  errorCode)

Convert a error code to a string for printing purposes. If the error code is unrecognized, errToStr returns "UNKNOWN".

Parameters
errorCodea negative integer return code
Returns
a pointer to a string representing the error
SOAPY_SDR_API size_t SoapySDR::formatToSize ( const std::string &  format)

Get the size of a single element in the specified format.

Parameters
formata supported format string
Returns
the size of an element in bytes
SOAPY_SDR_API std::string SoapySDR::getABIVersion ( void  )

Get the ABI version string. This is the SOAPY_SDR_ABI_VERSION that the library was built against.

SOAPY_SDR_API std::string SoapySDR::getAPIVersion ( void  )

Query the API version string.

SOAPY_SDR_API Kwargs SoapySDR::getLoaderResult ( const std::string &  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
paththe path to a specific module file
Returns
a dictionary of registry names to error messages
SOAPY_SDR_API std::string SoapySDR::getRootPath ( void  )

Query the root installation path.

SOAPY_SDR_API std::vector<std::string> SoapySDR::listModules ( void  )

List all modules found in default path.

Returns
a list of file paths to loadable modules
SOAPY_SDR_API std::vector<std::string> SoapySDR::listModules ( const std::string &  path)

List all modules found in the given path.

Parameters
patha directory on the system
Returns
a list of file paths to loadable modules
SOAPY_SDR_API std::string SoapySDR::loadModule ( const std::string &  path)

Load a single module given its file system path.

Parameters
paththe path to a specific module file
returnan error message, empty on success
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.

SOAPY_SDR_API void SoapySDR::log ( const LogLevel  logLevel,
const std::string &  message 
)

Send a message to the registered logger.

Parameters
logLevela possible logging level
messagea logger message string
static void SoapySDR::logf ( const SoapySDRLogLevel  logLevel,
const char *  format,
  ... 
)
inlinestatic

Send a message to the registered logger.

Parameters
logLevela possible logging level
formata printf style format string
SOAPY_SDR_API void SoapySDR::registerLogHandler ( const LogHandler handler)

Register a new system log handler. Platforms should call this to replace the default stdio handler.

SOAPY_SDR_API void SoapySDR::setLogLevel ( const LogLevel  logLevel)

Set the log level threshold. Log messages with lower priority are dropped.

static long long SoapySDR::ticksToTimeNs ( const long long  ticks,
const double  rate 
)
inlinestatic

Convert a tick count into a time in nanoseconds using the tick rate.

Parameters
ticksa integer tick count
ratethe ticks per second
Returns
the time in nanoseconds
static long long SoapySDR::timeNsToTicks ( const long long  timeNs,
const double  rate 
)
inlinestatic

Convert a time in nanoseconds into a tick count using the tick rate.

Parameters
timeNstime in nanoseconds
ratethe ticks per second
Returns
the integer tick count
SOAPY_SDR_API std::string SoapySDR::unloadModule ( const std::string &  path)

Unload a module that was loaded with loadModule().

Parameters
paththe path to a specific module file
returnan error message, empty on success
SOAPY_SDR_API void SoapySDR::vlogf ( const SoapySDRLogLevel  logLevel,
const char *  format,
va_list  argList 
)

Send a message to the registered logger.

Parameters
logLevela possible logging level
formata printf style format string
argListan argument list for the formatter