diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d53400..3736a7b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,7 @@ if(NOT CMAKE_MODULES_DIR) set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) endif(NOT CMAKE_MODULES_DIR) -set(GR_INCLUDE_DIR include/bokehgui) +set(GR_INCLUDE_DIR include/gnuradio/bokehgui) set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/bokehgui) set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME}) set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}) @@ -173,7 +173,7 @@ add_custom_target(uninstall ######################################################################## # Add subdirectories ######################################################################## -add_subdirectory(include/bokehgui) +add_subdirectory(include/gnuradio/bokehgui) add_subdirectory(lib) add_subdirectory(apps) add_subdirectory(docs) diff --git a/include/bokehgui/CMakeLists.txt b/include/gnuradio/bokehgui/CMakeLists.txt similarity index 95% rename from include/bokehgui/CMakeLists.txt rename to include/gnuradio/bokehgui/CMakeLists.txt index 91bb0e6..03655b8 100644 --- a/include/bokehgui/CMakeLists.txt +++ b/include/gnuradio/bokehgui/CMakeLists.txt @@ -33,4 +33,5 @@ install(FILES freq_sink_c_proc.h waterfall_sink_f_proc.h waterfall_sink_c_proc.h - DESTINATION include/bokehgui) + # hist_sink_proc.h + DESTINATION include/gnuradio/bokehgui) diff --git a/include/bokehgui/api.h b/include/gnuradio/bokehgui/api.h similarity index 100% rename from include/bokehgui/api.h rename to include/gnuradio/bokehgui/api.h diff --git a/include/bokehgui/base_sink.h b/include/gnuradio/bokehgui/base_sink.h similarity index 99% rename from include/bokehgui/base_sink.h rename to include/gnuradio/bokehgui/base_sink.h index c563a66..5d48c51 100644 --- a/include/bokehgui/base_sink.h +++ b/include/gnuradio/bokehgui/base_sink.h @@ -23,9 +23,9 @@ #define INCLUDED_BOKEHGUI_BASE_SINK_PROC_H #include -#include +#include #include -#include +#include #include namespace gr { diff --git a/include/bokehgui/freq_sink_c_proc.h b/include/gnuradio/bokehgui/freq_sink_c_proc.h similarity index 96% rename from include/bokehgui/freq_sink_c_proc.h rename to include/gnuradio/bokehgui/freq_sink_c_proc.h index e90c454..bdc45b4 100644 --- a/include/bokehgui/freq_sink_c_proc.h +++ b/include/gnuradio/bokehgui/freq_sink_c_proc.h @@ -1,121 +1,121 @@ -/* -*- c++ -*- */ -/* Copyright 2017 Free Software Foundation, Inc. - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H -#define INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H - -#include -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink to store multiple signals in frequency-domain. - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based frequency sink for complex values. - * - * This is a buffer store that takes set of a complex point streams - * and stores the PSD. The corresponding Python class retrieve the - * buffer data and plot the signals using Bokeh library. - * - * A queue of 2D array is maintained. Each 2D array is of size - * \p nconnection \p x \p d_size. For each call to get the data from - * Python, first element of queue is sent. - * - * The sink supports storing complex data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * This sink can plot messages that contain either uniform vectors - * of float 32 values (pmt::is_f32vector) or PDUs where the data - * is a uniform vector of float 32 values. - * - */ - class BOKEHGUI_API freq_sink_c_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build a complex frequency sink - * - * \param fftsize size of the FFT to compute and display. If using - * the PDU message port to plot samples, the length of - * each PDU must be a multiple of the FFT size. - * \param wintype type of window to apply (see gr::fft::window::win_type) - * \param fc center frequency of signal (use for x-axis labels) - * \param bw bandwidth of signal (used to set x-axis labels) - * \param name title for the plot - * \param nconnections number of signals to be connected to the - * sink. The PDU message port is always available for a - * connection, and this value must be set to 0 if only - * the PDU message port is being used. - */ - static sptr make(int fftsize, int wintype, double fc, double bw, const std::string &name, int nconnections); - - virtual void reset() = 0; - virtual float * get_plot_data() = 0; - virtual int get_buff_size() = 0; - virtual int get_buff_cols() = 0; - - virtual double get_center_freq() = 0; - virtual double get_bandwidth() = 0; - virtual int get_wintype() = 0; - virtual bool set_fft_window(fft::window::win_type newwintype) = 0; - virtual void buildwindow() = 0; - virtual void set_frequency_range(double, double) = 0; - virtual void handle_set_freq(pmt::pmt_t) = 0; - - /*! - * Set up a trigger for the sink to know when to start - * plotting. Useful to isolate events and avoid noise. - * - * The trigger modes are Free, Auto, Normal, and Tag (see - * gr::bokehgui::trigger_mode). The first three are like a normal - * trigger function. Free means free running with no trigger, - * auto will trigger if the trigger event is seen, but will - * still plot otherwise, and normal will hold until the trigger - * event is observed. The Tag trigger mode allows us to trigger - * off a specific stream tag. The tag trigger is based only on - * the name of the tag, so when a tag of the given name is seen, - * the trigger is activated. - * - * In auto and normal mode, we look to see if the magnitude of - * the any FFT point is over the set level. - * - * \param mode The trigger_mode: free, auto, normal, or tag. - * \param level The magnitude of the trigger even for auto or normal modes. - * \param channel Which input channel to use for the trigger events. - * \param tag_key The name (as a string) of the tag to trigger off - * of if using the tag mode. - */ - virtual void set_trigger_mode(trigger_mode mode, - float level, - int channel, - const std::string &tag_key) = 0; - }; - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H */ +/* -*- c++ -*- */ +/* Copyright 2017 Free Software Foundation, Inc. + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H +#define INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H + +#include +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink to store multiple signals in frequency-domain. + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based frequency sink for complex values. + * + * This is a buffer store that takes set of a complex point streams + * and stores the PSD. The corresponding Python class retrieve the + * buffer data and plot the signals using Bokeh library. + * + * A queue of 2D array is maintained. Each 2D array is of size + * \p nconnection \p x \p d_size. For each call to get the data from + * Python, first element of queue is sent. + * + * The sink supports storing complex data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * This sink can plot messages that contain either uniform vectors + * of float 32 values (pmt::is_f32vector) or PDUs where the data + * is a uniform vector of float 32 values. + * + */ + class BOKEHGUI_API freq_sink_c_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build a complex frequency sink + * + * \param fftsize size of the FFT to compute and display. If using + * the PDU message port to plot samples, the length of + * each PDU must be a multiple of the FFT size. + * \param wintype type of window to apply (see gr::fft::window::win_type) + * \param fc center frequency of signal (use for x-axis labels) + * \param bw bandwidth of signal (used to set x-axis labels) + * \param name title for the plot + * \param nconnections number of signals to be connected to the + * sink. The PDU message port is always available for a + * connection, and this value must be set to 0 if only + * the PDU message port is being used. + */ + static sptr make(int fftsize, int wintype, double fc, double bw, const std::string &name, int nconnections); + + virtual void reset() = 0; + virtual float * get_plot_data() = 0; + virtual int get_buff_size() = 0; + virtual int get_buff_cols() = 0; + + virtual double get_center_freq() = 0; + virtual double get_bandwidth() = 0; + virtual int get_wintype() = 0; + virtual bool set_fft_window(fft::window::win_type newwintype) = 0; + virtual void buildwindow() = 0; + virtual void set_frequency_range(double, double) = 0; + virtual void handle_set_freq(pmt::pmt_t) = 0; + + /*! + * Set up a trigger for the sink to know when to start + * plotting. Useful to isolate events and avoid noise. + * + * The trigger modes are Free, Auto, Normal, and Tag (see + * gr::bokehgui::trigger_mode). The first three are like a normal + * trigger function. Free means free running with no trigger, + * auto will trigger if the trigger event is seen, but will + * still plot otherwise, and normal will hold until the trigger + * event is observed. The Tag trigger mode allows us to trigger + * off a specific stream tag. The tag trigger is based only on + * the name of the tag, so when a tag of the given name is seen, + * the trigger is activated. + * + * In auto and normal mode, we look to see if the magnitude of + * the any FFT point is over the set level. + * + * \param mode The trigger_mode: free, auto, normal, or tag. + * \param level The magnitude of the trigger even for auto or normal modes. + * \param channel Which input channel to use for the trigger events. + * \param tag_key The name (as a string) of the tag to trigger off + * of if using the tag mode. + */ + virtual void set_trigger_mode(trigger_mode mode, + float level, + int channel, + const std::string &tag_key) = 0; + }; + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_H */ diff --git a/include/bokehgui/freq_sink_f_proc.h b/include/gnuradio/bokehgui/freq_sink_f_proc.h similarity index 96% rename from include/bokehgui/freq_sink_f_proc.h rename to include/gnuradio/bokehgui/freq_sink_f_proc.h index e19ab00..2cc535f 100644 --- a/include/bokehgui/freq_sink_f_proc.h +++ b/include/gnuradio/bokehgui/freq_sink_f_proc.h @@ -1,122 +1,122 @@ -/* -*- c++ -*- */ -/* Copyright 2017 Free Software Foundation, Inc. - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H -#define INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H - -#include -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink to store multiple signals in frequency-domain. - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based frequency sink for Floating values. - * - * This is a buffer store that takes set of a floating point streams - * and stores the PSD. The corresponding Python class retrieve the - * buffer data and plot the signals using Bokeh library. - * - * A queue of 2D array is maintained. Each 2D array is of size - * \p nconnection \p x \p d_size. For each call to get the data from - * Python, first element of queue is sent. - * - * The sink supports storing float data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * This sink can plot messages that contain either uniform vectors - * of float 32 values (pmt::is_f32vector) or PDUs where the data - * is a uniform vector of float 32 values. - * - */ - class BOKEHGUI_API freq_sink_f_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build a floating frequency sink - * - * \param fftsize size of the FFT to compute and display. If using - * the PDU message port to plot samples, the length of - * each PDU must be a multiple of the FFT size. - * \param wintype type of window to apply (see gr::fft::window::win_type) - * \param fc center frequency of signal (use for x-axis labels) - * \param bw bandwidth of signal (used to set x-axis labels) - * \param name title for the plot - * \param nconnections number of signals to be connected to the - * sink. The PDU message port is always available for a - * connection, and this value must be set to 0 if only - * the PDU message port is being used. - */ - static sptr make(int fftsize, int wintype, double fc, double bw, const std::string &name, int nconnections); - - virtual void reset() = 0; - - virtual double get_center_freq() = 0; - virtual double get_bandwidth() = 0; - // virtual int get_fft_size() = 0; // Renamed to get_size - virtual int get_wintype() = 0; - virtual bool set_fft_window(fft::window::win_type newwintype) = 0; - virtual void buildwindow() = 0; - - // virtual bool fftresize(const int) = 0; // Renamed to set_size - virtual void set_frequency_range(double, double) = 0; - virtual void handle_set_freq(pmt::pmt_t) = 0; - - /*! - * Set up a trigger for the sink to know when to start - * plotting. Useful to isolate events and avoid noise. - * - * The trigger modes are Free, Auto, Normal, and Tag (see - * gr::bokehgui::trigger_mode). The first three are like a normal - * trigger function. Free means free running with no trigger, - * auto will trigger if the trigger event is seen, but will - * still plot otherwise, and normal will hold until the trigger - * event is observed. The Tag trigger mode allows us to trigger - * off a specific stream tag. The tag trigger is based only on - * the name of the tag, so when a tag of the given name is seen, - * the trigger is activated. - * - * In auto and normal mode, we look to see if the magnitude of - * the any FFT point is over the set level. - * - * \param mode The trigger_mode: free, auto, normal, or tag. - * \param level The magnitude of the trigger even for auto or normal modes. - * \param channel Which input channel to use for the trigger events. - * \param tag_key The name (as a string) of the tag to trigger off - * of if using the tag mode. - */ - virtual void set_trigger_mode(trigger_mode mode, - float level, - int channel, - const std::string &tag_key) = 0; - }; - - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H */ +/* -*- c++ -*- */ +/* Copyright 2017 Free Software Foundation, Inc. + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H +#define INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H + +#include +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink to store multiple signals in frequency-domain. + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based frequency sink for Floating values. + * + * This is a buffer store that takes set of a floating point streams + * and stores the PSD. The corresponding Python class retrieve the + * buffer data and plot the signals using Bokeh library. + * + * A queue of 2D array is maintained. Each 2D array is of size + * \p nconnection \p x \p d_size. For each call to get the data from + * Python, first element of queue is sent. + * + * The sink supports storing float data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * This sink can plot messages that contain either uniform vectors + * of float 32 values (pmt::is_f32vector) or PDUs where the data + * is a uniform vector of float 32 values. + * + */ + class BOKEHGUI_API freq_sink_f_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build a floating frequency sink + * + * \param fftsize size of the FFT to compute and display. If using + * the PDU message port to plot samples, the length of + * each PDU must be a multiple of the FFT size. + * \param wintype type of window to apply (see gr::fft::window::win_type) + * \param fc center frequency of signal (use for x-axis labels) + * \param bw bandwidth of signal (used to set x-axis labels) + * \param name title for the plot + * \param nconnections number of signals to be connected to the + * sink. The PDU message port is always available for a + * connection, and this value must be set to 0 if only + * the PDU message port is being used. + */ + static sptr make(int fftsize, int wintype, double fc, double bw, const std::string &name, int nconnections); + + virtual void reset() = 0; + + virtual double get_center_freq() = 0; + virtual double get_bandwidth() = 0; + // virtual int get_fft_size() = 0; // Renamed to get_size + virtual int get_wintype() = 0; + virtual bool set_fft_window(fft::window::win_type newwintype) = 0; + virtual void buildwindow() = 0; + + // virtual bool fftresize(const int) = 0; // Renamed to set_size + virtual void set_frequency_range(double, double) = 0; + virtual void handle_set_freq(pmt::pmt_t) = 0; + + /*! + * Set up a trigger for the sink to know when to start + * plotting. Useful to isolate events and avoid noise. + * + * The trigger modes are Free, Auto, Normal, and Tag (see + * gr::bokehgui::trigger_mode). The first three are like a normal + * trigger function. Free means free running with no trigger, + * auto will trigger if the trigger event is seen, but will + * still plot otherwise, and normal will hold until the trigger + * event is observed. The Tag trigger mode allows us to trigger + * off a specific stream tag. The tag trigger is based only on + * the name of the tag, so when a tag of the given name is seen, + * the trigger is activated. + * + * In auto and normal mode, we look to see if the magnitude of + * the any FFT point is over the set level. + * + * \param mode The trigger_mode: free, auto, normal, or tag. + * \param level The magnitude of the trigger even for auto or normal modes. + * \param channel Which input channel to use for the trigger events. + * \param tag_key The name (as a string) of the tag to trigger off + * of if using the tag mode. + */ + virtual void set_trigger_mode(trigger_mode mode, + float level, + int channel, + const std::string &tag_key) = 0; + }; + + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_H */ diff --git a/include/bokehgui/time_sink_c_proc.h b/include/gnuradio/bokehgui/time_sink_c_proc.h similarity index 96% rename from include/bokehgui/time_sink_c_proc.h rename to include/gnuradio/bokehgui/time_sink_c_proc.h index cec3d08..3dbbf95 100644 --- a/include/bokehgui/time_sink_c_proc.h +++ b/include/gnuradio/bokehgui/time_sink_c_proc.h @@ -1,138 +1,138 @@ -/* -*- c++ -*- */ -/* Copyright 2017 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - * - */ - - -#ifndef INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H -#define INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H - -#include -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink of multiple time signals in time-domain - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based time sink for Complex values - * - * This is a buffer store that takes set of complex stream and save - * in buffers. The corresponding Python class retrieve the buffer data - * and plot the signals in Bokeh library. - * - * A queue of 2D array is maintained. Each 2D array is of size - * \p nconnection \p x \p d_size. For each call to get the data from - * Python, first element of queue is sent. - * - * The sink supports storing complex data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * The sink can plot messages that contains either uniform vectors of - * complex32 values (pmt::is_c32vector) or PDUs where the data is a - * uniform vector of complex32 values. - * - */ - class BOKEHGUI_API time_sink_c_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build time sink for complex values - * - * \param size number of points to plot at once - * \param samp_rate sample rate (used to set x-axis labels) - * \param name title for the plot - * \param nconnections number of signals connected to sink - * - */ - static sptr make(int size, double samp_rate, const std::string &name, int nconnections); - - /*! - * - * \brief Called from Python to get the list of tags. - * - * The function takes no argument. It returns a 2D list of tags having - * \p nconnections rows and number of tags in each input port. - */ - virtual std::vector > get_tags() = 0; - - virtual void set_size(const int newsize) = 0; - virtual void set_samp_rate(const double samp_rate) = 0; - virtual double get_samp_rate() = 0; - - virtual void reset() = 0; - - /*! - * Set up a trigger for the sink to know when to save the - * data. Useful to isolate events and save what is necessary - * - * The trigger modes are FREE, AUTO, NORM and TAG - * (see gr::bokehgui::trigger_mode). The first three are like a - * normal oscope trigger function. FREE means free running without - * trigger, AUTO will trigger if the trigger event is seen, but will - * still plot otherwise, and NORM will hold until the trigger event - * is observed. The TAG trigger mode allows us to trigger off a specific - * stream tag. The tag trigger is based on the name of the tag, so - * when a tag of the given name is seen, the trigger is activated. - * - * In auto and normal mode, we look for the slope of the signal. - * Given a gr::bokehgui::trigger_slope as either Positive or Negative, - * if the value between two samples moves in the given direction - * (x[1] > x[0] for Positive or x[1] < x[0] for Negative), then - * the trigger is activated. - * - * The \p delay value is specified in time based off the sample - * rate. If the sample rate of the block is set to 1, teh delay - * is then also the sample number offset. This is the offset from - * the left-hand y-axis of the plot. It delays the signal to show - * the trigger event at the given delay along with some portion of - * the signal before the event. The delay must be within 0 - t_max - * where t_max is the maximum amount of time displayed on the time - * plot. - * - * \param mode trigger_mode: free, auto, normal, tag - * \param slope trigger_slope: positive or negative. Only - * used for auto and normal mode. - * \param level The magnitude of the trigger even for auto or normal - * modes. - * \param delay The delay (in units of time) for where the trigger happens. - * \param channel Which input channel to use for the trigger checks - * Use 2*i+0 for I-channel of ith input stream - * Use 2_i+1 for Q-channel of ith input stream - * \param tag_key The name of the tag to trigger off, if using tag mode - * - */ - virtual void set_trigger_mode(trigger_mode mode, trigger_slope slope, - float level, - float delay, int channel, - const std::string &tag_key) = 0; - - }; - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H */ +/* -*- c++ -*- */ +/* Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + * + */ + + +#ifndef INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H +#define INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H + +#include +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink of multiple time signals in time-domain + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based time sink for Complex values + * + * This is a buffer store that takes set of complex stream and save + * in buffers. The corresponding Python class retrieve the buffer data + * and plot the signals in Bokeh library. + * + * A queue of 2D array is maintained. Each 2D array is of size + * \p nconnection \p x \p d_size. For each call to get the data from + * Python, first element of queue is sent. + * + * The sink supports storing complex data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * The sink can plot messages that contains either uniform vectors of + * complex32 values (pmt::is_c32vector) or PDUs where the data is a + * uniform vector of complex32 values. + * + */ + class BOKEHGUI_API time_sink_c_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build time sink for complex values + * + * \param size number of points to plot at once + * \param samp_rate sample rate (used to set x-axis labels) + * \param name title for the plot + * \param nconnections number of signals connected to sink + * + */ + static sptr make(int size, double samp_rate, const std::string &name, int nconnections); + + /*! + * + * \brief Called from Python to get the list of tags. + * + * The function takes no argument. It returns a 2D list of tags having + * \p nconnections rows and number of tags in each input port. + */ + virtual std::vector > get_tags() = 0; + + virtual void set_size(const int newsize) = 0; + virtual void set_samp_rate(const double samp_rate) = 0; + virtual double get_samp_rate() = 0; + + virtual void reset() = 0; + + /*! + * Set up a trigger for the sink to know when to save the + * data. Useful to isolate events and save what is necessary + * + * The trigger modes are FREE, AUTO, NORM and TAG + * (see gr::bokehgui::trigger_mode). The first three are like a + * normal oscope trigger function. FREE means free running without + * trigger, AUTO will trigger if the trigger event is seen, but will + * still plot otherwise, and NORM will hold until the trigger event + * is observed. The TAG trigger mode allows us to trigger off a specific + * stream tag. The tag trigger is based on the name of the tag, so + * when a tag of the given name is seen, the trigger is activated. + * + * In auto and normal mode, we look for the slope of the signal. + * Given a gr::bokehgui::trigger_slope as either Positive or Negative, + * if the value between two samples moves in the given direction + * (x[1] > x[0] for Positive or x[1] < x[0] for Negative), then + * the trigger is activated. + * + * The \p delay value is specified in time based off the sample + * rate. If the sample rate of the block is set to 1, teh delay + * is then also the sample number offset. This is the offset from + * the left-hand y-axis of the plot. It delays the signal to show + * the trigger event at the given delay along with some portion of + * the signal before the event. The delay must be within 0 - t_max + * where t_max is the maximum amount of time displayed on the time + * plot. + * + * \param mode trigger_mode: free, auto, normal, tag + * \param slope trigger_slope: positive or negative. Only + * used for auto and normal mode. + * \param level The magnitude of the trigger even for auto or normal + * modes. + * \param delay The delay (in units of time) for where the trigger happens. + * \param channel Which input channel to use for the trigger checks + * Use 2*i+0 for I-channel of ith input stream + * Use 2_i+1 for Q-channel of ith input stream + * \param tag_key The name of the tag to trigger off, if using tag mode + * + */ + virtual void set_trigger_mode(trigger_mode mode, trigger_slope slope, + float level, + float delay, int channel, + const std::string &tag_key) = 0; + + }; + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_H */ diff --git a/include/bokehgui/time_sink_f_proc.h b/include/gnuradio/bokehgui/time_sink_f_proc.h similarity index 96% rename from include/bokehgui/time_sink_f_proc.h rename to include/gnuradio/bokehgui/time_sink_f_proc.h index d4b3106..4f874e5 100644 --- a/include/bokehgui/time_sink_f_proc.h +++ b/include/gnuradio/bokehgui/time_sink_f_proc.h @@ -1,130 +1,130 @@ -/* -*- c++ -*- */ -/* - * Copyright 2017 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H -#define INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H - -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink of multiple signals in time-domain - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based time sink for Float values. - * - * This is a buffer store that takes set of float streams and save in - * buffers. The corresponding Python class retrieve the buffer data - * and plot the signals using Bokeh library. - * - * The sink supports storing float data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * The sink can plot messages that contain either uniform vectors of - * float32 values (pmt::is_f32vector) or PDUs where the data is a - * uniform vector of float32 values. - * - */ - class BOKEHGUI_API time_sink_f_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build floating point time sink - * - * \param size number of points to plot at once - * \param samp_rate sample rate (used to set x-axis labels) - * \param name title for the plot - * \param nconnections number of signals connected to sink - * - */ - static sptr make(int size, double samp_rate, const std::string &name, int nconnections); - - /*! - * - * \brief Called from Python to get the list of tags. - * - * The function takes no argument. It returns a 2D list of tags having - * \p nconnections rows and number of tags in each input port. - */ - virtual std::vector > get_tags() = 0; - - virtual void set_size(const int newsize) = 0; - virtual void set_samp_rate(const double samp_rate) = 0; - virtual double get_samp_rate() = 0; - - virtual void reset() = 0; - - /*! - * Set up a trigger for the sink to know when to save the - * data. Useful to isolate events and save what is necessary - * - * The trigger modes are FREE, AUTO, NORM and TAG - * (see gr::bokehgui::trigger_mode). The first three are like a - * normal oscope trigger function. FREE means free running without - * trigger, AUTO will trigger if the trigger event is seen, but will - * still plot otherwise, and NORM will hold until the trigger event - * is observed. The TAG trigger mode allows us to trigger off a specific - * stream tag. The tag trigger is based on the name of the tag, so - * when a tag of the given name is seen, the trigger is activated. - * - * In auto and normal mode, we look for the slope of the signal. - * Given a gr::bokehgui::trigger_slope as either Positive or Negative, - * if the value between two samples moves in the given direction - * (x[1] > x[0] for Positive or x[1] < x[0] for Negative), then - * the trigger is activated. - * - * The \p delay value is specified in time based off the sample - * rate. If the sample rate of the block is set to 1, teh delay - * is then also the sample number offset. This is the offset from - * the left-hand y-axis of the plot. It delays the signal to show - * the trigger event at the given delay along with some portion of - * the signal before the event. The delay must be within 0 - t_max - * where t_max is the maximum amount of time displayed on the time - * plot. - * - * \param mode trigger_mode: free, auto, normal, tag - * \param slope trigger_slope: positive or negative. Only - * used for auto and normal mode. - * \param level The magnitude of the trigger even for auto or normal - * modes. - * \param delay The delay (in units of time) for where the trigger happens. - * \param channel Which input channel to use for the trigger checks - * \param tag_key The name of the tag to trigger off, if using tag mode - * - */ - virtual void set_trigger_mode(trigger_mode mode, trigger_slope slope, - float level, - float delay, int channel, - const std::string &tag_key) = 0; - - }; - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H */ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H +#define INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H + +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink of multiple signals in time-domain + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based time sink for Float values. + * + * This is a buffer store that takes set of float streams and save in + * buffers. The corresponding Python class retrieve the buffer data + * and plot the signals using Bokeh library. + * + * The sink supports storing float data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * The sink can plot messages that contain either uniform vectors of + * float32 values (pmt::is_f32vector) or PDUs where the data is a + * uniform vector of float32 values. + * + */ + class BOKEHGUI_API time_sink_f_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build floating point time sink + * + * \param size number of points to plot at once + * \param samp_rate sample rate (used to set x-axis labels) + * \param name title for the plot + * \param nconnections number of signals connected to sink + * + */ + static sptr make(int size, double samp_rate, const std::string &name, int nconnections); + + /*! + * + * \brief Called from Python to get the list of tags. + * + * The function takes no argument. It returns a 2D list of tags having + * \p nconnections rows and number of tags in each input port. + */ + virtual std::vector > get_tags() = 0; + + virtual void set_size(const int newsize) = 0; + virtual void set_samp_rate(const double samp_rate) = 0; + virtual double get_samp_rate() = 0; + + virtual void reset() = 0; + + /*! + * Set up a trigger for the sink to know when to save the + * data. Useful to isolate events and save what is necessary + * + * The trigger modes are FREE, AUTO, NORM and TAG + * (see gr::bokehgui::trigger_mode). The first three are like a + * normal oscope trigger function. FREE means free running without + * trigger, AUTO will trigger if the trigger event is seen, but will + * still plot otherwise, and NORM will hold until the trigger event + * is observed. The TAG trigger mode allows us to trigger off a specific + * stream tag. The tag trigger is based on the name of the tag, so + * when a tag of the given name is seen, the trigger is activated. + * + * In auto and normal mode, we look for the slope of the signal. + * Given a gr::bokehgui::trigger_slope as either Positive or Negative, + * if the value between two samples moves in the given direction + * (x[1] > x[0] for Positive or x[1] < x[0] for Negative), then + * the trigger is activated. + * + * The \p delay value is specified in time based off the sample + * rate. If the sample rate of the block is set to 1, teh delay + * is then also the sample number offset. This is the offset from + * the left-hand y-axis of the plot. It delays the signal to show + * the trigger event at the given delay along with some portion of + * the signal before the event. The delay must be within 0 - t_max + * where t_max is the maximum amount of time displayed on the time + * plot. + * + * \param mode trigger_mode: free, auto, normal, tag + * \param slope trigger_slope: positive or negative. Only + * used for auto and normal mode. + * \param level The magnitude of the trigger even for auto or normal + * modes. + * \param delay The delay (in units of time) for where the trigger happens. + * \param channel Which input channel to use for the trigger checks + * \param tag_key The name of the tag to trigger off, if using tag mode + * + */ + virtual void set_trigger_mode(trigger_mode mode, trigger_slope slope, + float level, + float delay, int channel, + const std::string &tag_key) = 0; + + }; + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_H */ diff --git a/include/bokehgui/trigger_mode.h b/include/gnuradio/bokehgui/trigger_mode.h similarity index 100% rename from include/bokehgui/trigger_mode.h rename to include/gnuradio/bokehgui/trigger_mode.h diff --git a/include/bokehgui/vec_sink_c_proc.h b/include/gnuradio/bokehgui/vec_sink_c_proc.h similarity index 95% rename from include/bokehgui/vec_sink_c_proc.h rename to include/gnuradio/bokehgui/vec_sink_c_proc.h index 1045e2e..209c559 100644 --- a/include/bokehgui/vec_sink_c_proc.h +++ b/include/gnuradio/bokehgui/vec_sink_c_proc.h @@ -1,80 +1,80 @@ -/* -*- c++ -*- */ -/* Copyright 2017 Free Software Foundation, Inc. - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H -#define INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H - -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink to store multiple signals as vectors. - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based vector sink for Floating values. - * - * This is a buffer store that takes set of a floating point vector streams. - * The corresponding Python class retrieve the - * buffer data and plot the signals using Bokeh library. - * - * A queue of 2D array is maintained. Each 2D array is of size - * \p nconnection \p x \p d_size. For each call to get the data from - * Python, first element of queue is sent. - * - * The sink supports storing float data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * This sink can plot messages that contain either uniform vectors - * of float 32 values (pmt::is_f32vector) or PDUs where the data - * is a uniform vector of float 32 values. - * - */ - class BOKEHGUI_API vec_sink_c_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build a floating point vector sink - * - * \param vlen size of the input vectors. If using - * the PDU message port to plot samples, the length of - * each PDU must be a multiple of the vlen. - * \param name title for the plot - * \param nconnections number of signals to be connected to the - * sink. The PDU message port is always available for a - * connection, and this value must be set to 0 if only - * the PDU message port is being used. - */ - static sptr make(unsigned int vlen, const std::string &name, int nconnections); - - virtual void reset() = 0; - - }; - - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H */ +/* -*- c++ -*- */ +/* Copyright 2017 Free Software Foundation, Inc. + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H +#define INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H + +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink to store multiple signals as vectors. + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based vector sink for Floating values. + * + * This is a buffer store that takes set of a floating point vector streams. + * The corresponding Python class retrieve the + * buffer data and plot the signals using Bokeh library. + * + * A queue of 2D array is maintained. Each 2D array is of size + * \p nconnection \p x \p d_size. For each call to get the data from + * Python, first element of queue is sent. + * + * The sink supports storing float data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * This sink can plot messages that contain either uniform vectors + * of float 32 values (pmt::is_f32vector) or PDUs where the data + * is a uniform vector of float 32 values. + * + */ + class BOKEHGUI_API vec_sink_c_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build a floating point vector sink + * + * \param vlen size of the input vectors. If using + * the PDU message port to plot samples, the length of + * each PDU must be a multiple of the vlen. + * \param name title for the plot + * \param nconnections number of signals to be connected to the + * sink. The PDU message port is always available for a + * connection, and this value must be set to 0 if only + * the PDU message port is being used. + */ + static sptr make(unsigned int vlen, const std::string &name, int nconnections); + + virtual void reset() = 0; + + }; + + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_H */ diff --git a/include/bokehgui/vec_sink_f_proc.h b/include/gnuradio/bokehgui/vec_sink_f_proc.h similarity index 95% rename from include/bokehgui/vec_sink_f_proc.h rename to include/gnuradio/bokehgui/vec_sink_f_proc.h index 3877270..0026d0d 100644 --- a/include/bokehgui/vec_sink_f_proc.h +++ b/include/gnuradio/bokehgui/vec_sink_f_proc.h @@ -1,80 +1,80 @@ -/* -*- c++ -*- */ -/* Copyright 2017 Free Software Foundation, Inc. - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H -#define INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H - -#include - -namespace gr { - namespace bokehgui { - - /*! - * \brief A buffer store-sink to store multiple signals as vectors. - * \ingroup bokehgui - * - * \details - * This block is part of Bokeh based vector sink for Floating values. - * - * This is a buffer store that takes set of a floating point vector streams. - * The corresponding Python class retrieve the - * buffer data and plot the signals using Bokeh library. - * - * A queue of 2D array is maintained. Each 2D array is of size - * \p nconnection \p x \p d_size. For each call to get the data from - * Python, first element of queue is sent. - * - * The sink supports storing float data or messages. The message port - * is named "in". When using message port, \p nconnections should be - * set to 0. An option for "Float Message" is provided in GRC to use - * message mode. - * - * This sink can plot messages that contain either uniform vectors - * of float 32 values (pmt::is_f32vector) or PDUs where the data - * is a uniform vector of float 32 values. - * - */ - class BOKEHGUI_API vec_sink_f_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - - /*! - * \brief Build a floating point vector sink - * - * \param vlen size of the input vectors. If using - * the PDU message port to plot samples, the length of - * each PDU must be a multiple of the vlen. - * \param name title for the plot - * \param nconnections number of signals to be connected to the - * sink. The PDU message port is always available for a - * connection, and this value must be set to 0 if only - * the PDU message port is being used. - */ - static sptr make(unsigned int vlen, const std::string &name, int nconnections); - - virtual void reset() = 0; - - }; - - } // namespace bokehgui -} // namespace gr - -#endif /* INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H */ +/* -*- c++ -*- */ +/* Copyright 2017 Free Software Foundation, Inc. + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H +#define INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H + +#include + +namespace gr { + namespace bokehgui { + + /*! + * \brief A buffer store-sink to store multiple signals as vectors. + * \ingroup bokehgui + * + * \details + * This block is part of Bokeh based vector sink for Floating values. + * + * This is a buffer store that takes set of a floating point vector streams. + * The corresponding Python class retrieve the + * buffer data and plot the signals using Bokeh library. + * + * A queue of 2D array is maintained. Each 2D array is of size + * \p nconnection \p x \p d_size. For each call to get the data from + * Python, first element of queue is sent. + * + * The sink supports storing float data or messages. The message port + * is named "in". When using message port, \p nconnections should be + * set to 0. An option for "Float Message" is provided in GRC to use + * message mode. + * + * This sink can plot messages that contain either uniform vectors + * of float 32 values (pmt::is_f32vector) or PDUs where the data + * is a uniform vector of float 32 values. + * + */ + class BOKEHGUI_API vec_sink_f_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + + /*! + * \brief Build a floating point vector sink + * + * \param vlen size of the input vectors. If using + * the PDU message port to plot samples, the length of + * each PDU must be a multiple of the vlen. + * \param name title for the plot + * \param nconnections number of signals to be connected to the + * sink. The PDU message port is always available for a + * connection, and this value must be set to 0 if only + * the PDU message port is being used. + */ + static sptr make(unsigned int vlen, const std::string &name, int nconnections); + + virtual void reset() = 0; + + }; + + } // namespace bokehgui +} // namespace gr + +#endif /* INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_H */ diff --git a/include/bokehgui/waterfall_sink_c_proc.h b/include/gnuradio/bokehgui/waterfall_sink_c_proc.h similarity index 95% rename from include/bokehgui/waterfall_sink_c_proc.h rename to include/gnuradio/bokehgui/waterfall_sink_c_proc.h index be3cd7b..bc3b93e 100644 --- a/include/bokehgui/waterfall_sink_c_proc.h +++ b/include/gnuradio/bokehgui/waterfall_sink_c_proc.h @@ -1,58 +1,58 @@ -/* -*- c++ -*- */ -/* - * Copyright 2017 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H -#define INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H - -#include -#include - -namespace gr { - namespace bokehgui { - class BOKEHGUI_API waterfall_sink_c_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - static sptr make(int size, - int wintype, - double fc, - double bw, - const std::string &name); - - virtual void reset() = 0; - - virtual void set_size(int) = 0; - virtual double get_center_freq() = 0; - virtual double get_bandwidth() = 0; - virtual double get_time_per_fft() = 0; - virtual void buildwindow() = 0; - virtual void set_time_per_fft(double) = 0; - virtual void set_fft_window(const gr::fft::window::win_type win) = 0; - virtual gr::fft::window::win_type get_wintype() = 0; - - virtual void set_frequency_range(double, double) = 0; - virtual float * get_plot_data () = 0; - }; - } -} - -#endif /* INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H */ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H +#define INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H + +#include +#include + +namespace gr { + namespace bokehgui { + class BOKEHGUI_API waterfall_sink_c_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + static sptr make(int size, + int wintype, + double fc, + double bw, + const std::string &name); + + virtual void reset() = 0; + + virtual void set_size(int) = 0; + virtual double get_center_freq() = 0; + virtual double get_bandwidth() = 0; + virtual double get_time_per_fft() = 0; + virtual void buildwindow() = 0; + virtual void set_time_per_fft(double) = 0; + virtual void set_fft_window(const gr::fft::window::win_type win) = 0; + virtual gr::fft::window::win_type get_wintype() = 0; + + virtual void set_frequency_range(double, double) = 0; + virtual float * get_plot_data () = 0; + }; + } +} + +#endif /* INCLUDED_BOKEHGUI_WATERFALL_SINK_C_H */ diff --git a/include/bokehgui/waterfall_sink_f_proc.h b/include/gnuradio/bokehgui/waterfall_sink_f_proc.h similarity index 95% rename from include/bokehgui/waterfall_sink_f_proc.h rename to include/gnuradio/bokehgui/waterfall_sink_f_proc.h index 06ff109..112c508 100644 --- a/include/bokehgui/waterfall_sink_f_proc.h +++ b/include/gnuradio/bokehgui/waterfall_sink_f_proc.h @@ -1,57 +1,57 @@ -/* -*- c++ -*- */ -/* - * Copyright 2017 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H -#define INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H - -#include -#include - -namespace gr { - namespace bokehgui { - class BOKEHGUI_API waterfall_sink_f_proc : virtual public base_sink - { - public: - typedef std::shared_ptr sptr; - static sptr make(int size, - int wintype, - double fc, double bw, - const std::string &name); - - virtual void reset() = 0; - - virtual void set_size(int) = 0; - virtual double get_center_freq() = 0; - virtual double get_bandwidth() = 0; - virtual double get_time_per_fft() = 0; - virtual void buildwindow() = 0; - virtual void set_time_per_fft(double) = 0; - virtual void set_fft_window(const gr::fft::window::win_type win) = 0; - virtual gr::fft::window::win_type get_wintype() = 0; - - virtual void set_frequency_range(double, double) = 0; - virtual float * get_plot_data () = 0; - }; - } -} - -#endif /* INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H */ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H +#define INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H + +#include +#include + +namespace gr { + namespace bokehgui { + class BOKEHGUI_API waterfall_sink_f_proc : virtual public base_sink + { + public: + typedef std::shared_ptr sptr; + static sptr make(int size, + int wintype, + double fc, double bw, + const std::string &name); + + virtual void reset() = 0; + + virtual void set_size(int) = 0; + virtual double get_center_freq() = 0; + virtual double get_bandwidth() = 0; + virtual double get_time_per_fft() = 0; + virtual void buildwindow() = 0; + virtual void set_time_per_fft(double) = 0; + virtual void set_fft_window(const gr::fft::window::win_type win) = 0; + virtual gr::fft::window::win_type get_wintype() = 0; + + virtual void set_frequency_range(double, double) = 0; + virtual float * get_plot_data () = 0; + }; + } +} + +#endif /* INCLUDED_BOKEHGUI_WATERFALL_SINK_F_H */ diff --git a/lib/freq_sink_c_proc_impl.h b/lib/freq_sink_c_proc_impl.h index 4c6da7b..1340265 100755 --- a/lib/freq_sink_c_proc_impl.h +++ b/lib/freq_sink_c_proc_impl.h @@ -21,7 +21,7 @@ #define INCLUDED_BOKEHGUI_FREQ_SINK_C_PROC_IMPL_H #include -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/freq_sink_f_proc_impl.h b/lib/freq_sink_f_proc_impl.h index bd6004d..1250f6f 100755 --- a/lib/freq_sink_f_proc_impl.h +++ b/lib/freq_sink_f_proc_impl.h @@ -21,7 +21,7 @@ #define INCLUDED_BOKEHGUI_FREQ_SINK_F_PROC_IMPL_H #include -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/time_sink_c_proc_impl.h b/lib/time_sink_c_proc_impl.h index f4aa00c..11ce2be 100644 --- a/lib/time_sink_c_proc_impl.h +++ b/lib/time_sink_c_proc_impl.h @@ -23,7 +23,7 @@ #ifndef INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_IMPL_H #define INCLUDED_BOKEHGUI_TIME_SINK_C_PROC_IMPL_H -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/time_sink_f_proc_impl.h b/lib/time_sink_f_proc_impl.h index 48a068b..73dfb78 100644 --- a/lib/time_sink_f_proc_impl.h +++ b/lib/time_sink_f_proc_impl.h @@ -22,7 +22,7 @@ #ifndef INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_IMPL_H #define INCLUDED_BOKEHGUI_TIME_SINK_F_PROC_IMPL_H -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/vec_sink_c_proc_impl.h b/lib/vec_sink_c_proc_impl.h index ae0a018..ba9e09f 100644 --- a/lib/vec_sink_c_proc_impl.h +++ b/lib/vec_sink_c_proc_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_IMPL_H #define INCLUDED_BOKEHGUI_VEC_SINK_C_PROC_IMPL_H -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/vec_sink_f_proc_impl.h b/lib/vec_sink_f_proc_impl.h index 943e442..051a3c4 100644 --- a/lib/vec_sink_f_proc_impl.h +++ b/lib/vec_sink_f_proc_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_IMPL_H #define INCLUDED_BOKEHGUI_VEC_SINK_F_PROC_IMPL_H -#include +#include namespace gr { namespace bokehgui { diff --git a/lib/waterfall_sink_c_proc_impl.h b/lib/waterfall_sink_c_proc_impl.h index ad5bca0..ab2fc8d 100755 --- a/lib/waterfall_sink_c_proc_impl.h +++ b/lib/waterfall_sink_c_proc_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_C_PROC_IMPL_H #define INCLUDED_BOKEHGUI_WATERFALL_SINK_C_PROC_IMPL_H -#include +#include #include namespace gr { diff --git a/lib/waterfall_sink_f_proc_impl.h b/lib/waterfall_sink_f_proc_impl.h index e589351..d29e493 100755 --- a/lib/waterfall_sink_f_proc_impl.h +++ b/lib/waterfall_sink_f_proc_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_BOKEHGUI_WATERFALL_SINK_F_PROC_IMPL_H #define INCLUDED_BOKEHGUI_WATERFALL_SINK_F_PROC_IMPL_H -#include +#include #include namespace gr { diff --git a/python/bindings/base_sink_python.cc b/python/bindings/base_sink_python.cc index e917c13..1457100 100644 --- a/python/bindings/base_sink_python.cc +++ b/python/bindings/base_sink_python.cc @@ -16,8 +16,8 @@ namespace py = pybind11; -#include -#include +#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/freq_sink_c_proc_python.cc b/python/bindings/freq_sink_c_proc_python.cc index c128f02..eea1315 100755 --- a/python/bindings/freq_sink_c_proc_python.cc +++ b/python/bindings/freq_sink_c_proc_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(freq_sink_c_proc.h) */ -/* BINDTOOL_HEADER_FILE_HASH(cbc59519a8072f288996ad16bf7f8a2b) */ +/* BINDTOOL_HEADER_FILE_HASH(2cbb5d2c8d7188556b31253769150a6d) */ /***********************************************************************************/ #include @@ -24,7 +24,7 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/freq_sink_f_proc_python.cc b/python/bindings/freq_sink_f_proc_python.cc index 8257c65..47c4dbc 100755 --- a/python/bindings/freq_sink_f_proc_python.cc +++ b/python/bindings/freq_sink_f_proc_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(freq_sink_f_proc.h) */ -/* BINDTOOL_HEADER_FILE_HASH(6040cc1d226766a0325c9d5e6debb3f3) */ +/* BINDTOOL_HEADER_FILE_HASH(01d966667030b136b4992a55be8954d0) */ /***********************************************************************************/ #include @@ -23,7 +23,7 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/time_sink_c_proc_python.cc b/python/bindings/time_sink_c_proc_python.cc index aeb7df6..d3ceff7 100755 --- a/python/bindings/time_sink_c_proc_python.cc +++ b/python/bindings/time_sink_c_proc_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(time_sink_c_proc.h) */ -/* BINDTOOL_HEADER_FILE_HASH(3ee60702342a877a505b24ea096beb3b) */ +/* BINDTOOL_HEADER_FILE_HASH(923ce38b624c5c0137cfe7f10ae5720e) */ /***********************************************************************************/ #include @@ -23,7 +23,7 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/time_sink_f_proc_python.cc b/python/bindings/time_sink_f_proc_python.cc index 2778f7c..e1a0c22 100755 --- a/python/bindings/time_sink_f_proc_python.cc +++ b/python/bindings/time_sink_f_proc_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(time_sink_f_proc.h) */ -/* BINDTOOL_HEADER_FILE_HASH(fbfa2c5631d2039cf90076ac144e3ae7) */ +/* BINDTOOL_HEADER_FILE_HASH(ad5687268e7243aa95235e765986bb57) */ /***********************************************************************************/ #include @@ -23,7 +23,7 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/vec_sink_c_proc_python.cc b/python/bindings/vec_sink_c_proc_python.cc index 2969deb..bdcaeea 100755 --- a/python/bindings/vec_sink_c_proc_python.cc +++ b/python/bindings/vec_sink_c_proc_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(vec_sink_c_proc.h) */ -/* BINDTOOL_HEADER_FILE_HASH(0230b3ea4add6cbc7923120461cd0ef8) */ +/* BINDTOOL_HEADER_FILE_HASH(60a4accaf508ea8ece46a92caa5d8fb4) */ /***********************************************************************************/ #include @@ -23,7 +23,7 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/waterfall_sink_c_proc_python.cc b/python/bindings/waterfall_sink_c_proc_python.cc index 5056769..af8ff0e 100755 --- a/python/bindings/waterfall_sink_c_proc_python.cc +++ b/python/bindings/waterfall_sink_c_proc_python.cc @@ -14,7 +14,7 @@ #include namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include diff --git a/python/bindings/waterfall_sink_f_proc_python.cc b/python/bindings/waterfall_sink_f_proc_python.cc index c487bde..6038820 100755 --- a/python/bindings/waterfall_sink_f_proc_python.cc +++ b/python/bindings/waterfall_sink_f_proc_python.cc @@ -14,7 +14,7 @@ #include namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include