mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-02 00:03:04 +00:00
code cleaning
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@262 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
@@ -47,29 +47,30 @@ SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
||||
GNSSBlockInterface *data_type_adapt, GNSSBlockInterface *in_filt,
|
||||
GNSSBlockInterface *res, std::string role, std::string implementation,
|
||||
gr_msg_queue_sptr queue) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt), res_(res), role_(role), implementation_(implementation),
|
||||
queue_(queue)
|
||||
in_filt_(in_filt), res_(res), role_(role), implementation_(implementation),
|
||||
queue_(queue)
|
||||
{
|
||||
connected_ = false;
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
SignalConditioner::~SignalConditioner()
|
||||
{
|
||||
delete data_type_adapt_;
|
||||
delete in_filt_;
|
||||
delete res_;
|
||||
delete data_type_adapt_;
|
||||
delete in_filt_;
|
||||
delete res_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SignalConditioner::connect(gr_top_block_sptr top_block)
|
||||
{
|
||||
|
||||
if (connected_)
|
||||
{
|
||||
LOG_AT_LEVEL(WARNING) << "Signal conditioner already connected internally";
|
||||
return;
|
||||
}
|
||||
|
||||
data_type_adapt_->connect(top_block);
|
||||
in_filt_->connect(top_block);
|
||||
res_->connect(top_block);
|
||||
@@ -85,9 +86,10 @@ void SignalConditioner::connect(gr_top_block_sptr top_block)
|
||||
connected_ = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SignalConditioner::disconnect(gr_top_block_sptr top_block)
|
||||
{
|
||||
|
||||
if (!connected_)
|
||||
{
|
||||
LOG_AT_LEVEL(WARNING) << "Signal conditioner already disconnected internally";
|
||||
@@ -106,6 +108,7 @@ void SignalConditioner::disconnect(gr_top_block_sptr top_block)
|
||||
connected_ = false;
|
||||
}
|
||||
|
||||
|
||||
gr_basic_block_sptr SignalConditioner::get_left_block()
|
||||
{
|
||||
return data_type_adapt_->get_left_block();
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <gnuradio/gr_msg_queue.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "control_message_factory.h"
|
||||
//#include "gnss_signal.h"
|
||||
//#include "gnss_synchro.h"
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -51,10 +49,9 @@ class TelemetryDecoderInterface;
|
||||
*/
|
||||
class SignalConditioner: public GNSSBlockInterface
|
||||
{
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
SignalConditioner(ConfigurationInterface *configuration,
|
||||
SignalConditioner(ConfigurationInterface *configuration,
|
||||
GNSSBlockInterface *data_type_adapt, GNSSBlockInterface *in_filt,
|
||||
GNSSBlockInterface *res, std::string role, std::string implementation,
|
||||
gr_msg_queue_sptr queue);
|
||||
@@ -68,34 +65,22 @@ public:
|
||||
gr_basic_block_sptr get_right_block();
|
||||
|
||||
std::string role(){ return role_; }
|
||||
|
||||
std::string implementation(){ return "Signal_Conditioner"; }
|
||||
|
||||
size_t item_size(){ return 0; }
|
||||
|
||||
GNSSBlockInterface *data_type_adapter(){ return data_type_adapt_; }
|
||||
|
||||
GNSSBlockInterface *input_filter(){ return in_filt_; }
|
||||
|
||||
GNSSBlockInterface *resampler(){ return res_; }
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
GNSSBlockInterface *data_type_adapt_;
|
||||
GNSSBlockInterface *in_filt_;
|
||||
GNSSBlockInterface *res_;
|
||||
|
||||
std::string role_;
|
||||
std::string implementation_;
|
||||
|
||||
bool connected_;
|
||||
//bool stop_;
|
||||
gr_msg_queue_sptr queue_;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_SIGNAL_CONDITIONER_H_*/
|
||||
|
||||
Reference in New Issue
Block a user