25 #include <libconfig.h++>
30 #include "cpprest/json.h"
31 #include "cpprest/http_listener.h"
32 #include "cpprest/uri.h"
33 #include "cpprest/asyncrt_utils.h"
34 #include "cpprest/filestream.h"
35 #include "cpprest/containerstream.h"
36 #include "cpprest/producerconsumerstream.h"
72 void SetData( std::vector<uint8_t> data) {
86 std::vector<uint8_t>
_data = {};
108 std::map<uint32_t, ChannelInfo>
_mch;
118 void get(web::http::http_request message);
119 void put(web::http::http_request message);
123 std::unique_ptr<web::http::experimental::listener::http_listener>
_listener;
RX Info pertaining to an SCH (MCCH/MCH or PDSCH)
std::vector< uint8_t > _data
std::vector< uint8_t > GetData()
void SetData(std::vector< uint8_t > data)
std::unique_ptr< web::http::experimental::listener::http_listener > _listener
float cinr_db()
Current CINR value.
std::vector< uint8_t > _ce_values
Time domain subcarrier CE values.
void put(web::http::http_request message)
ChannelInfo _mcch
RX info for MCCH.
std::vector< float > _cinr_db
void add_cinr_value(float cinr)
std::map< uint32_t, ChannelInfo > _mch
RX info for MCHs.
std::function< void(const std::string &antenna, unsigned fcen, double gain, unsigned sample_rate, unsigned bandwidth)> set_params_t
Definition of the callback for setting new reception parameters.
const libconfig::Config & _cfg
RestHandler(const libconfig::Config &cfg, const std::string &url, state_t &state, SdrReader &sdr, Phy &phy, set_params_t set_params)
Default constructor.
void get(web::http::http_request message)
ChannelInfo _pdsch
RX info for PDSCH.
virtual ~RestHandler()
Default destructor.
bool _require_bearer_token
Interface to the SDR stick.
static Config cfg
Global configuration object.
static std::string antenna
Antenna input to be used.
static unsigned sample_rate
Sample rate of the SDR.
static uint32_t bandwidth
Low pass filter bandwidth for the SDR.
void set_params(const std::string &ant, unsigned fc, double g, unsigned sr, unsigned bw)
Set new SDR parameters and initialize resynchronisation.
static double gain
Overall system gain for the SDR.