mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 19:55:47 +00:00
Restore old behavior to gnss_valve if the same constructor is used (Fix tests)
This commit is contained in:
parent
4ee36cd2cc
commit
e0fb3518db
@ -40,7 +40,8 @@
|
|||||||
|
|
||||||
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
|
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
|
||||||
unsigned long long nitems,
|
unsigned long long nitems,
|
||||||
gr::msg_queue::sptr queue, bool stop_flowgraph) : gr::sync_block("valve",
|
gr::msg_queue::sptr queue,
|
||||||
|
bool stop_flowgraph) : gr::sync_block("valve",
|
||||||
gr::io_signature::make(1, 1, sizeof_stream_item),
|
gr::io_signature::make(1, 1, sizeof_stream_item),
|
||||||
gr::io_signature::make(1, 1, sizeof_stream_item)),
|
gr::io_signature::make(1, 1, sizeof_stream_item)),
|
||||||
d_nitems(nitems),
|
d_nitems(nitems),
|
||||||
@ -58,16 +59,20 @@ boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsi
|
|||||||
return valve_;
|
return valve_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue)
|
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, false));
|
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, true));
|
||||||
return valve_;
|
return valve_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gnss_sdr_valve::open_valve()
|
void gnss_sdr_valve::open_valve()
|
||||||
{
|
{
|
||||||
d_open_valve = true;
|
d_open_valve = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int gnss_sdr_valve::work(int noutput_items,
|
int gnss_sdr_valve::work(int noutput_items,
|
||||||
gr_vector_const_void_star &input_items,
|
gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items)
|
gr_vector_void_star &output_items)
|
||||||
|
@ -41,10 +41,12 @@
|
|||||||
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
|
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
|
||||||
unsigned long long nitems,
|
unsigned long long nitems,
|
||||||
gr::msg_queue::sptr queue);
|
gr::msg_queue::sptr queue);
|
||||||
|
|
||||||
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
|
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
|
||||||
unsigned long long nitems,
|
unsigned long long nitems,
|
||||||
gr::msg_queue::sptr queue,
|
gr::msg_queue::sptr queue,
|
||||||
bool stop_flowgraph);
|
bool stop_flowgraph);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Implementation of a GNU Radio block that sends a STOP message to the
|
* \brief Implementation of a GNU Radio block that sends a STOP message to the
|
||||||
* control queue right after a specific number of samples have passed through it.
|
* control queue right after a specific number of samples have passed through it.
|
||||||
@ -59,7 +61,6 @@ class gnss_sdr_valve : public gr::sync_block
|
|||||||
gr::msg_queue::sptr queue,
|
gr::msg_queue::sptr queue,
|
||||||
bool stop_flowgraph);
|
bool stop_flowgraph);
|
||||||
|
|
||||||
|
|
||||||
unsigned long long d_nitems;
|
unsigned long long d_nitems;
|
||||||
unsigned long long d_ncopied_items;
|
unsigned long long d_ncopied_items;
|
||||||
gr::msg_queue::sptr d_queue;
|
gr::msg_queue::sptr d_queue;
|
||||||
|
Loading…
Reference in New Issue
Block a user