28 #ifndef INCLUDED_BAZ_GATE_H 29 #define INCLUDED_BAZ_GATE_H 31 #include <gnuradio/sync_block.h> 33 #include <uhd/types/time_spec.hpp> 34 #include <gnuradio/thread/thread.h> 49 typedef boost::shared_ptr<baz_gate> baz_gate_sptr;
58 BAZ_API baz_gate_sptr
baz_make_gate (
int item_size,
bool block =
true,
float threshold = 1.0,
int trigger_length = 0,
bool tag =
false,
double delay = 0.0,
int sample_rate = 0,
bool no_delay =
false,
bool verbose =
true,
bool retriggerable =
false,
const std::string& length_tag_name =
"",
bool complete_output =
false,
bool byte_trigger =
false,
const std::string& trigger_tag_name =
"");
72 friend BAZ_API baz_gate_sptr
baz_make_gate (
int item_size,
bool block,
float threshold,
int trigger_length,
bool tag,
double delay,
int sample_rate,
bool no_delay,
bool verbose,
bool retriggerable,
const std::string& length_tag_name,
bool complete_output,
bool byte_trigger,
const std::string& trigger_tag_name);
74 baz_gate (
int item_size,
bool block,
float threshold,
int trigger_length,
bool tag,
double delay,
int sample_rate,
bool no_delay,
bool verbose,
bool retriggerable,
const std::string& length_tag_name,
bool complete_output,
bool byte_trigger,
const std::string& trigger_tag_name);
83 uhd::time_spec_t d_last_time;
84 uint64_t d_time_offset;
89 gr::thread::mutex d_mutex;
94 int d_burst_sample_count;
95 pmt::pmt_t d_length_tag_name;
96 bool d_complete_output;
97 int d_remaining_to_complete;
99 pmt::pmt_t d_trigger_tag_name;
104 void set_blocking(
bool enable);
105 void set_threshold(
float threshold);
106 void set_trigger_length(
int trigger_length);
107 void set_tagging(
bool enable);
108 void set_delay(
double delay);
109 void set_sample_rate(
int sample_rate);
110 void set_no_delay(
bool no_delay);
112 void forecast(
int noutput_items, gr_vector_int &ninput_items_required);
114 int general_work (
int noutput_items, gr_vector_int &ninput_items,
115 gr_vector_const_void_star &input_items,
116 gr_vector_void_star &output_items);
square2 a stream of floats.This uses the preferred technique: subclassing gr::sync_block.
Definition: baz_gate.h:66
class BAZ_API baz_gate
Definition: baz_gate.h:36
#define BAZ_API
Definition: config.h:8
BAZ_API baz_gate_sptr baz_make_gate(int item_size, bool block=true, float threshold=1.0, int trigger_length=0, bool tag=false, double delay=0.0, int sample_rate=0, bool no_delay=false, bool verbose=true, bool retriggerable=false, const std::string &length_tag_name="", bool complete_output=false, bool byte_trigger=false, const std::string &trigger_tag_name="")
Return a shared_ptr to a new instance of baz_gate.