SoapySDR  0.4.4-gdb459f4f
Vendor and platform neutral SDR interface library
Types.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 #include <SoapySDR/Config.hpp>
13 #include <SoapySDR/Types.h>
14 #include <vector>
15 #include <string>
16 #include <map>
17 
18 namespace SoapySDR
19 {
20 
22 typedef std::map<std::string, std::string> Kwargs;
23 
25 typedef std::vector<Kwargs> KwargsList;
26 
31 {
32 public:
33 
35  Range(void);
36 
38  Range(const double minimum, const double maximum);
39 
41  double minimum(void) const;
42 
44  double maximum(void) const;
45 
46 private:
47  double _min, _max;
48 };
49 
55 typedef std::vector<Range> RangeList;
56 
61 {
62 public:
63 
65  ArgInfo(void);
66 
68  std::string key;
69 
75  std::string value;
76 
78  std::string name;
79 
81  std::string description;
82 
84  std::string units;
85 
87  enum Type {BOOL, INT, FLOAT, STRING} type;
88 
95 
100  std::vector<std::string> options;
101 
106  std::vector<std::string> optionNames;
107 };
108 
112 typedef std::vector<ArgInfo> ArgInfoList;
113 
114 }
115 
116 inline double SoapySDR::Range::minimum(void) const
117 {
118  return _min;
119 }
120 
121 inline double SoapySDR::Range::maximum(void) const
122 {
123  return _max;
124 }
Definition: Types.hpp:30
double maximum(void) const
Get the range maximum.
Definition: Types.hpp:121
std::vector< Kwargs > KwargsList
Typedef for a list of key-word dictionaries.
Definition: Types.hpp:25
std::vector< ArgInfo > ArgInfoList
Definition: Types.hpp:112
Range range
Definition: Types.hpp:94
std::map< std::string, std::string > Kwargs
Typedef for a dictionary of key-value string arguments.
Definition: Types.hpp:22
std::vector< Range > RangeList
Definition: Types.hpp:55
Definition: Types.hpp:60
Definition: Device.hpp:21
double minimum(void) const
Get the range minimum.
Definition: Types.hpp:116
std::string description
A brief description about the argument (optional)
Definition: Types.hpp:81
#define SOAPY_SDR_API
Definition: Config.h:41
std::vector< std::string > options
Definition: Types.hpp:100
std::string key
The key used to identify the argument (required)
Definition: Types.hpp:68
std::vector< std::string > optionNames
Definition: Types.hpp:106
std::string name
The displayable name of the argument (optional, use key if empty)
Definition: Types.hpp:78
std::string units
The units of the argument: dB, Hz, etc (optional)
Definition: Types.hpp:84
Type
The data type of the argument (required)
Definition: Types.hpp:87
std::string value
Definition: Types.hpp:75