mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
a1631e88c0
@ -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)
|
||||||
@ -87,7 +92,7 @@ int gnss_sdr_valve::work(int noutput_items,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
usleep(1000000);
|
usleep(1000000);
|
||||||
return 0; //do not produce or consume
|
return 0; // do not produce or consume
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unsigned long long n = std::min(d_nitems - d_ncopied_items, static_cast<long long unsigned int>(noutput_items));
|
unsigned long long n = std::min(d_nitems - d_ncopied_items, static_cast<long long unsigned int>(noutput_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;
|
||||||
|
@ -627,6 +627,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(gnuradio_block_test gtest)
|
add_dependencies(gnuradio_block_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif(NOT ${GTEST_DIR_LOCAL})
|
||||||
|
set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
@ -653,6 +654,7 @@ else(NOT ${GTEST_DIR_LOCAL})
|
|||||||
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
|
||||||
endif(MATIO_FOUND)
|
endif(MATIO_FOUND)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif(NOT ${GTEST_DIR_LOCAL})
|
||||||
|
set_property(TEST matio_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
@ -679,6 +681,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(acq_test acq_test gtest)
|
add_dependencies(acq_test acq_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif(NOT ${GTEST_DIR_LOCAL})
|
||||||
|
set_property(TEST acq_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
@ -707,6 +710,8 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
else(NOT ${GTEST_DIR_LOCAL})
|
else(NOT ${GTEST_DIR_LOCAL})
|
||||||
add_dependencies(trk_test gtest)
|
add_dependencies(trk_test gtest)
|
||||||
endif(NOT ${GTEST_DIR_LOCAL})
|
endif(NOT ${GTEST_DIR_LOCAL})
|
||||||
|
set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
||||||
|
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user