28 #ifndef INCLUDED_BAZ_NATIVE_CALLBACK_X_H 29 #define INCLUDED_BAZ_NATIVE_CALLBACK_X_H 31 #include <gnuradio/sync_block.h> 46 typedef boost::shared_ptr<baz_native_callback_x> baz_native_callback_x_sptr;
51 virtual void callback(
float f,
unsigned long samples_processed)=0;
56 #define baz_native_callback_target_sptr gr::basic_block_sptr 65 BAZ_API baz_native_callback_x_sptr
baz_make_native_callback_x (
int size, baz_native_callback_target_sptr target,
bool threshold_enable=
false,
float threshold_level=0.0);
79 friend baz_native_callback_x_sptr
baz_make_native_callback_x (
int size, baz_native_callback_target_sptr target,
bool threshold_enable,
float threshold_level);
81 baz_native_callback_x (
int size, baz_native_callback_target_sptr target,
bool threshold_enable,
float threshold_level);
84 baz_native_callback_target_sptr d_target;
85 bool d_threshold_enable;
86 float d_threshold_level;
89 unsigned long d_samples_processed;
94 void set_size(
int size);
95 void set_target(baz_native_callback_target_sptr target);
96 void set_threshold_enable(
bool enable);
97 void set_threshold_level(
float threshold_level);
103 {
return d_threshold_enable; }
105 {
return d_threshold_level; }
107 int work (
int noutput_items,
108 gr_vector_const_void_star &input_items,
109 gr_vector_void_star &output_items);
class BAZ_API baz_native_callback_x
Definition: baz_native_callback.h:33
int size() const
Definition: baz_native_callback.h:99
Definition: baz_native_callback.h:48
square2 a stream of floats.This uses the preferred technique: subclassing gr::sync_block.
Definition: baz_native_callback.h:73
#define BAZ_API
Definition: config.h:8
bool threshold_enable() const
Definition: baz_native_callback.h:102
BAZ_API baz_native_callback_x_sptr baz_make_native_callback_x(int size, baz_native_callback_target_sptr target, bool threshold_enable=false, float threshold_level=0.0)
Return a shared_ptr to a new instance of baz_native_callback_x.
float threshold_level() const
Definition: baz_native_callback.h:104
virtual ~baz_native_callback_target()
Definition: baz_native_callback.h:52