1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-05-06 01:14:10 +00:00

Clean acquisition interface

This commit is contained in:
Antonio Ramos 2017-12-21 16:20:11 +01:00
parent 2d8141d9b5
commit 8932e9a51b
3 changed files with 17 additions and 18 deletions

View File

@ -53,7 +53,6 @@ template<typename Data>class concurrent_queue;
class AcquisitionInterface: public GNSSBlockInterface class AcquisitionInterface: public GNSSBlockInterface
{ {
public: public:
//virtual void set_active(bool active) = 0;
virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0; virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0;
virtual void set_channel(unsigned int channel) = 0; virtual void set_channel(unsigned int channel) = 0;
virtual void set_threshold(float threshold) = 0; virtual void set_threshold(float threshold) = 0;

View File

@ -151,7 +151,7 @@ GNSSBlockFactory::~GNSSBlockFactory()
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource(
std::shared_ptr<ConfigurationInterface> configuration, boost::shared_ptr<gr::msg_queue> queue, int ID) std::shared_ptr<ConfigurationInterface> configuration, gr::msg_queue::sptr queue, int ID)
{ {
std::string default_implementation = "File_Signal_Source"; std::string default_implementation = "File_Signal_Source";
std::string role = "SignalSource"; //backwards compatibility for old conf files std::string role = "SignalSource"; //backwards compatibility for old conf files
@ -264,7 +264,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetPVT(std::shared_ptr<Con
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue) gr::msg_queue::sptr queue)
{ {
//"appendix" is added to the "role" with the aim of Acquisition, Tracking and Telemetry Decoder adapters //"appendix" is added to the "role" with the aim of Acquisition, Tracking and Telemetry Decoder adapters
//can find their specific configurations when they read the config //can find their specific configurations when they read the config
@ -332,7 +332,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C(
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue) gr::msg_queue::sptr queue)
{ {
LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: "
@ -397,7 +397,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S(
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue) gr::msg_queue::sptr queue)
{ {
std::stringstream stream; std::stringstream stream;
stream << channel; stream << channel;
@ -464,7 +464,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B(
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5X( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5X(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue) gr::msg_queue::sptr queue)
{ {
std::stringstream stream; std::stringstream stream;
stream << channel; stream << channel;
@ -531,7 +531,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5X(
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_L5( std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_L5(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue) gr::msg_queue::sptr queue)
{ {
std::stringstream stream; std::stringstream stream;
stream << channel; stream << channel;
@ -597,7 +597,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_L5(
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFactory::GetChannels( std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFactory::GetChannels(
std::shared_ptr<ConfigurationInterface> configuration, boost::shared_ptr<gr::msg_queue> queue) std::shared_ptr<ConfigurationInterface> configuration, gr::msg_queue::sptr queue)
{ {
std::string default_implementation = "Pass_Through"; std::string default_implementation = "Pass_Through";
std::string tracking_implementation; std::string tracking_implementation;
@ -783,7 +783,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,
std::string role, std::string role,
std::string implementation, unsigned int in_streams, std::string implementation, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue) unsigned int out_streams, gr::msg_queue::sptr queue)
{ {
std::unique_ptr<GNSSBlockInterface> block; std::unique_ptr<GNSSBlockInterface> block;

View File

@ -57,7 +57,7 @@ public:
GNSSBlockFactory(); GNSSBlockFactory();
virtual ~GNSSBlockFactory(); virtual ~GNSSBlockFactory();
std::unique_ptr<GNSSBlockInterface> GetSignalSource(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetSignalSource(std::shared_ptr<ConfigurationInterface> configuration,
boost::shared_ptr<gr::msg_queue> queue, int ID = -1); gr::msg_queue::sptr queue, int ID = -1);
std::unique_ptr<GNSSBlockInterface> GetSignalConditioner(std::shared_ptr<ConfigurationInterface> configuration, int ID = -1); std::unique_ptr<GNSSBlockInterface> GetSignalConditioner(std::shared_ptr<ConfigurationInterface> configuration, int ID = -1);
@ -66,7 +66,7 @@ public:
std::unique_ptr<GNSSBlockInterface> GetObservables(std::shared_ptr<ConfigurationInterface> configuration); std::unique_ptr<GNSSBlockInterface> GetObservables(std::shared_ptr<ConfigurationInterface> configuration);
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(std::shared_ptr<ConfigurationInterface> configuration,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
/* /*
* \brief Returns the block with the required configuration and implementation * \brief Returns the block with the required configuration and implementation
@ -74,29 +74,29 @@ public:
std::unique_ptr<GNSSBlockInterface> GetBlock(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetBlock(std::shared_ptr<ConfigurationInterface> configuration,
std::string role, std::string implementation, std::string role, std::string implementation,
unsigned int in_streams, unsigned int out_streams, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue = nullptr); gr::msg_queue::sptr queue = nullptr);
private: private:
std::unique_ptr<GNSSBlockInterface> GetChannel_1C(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetChannel_1C(std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
std::unique_ptr<GNSSBlockInterface> GetChannel_2S(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetChannel_2S(std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
std::unique_ptr<GNSSBlockInterface> GetChannel_1B(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetChannel_1B(std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
std::unique_ptr<GNSSBlockInterface> GetChannel_5X(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetChannel_5X(std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
std::unique_ptr<GNSSBlockInterface> GetChannel_L5(std::shared_ptr<ConfigurationInterface> configuration, std::unique_ptr<GNSSBlockInterface> GetChannel_L5(std::shared_ptr<ConfigurationInterface> configuration,
std::string acq, std::string trk, std::string tlm, int channel, std::string acq, std::string trk, std::string tlm, int channel,
boost::shared_ptr<gr::msg_queue> queue); gr::msg_queue::sptr queue);
std::unique_ptr<AcquisitionInterface> GetAcqBlock( std::unique_ptr<AcquisitionInterface> GetAcqBlock(
std::shared_ptr<ConfigurationInterface> configuration, std::shared_ptr<ConfigurationInterface> configuration,