23 #ifndef INCLUDED_GR_RUNTIME_BLOCK_DETAIL_H
24 #define INCLUDED_GR_RUNTIME_BLOCK_DETAIL_H
51 bool sink_p()
const {
return d_noutputs == 0; }
52 bool source_p()
const {
return d_ninputs == 0; }
54 void set_done(
bool done);
55 bool done()
const {
return d_done; }
60 if(which >= d_ninputs)
61 throw std::invalid_argument(
"block_detail::input");
62 return d_input[which];
68 if(which >= d_noutputs)
69 throw std::invalid_argument(
"block_detail::output");
70 return d_output[which];
77 void consume(
int which_input,
int how_many_items);
83 void consume_each(
int how_many_items);
89 void produce(
int which_output,
int how_many_items);
95 void produce_each(
int how_many_items);
98 uint64_t nitems_read(
unsigned int which_input);
101 uint64_t nitems_written(
unsigned int which_output);
112 void add_item_tag(
unsigned int which_output,
const tag_t &tag);
124 void remove_item_tag(
unsigned int which_input,
const tag_t &tag,
long id);
141 void get_tags_in_range(std::vector<tag_t> &
v,
142 unsigned int which_input,
166 void get_tags_in_range(std::vector<tag_t> &
v,
167 unsigned int which_input,
180 void set_processor_affinity(
const std::vector<int> &mask);
185 void unset_processor_affinity();
202 void start_perf_counters();
203 void stop_perf_counters(
int noutput_items,
int nproduced);
204 void reset_perf_counters();
207 float pc_noutput_items();
208 float pc_nproduced();
209 float pc_input_buffers_full(
size_t which);
210 std::vector<float> pc_input_buffers_full();
211 float pc_output_buffers_full(
size_t which);
212 std::vector<float> pc_output_buffers_full();
213 float pc_work_time();
215 float pc_noutput_items_avg();
216 float pc_nproduced_avg();
217 float pc_input_buffers_full_avg(
size_t which);
218 std::vector<float> pc_input_buffers_full_avg();
219 float pc_output_buffers_full_avg(
size_t which);
220 std::vector<float> pc_output_buffers_full_avg();
221 float pc_work_time_avg();
223 float pc_noutput_items_var();
224 float pc_nproduced_var();
225 float pc_input_buffers_full_var(
size_t which);
226 std::vector<float> pc_input_buffers_full_var();
227 float pc_output_buffers_full_var(
size_t which);
228 std::vector<float> pc_output_buffers_full_var();
229 float pc_work_time_var();
231 float pc_work_time_total();
239 unsigned int d_ninputs;
240 unsigned int d_noutputs;
241 std::vector<buffer_reader_sptr> d_input;
242 std::vector<buffer_sptr> d_output;
246 float d_ins_noutput_items;
247 float d_avg_noutput_items;
248 float d_var_noutput_items;
249 float d_ins_nproduced;
250 float d_avg_nproduced;
251 float d_var_nproduced;
252 std::vector<float> d_ins_input_buffers_full;
253 std::vector<float> d_avg_input_buffers_full;
254 std::vector<float> d_var_input_buffers_full;
255 std::vector<float> d_ins_output_buffers_full;
256 std::vector<float> d_avg_output_buffers_full;
257 std::vector<float> d_var_output_buffers_full;
259 float d_ins_work_time;
260 float d_avg_work_time;
261 float d_var_work_time;
262 float d_total_work_time;
265 block_detail(
unsigned int ninputs,
unsigned int noutputs);
buffer_reader_sptr input(unsigned int which)
Definition: block_detail.h:58
GR_RUNTIME_API block_detail_sptr make_block_detail(unsigned int ninputs, unsigned int noutputs)
Implementation details to support the signal processing abstractionThis class contains implementation...
Definition: block_detail.h:44
gr::thread::gr_thread_t thread
Definition: block_detail.h:200
pthread_t gr_thread_t
a system-dependent typedef for the underlying thread type.
Definition: thread.h:57
Definition: cc_common.h:45
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
GR_RUNTIME_API int set_thread_priority(gr_thread_t thread, int priority)
set current thread priority for a given thread ID
GR_RUNTIME_API long block_detail_ncurrently_allocated()
Single writer, multiple reader fifo.
Definition: buffer.h:55
unsigned __int64 uint64_t
Definition: stdint.h:90
int d_produce_or
Definition: block_detail.h:234
bool sink_p() const
Definition: block_detail.h:51
GR_RUNTIME_API int thread_priority(gr_thread_t thread)
get current thread priority for a given thread ID
bool done() const
Definition: block_detail.h:55
signed long long high_res_timer_type
Typedef for the timer tick count.
Definition: high_res_timer.h:49
used by thread-per-block scheduler
Definition: tpb_detail.h:37
bool threaded
Definition: block_detail.h:199
tpb_detail d_tpb
Definition: block_detail.h:233
bool source_p() const
Definition: block_detail.h:52
buffer_sptr output(unsigned int which)
Definition: block_detail.h:66
boost::intrusive_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
Definition: pmt.h:56
int ninputs() const
Definition: block_detail.h:49
int noutputs() const
Definition: block_detail.h:50