SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
RadioModels.hxx
Go to the documentation of this file.
1#pragma once
2/*
3Copyright (c) 2026 Matthew H. Reilly (kb1vc)
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are
8met:
9
10 Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in
14 the documentation and/or other materials provided with the
15 distribution.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
42
43#include "Radio.hxx"
44#include <string>
45#include <vector>
46#include <map>
47
48namespace SoDa {
50 private:
55
56 public:
65 static RadioPtr make(const std::string & hardware_name,
66 ParamsPtr params);
67
68 static std::vector<std::string> getModels();
69
70 private:
76 static void init();
77
78 static bool init_complete;
79
80 static std::map<std::string, std::function<RadioPtr(ParamsPtr params)>> model_map;
81 };
82}
83
84
85
Base class for all hardware modules (USRP, Pluto, RTLSDR, etc) that starts all required processes (e....
static void init()
this initializes the model map.
RadioModels()
an actual RadioModels object should never be created.
static std::map< std::string, std::function< RadioPtr(ParamsPtr params)> > model_map
static std::vector< std::string > getModels()
static bool init_complete
static RadioPtr make(const std::string &hardware_name, ParamsPtr params)
create a Radio unit.
std::shared_ptr< Params > ParamsPtr
Definition Params.hxx:42
std::shared_ptr< Radio > RadioPtr
Definition Radio.hxx:52