mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-08 11:46:46 +00:00
Make constructors private, fix documentation
This commit is contained in:
parent
69431e535d
commit
10a42945e6
@ -48,6 +48,7 @@ gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs,
|
||||
class gnss_sdr_fpga_sample_counter : public gr::block
|
||||
{
|
||||
private:
|
||||
friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
gnss_sdr_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
uint32_t test_register(uint32_t writeval);
|
||||
void configure_samples_per_output(uint32_t interval);
|
||||
@ -76,7 +77,6 @@ private:
|
||||
bool is_open;
|
||||
|
||||
public:
|
||||
friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
~gnss_sdr_fpga_sample_counter();
|
||||
int general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items,
|
||||
|
@ -65,6 +65,9 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter(
|
||||
}
|
||||
|
||||
|
||||
gnss_sdr_sample_counter::~gnss_sdr_sample_counter() = default;
|
||||
|
||||
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size)
|
||||
{
|
||||
gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs, _interval_ms, _size));
|
||||
|
@ -51,6 +51,7 @@ gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(
|
||||
class gnss_sdr_sample_counter : public gr::sync_decimator
|
||||
{
|
||||
private:
|
||||
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
gnss_sdr_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
uint32_t samples_per_output;
|
||||
double fs;
|
||||
@ -68,7 +69,7 @@ private:
|
||||
bool flag_enable_send_msg;
|
||||
|
||||
public:
|
||||
friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
~gnss_sdr_sample_counter();
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
@ -52,6 +52,9 @@ gnss_sdr_time_counter::gnss_sdr_time_counter() : gr::block("time_counter",
|
||||
}
|
||||
|
||||
|
||||
gnss_sdr_time_counter::~gnss_sdr_time_counter() = default;
|
||||
|
||||
|
||||
gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter()
|
||||
{
|
||||
gnss_sdr_time_counter_sptr counter_(new gnss_sdr_time_counter());
|
||||
|
@ -59,6 +59,7 @@ private:
|
||||
friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter();
|
||||
|
||||
public:
|
||||
~gnss_sdr_time_counter();
|
||||
int general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)), gr_vector_void_star &output_items);
|
||||
};
|
||||
|
@ -35,6 +35,8 @@
|
||||
#define GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
|
||||
|
||||
#include "gnss_synchro_udp_sink.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/runtime_types.h> // for gr_vector_void_star
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -51,7 +53,9 @@ gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
|
||||
const std::vector<std::string>& udp_addresses);
|
||||
|
||||
/*!
|
||||
* \brief This class implements a block that computes the PVT solution with Galileo E1 signals
|
||||
* \brief This class implements a monitoring block which allows sending
|
||||
* a data stream with the receiver internal parameters (Gnss_Synchro objects)
|
||||
* to local or remote clients over UDP.
|
||||
*/
|
||||
class gnss_synchro_monitor : public gr::sync_block
|
||||
{
|
||||
@ -61,21 +65,17 @@ private:
|
||||
int udp_port,
|
||||
const std::vector<std::string>& udp_addresses);
|
||||
|
||||
unsigned int d_nchannels;
|
||||
|
||||
int d_decimation_factor;
|
||||
|
||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||
|
||||
int count;
|
||||
|
||||
|
||||
public:
|
||||
gnss_synchro_monitor(unsigned int n_channels,
|
||||
int decimation_factor,
|
||||
int udp_port,
|
||||
const std::vector<std::string>& udp_addresses);
|
||||
|
||||
unsigned int d_nchannels;
|
||||
int d_decimation_factor;
|
||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||
int count;
|
||||
|
||||
public:
|
||||
~gnss_synchro_monitor(); //!< Default destructor
|
||||
|
||||
int work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||
|
@ -44,6 +44,7 @@ Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(std::vector<std::string> addresses,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Gnss_Synchro_Udp_Sink::write_gnss_synchro(const std::vector<Gnss_Synchro>& stocks)
|
||||
{
|
||||
std::ostringstream archive_stream;
|
||||
|
@ -35,10 +35,15 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
/*!
|
||||
* \brief This class sends serialized Gnss_Synchro objects
|
||||
* over UDP to one or multiple endpoints.
|
||||
*/
|
||||
class Gnss_Synchro_Udp_Sink
|
||||
{
|
||||
public:
|
||||
|
@ -1664,10 +1664,10 @@ void GNSSFlowgraph::init()
|
||||
|
||||
if (enable_monitor_)
|
||||
{
|
||||
GnssSynchroMonitor_ = gr::basic_block_sptr(new gnss_synchro_monitor(channels_count_,
|
||||
GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_,
|
||||
configuration_->property("Monitor.decimation_factor", 1),
|
||||
configuration_->property("Monitor.udp_port", 1234),
|
||||
udp_addr_vec));
|
||||
udp_addr_vec);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user