mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14:51 +00:00
Minor changes
This commit is contained in:
parent
320b4e2d7b
commit
a90edd025c
@ -184,6 +184,7 @@ gr::basic_block_sptr Channel::get_right_block()
|
||||
|
||||
void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
gnss_signal_ = gnss_signal;
|
||||
std::string str_aux = gnss_signal_.get_signal_str();
|
||||
const char * str = str_aux.c_str(); // get a C style null terminated string
|
||||
@ -198,6 +199,7 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
||||
|
||||
void Channel::start_acquisition()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
bool result = false;
|
||||
result = channel_fsm_->Event_start_acquisition();
|
||||
if(!result)
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/block.h>
|
||||
#include "channel_interface.h"
|
||||
@ -63,8 +64,7 @@ public:
|
||||
Channel(ConfigurationInterface *configuration, unsigned int channel,
|
||||
std::shared_ptr<GNSSBlockInterface> pass_through, std::shared_ptr<AcquisitionInterface> acq,
|
||||
std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav,
|
||||
std::string role, std::string implementation,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::string role, std::string implementation, gr::msg_queue::sptr queue);
|
||||
//! Virtual destructor
|
||||
virtual ~Channel();
|
||||
|
||||
@ -79,6 +79,7 @@ public:
|
||||
inline std::string implementation() override { return implementation_; }
|
||||
|
||||
inline size_t item_size() override { return 0; }
|
||||
|
||||
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
|
||||
|
||||
void start_acquisition() override; //!< Start the State Machine
|
||||
@ -106,6 +107,7 @@ private:
|
||||
bool repeat_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::msg_queue::sptr queue_;
|
||||
std::mutex mx;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_CHANNEL_H_*/
|
||||
|
@ -139,21 +139,25 @@ bool ChannelFsm::Event_failed_tracking_standby()
|
||||
|
||||
void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
acq_ = acquisition;
|
||||
}
|
||||
|
||||
void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
trk_ = tracking;
|
||||
}
|
||||
|
||||
void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
queue_ = queue;
|
||||
}
|
||||
|
||||
void ChannelFsm::set_channel(unsigned int channel)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
channel_ = channel;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user