PicoScenes API Docs
 
Loading...
Searching...
No Matches
SDRResamplingPreset.hxx
Go to the documentation of this file.
1//
2// Created by Zhiping Jiang on 11/27/22.
3//
4
5#ifndef PICOSCENES_PLATFORM_SDRRESAMPLINGPRESET_HXX
6#define PICOSCENES_PLATFORM_SDRRESAMPLINGPRESET_HXX
7
8#include <optional>
9#include <iostream>
10#include <map>
11#include <memory>
12#include <vector>
13
15public:
16 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_20;
17 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_25;
18 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_40;
19 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_50;
20 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_100;
21 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_20_200;
22 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_40_40;
23 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_40_50;
24 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_40_100;
25 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_40_200;
26 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_80_100;
27 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_80_200;
28 static const std::shared_ptr<SDRResamplingPreset> Preset_TX_160_200;
29
30 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_20;
31 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_25;
32 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_40;
33 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_50;
34 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_100;
35 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_20_200;
36 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_40_40;
37 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_40_50;
38 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_40_100;
39 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_40_200;
40 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_80_100;
41 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_80_200;
42 static const std::shared_ptr<SDRResamplingPreset> Preset_RX_160_200;
43
44 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_20;
45 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_25;
46 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_40;
47 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_50;
48 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_100;
49 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_20_200;
50 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_40_40;
51 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_40_50;
52 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_40_100;
53 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_40_200;
54 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_80_100;
55 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_80_200;
56 static const std::shared_ptr<SDRResamplingPreset> Preset_TR_160_200;
57
58 bool operator==(const SDRResamplingPreset &rhs) const;
59
60 bool operator<(const SDRResamplingPreset &rhs) const;
61
62 friend std::ostream &operator<<(std::ostream &os, const SDRResamplingPreset &preset);
63
64 static const std::vector<std::shared_ptr<SDRResamplingPreset>> &getPresetList();
65
66 static const std::map<std::string, std::shared_ptr<SDRResamplingPreset>> &getPresetMap();
67
69
71
72 const std::string presetName{};
73 const std::string description{};
74
75 const std::optional<double> txCBW{std::nullopt};
76 const std::optional<double> txSamplingRate{std::nullopt};
77 const std::optional<double> txResampleRatio{std::nullopt};
78
79 const std::optional<double> rxCBW{std::nullopt};
80 const std::optional<double> rxSamplingRate{std::nullopt};
81 const std::optional<double> rxResampleRatio{std::nullopt};
82
83private:
84 explicit SDRResamplingPreset(std::string presetName, const std::optional<double> &txCbw = std::nullopt, const std::optional<double> &txSamplingRate = std::nullopt, const std::optional<double> &rxCbw = std::nullopt, const std::optional<double> &rxSamplingRate = std::nullopt, std::string description = "");
85};
86
87
88#endif //PICOSCENES_PLATFORM_SDRRESAMPLINGPRESET_HXX
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_40_50
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_40_200
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_40
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_160_200
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_20
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_100
static std::string printHelpContentForSDRResamplingPreset()
static const std::vector< std::shared_ptr< SDRResamplingPreset > > & getPresetList()
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_40_50
const std::string presetName
const std::optional< double > rxCBW
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_80_100
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_100
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_25
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_40_100
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_40_100
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_200
const std::optional< double > rxSamplingRate
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_80_200
bool operator==(const SDRResamplingPreset &rhs) const
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_40_200
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_40_100
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_80_100
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_50
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_40_50
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_80_200
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_80_100
const std::optional< double > txCBW
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_40_40
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_25
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_40
SDRResamplingPreset()=delete
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_160_200
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_20
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_40_200
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_20
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_80_200
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_40
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_40_40
const std::optional< double > txSamplingRate
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_200
friend std::ostream & operator<<(std::ostream &os, const SDRResamplingPreset &preset)
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_200
const std::optional< double > txResampleRatio
const std::string description
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_160_200
const std::optional< double > rxResampleRatio
bool operator<(const SDRResamplingPreset &rhs) const
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_50
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_40_40
static const std::shared_ptr< SDRResamplingPreset > Preset_TX_20_25
static const std::map< std::string, std::shared_ptr< SDRResamplingPreset > > & getPresetMap()
static const std::shared_ptr< SDRResamplingPreset > Preset_RX_20_100
static const std::shared_ptr< SDRResamplingPreset > Preset_TR_20_50