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"
80 void SetData( std::vector<uint8_t> data) {
95 std::vector<uint8_t>
_data = {};
139 std::map<uint32_t, ChannelInfo>
_mch;
170 void get(web::http::http_request message);
171 void put(web::http::http_request message);
175 std::unique_ptr<web::http::experimental::listener::http_listener>
_listener;
Frame processor for CAS subframes.
Frame processor for MBSFN subframes.
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)
CasFrameProcessor * _cas_processor
void set_cas_processor(CasFrameProcessor *cas_processor)
Save the pointer to the CasFrameProcessor.
std::vector< uint8_t > _cir_values
Time domain channel impulse response of the CAS.
std::unique_ptr< web::http::experimental::listener::http_listener > _listener
float cinr_db()
Current instantaneous CINR value.
float cinr_db_avg()
Current average CINR value.
std::vector< uint8_t > _ce_values
Time domain subcarrier CE values.
void put(web::http::http_request message)
std::vector< uint8_t > _corr_values
Correlaton samples from the sync functions.
void start()
Start function for the listener.
ChannelInfo _mcch
RX info for MCCH.
std::vector< float > _cinr_db
std::vector< MbsfnFrameProcessor * > _mbsfn_processors
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.
void set_mbsfn_processor(MbsfnFrameProcessor *mbsfn_processor)
Save the pointer to the vector cointaining the MbsfnFrameProcessors.
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.
std::vector< uint8_t > _corr_values_mbsfn
Correlaton samples from the sync functions.
bool _require_bearer_token
std::vector< uint8_t > _cir_values_mbsfn
Time domain channel impulse response of the mbsfn subframes.
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.