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>
49typedef boost::shared_ptr<baz_gate> baz_gate_sptr;
58BAZ_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;
112 void forecast(
int noutput_items, gr_vector_int &ninput_items_required);
115 gr_vector_const_void_star &input_items,
116 gr_vector_void_star &output_items);
#define BAZ_API
Definition api.h:19
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.
square2 a stream of floats.
Definition baz_gate.h:67
void set_tagging(bool enable)
void set_blocking(bool enable)
void set_threshold(float threshold)
void set_no_delay(bool no_delay)
void set_trigger_length(int trigger_length)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
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)
Return a shared_ptr to a new instance of baz_gate.
void set_delay(double delay)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void set_sample_rate(int sample_rate)