GNU Radio's IRIDIUM_TOOLKIT Package: tagged_burst_to_pdu_impl.h Source File

GNU Radio's IRIDIUM_TOOLKIT Package

tagged_burst_to_pdu_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 Free Software Foundation, Inc
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_IRIDIUM_TOOLKIT_TAGGED_BURST_TO_PDU_IMPL_H
22#define INCLUDED_IRIDIUM_TOOLKIT_TAGGED_BURST_TO_PDU_IMPL_H
23
24#include <iridium/tagged_burst_to_pdu.h>
25
26namespace gr {
27 namespace iridium {
28
29 struct burst_data {
30 uint64_t id;
31 uint64_t offset;
32 float magnitude;
33 float relative_frequency;
34 float center_frequency;
35 float sample_rate;
36 size_t len;
37 gr_complex * data;
38 };
39
40 class tagged_burst_to_pdu_impl : public tagged_burst_to_pdu
41 {
42 private:
43 bool d_debug;
44 float d_relative_center_frequency;
45 float d_relative_span;
46 float d_relative_sample_rate;
47 int d_max_burst_size;
48 int d_outstanding;
49 int d_max_outstanding;
50 int d_outstanding_limit;
51 uint64_t d_n_dropped_bursts;
52 bool d_drop_overflow;
53 bool d_blocked;
54
55 float d_lower_border;
56 float d_upper_border;
57
58 std::map<uint64_t, burst_data> d_bursts;
59
60 void append_to_burst(burst_data &burst, const gr_complex * data, size_t n);
61 void publish_burst(burst_data &burst);
62
63 void create_new_bursts(int noutput_items,
64 const gr_complex * in);
65 void publish_and_remove_old_bursts(int noutput_items, const gr_complex * in);
66 void update_current_bursts(int noutput_items, const gr_complex * in);
67
68 int get_output_queue_size();
69 int get_output_max_queue_size();
70 void burst_handled(pmt::pmt_t msg);
71 public:
72 tagged_burst_to_pdu_impl(int max_burst_size, float relative_center_frequency, float relative_span,
73 float d_relative_sample_rate, int outstanding_limit, bool drop_overflow);
74 ~tagged_burst_to_pdu_impl();
75
76 uint64_t get_n_dropped_bursts();
77
78 // Where all the action really happens
79 int work(int noutput_items,
80 gr_vector_const_void_star &input_items,
81 gr_vector_void_star &output_items);
82 };
83
84 } // namespace iridium
85} // namespace gr
86
87#endif /* INCLUDED_IRIDIUM_TOOLKIT_TAGGED_BURST_TO_PDU_IMPL_H */
88
gr::iridium::tagged_burst_to_pdu_impl
Definition: tagged_burst_to_pdu_impl.h:41
gr::iridium::tagged_burst_to_pdu_impl::~tagged_burst_to_pdu_impl
~tagged_burst_to_pdu_impl()
gr::iridium::tagged_burst_to_pdu_impl::work
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
gr::iridium::tagged_burst_to_pdu_impl::tagged_burst_to_pdu_impl
tagged_burst_to_pdu_impl(int max_burst_size, float relative_center_frequency, float relative_span, float d_relative_sample_rate, int outstanding_limit, bool drop_overflow)
gr::iridium::tagged_burst_to_pdu_impl::get_n_dropped_bursts
uint64_t get_n_dropped_bursts()
gr::iridium::tagged_burst_to_pdu
<+description of block+>
Definition: tagged_burst_to_pdu.h:37
gr
Definition: burst_downmix.h:28
iridium
Definition: iridium.h:2
gr::iridium::burst_data
Definition: tagged_burst_to_pdu_impl.h:29
gr::iridium::burst_data::data
gr_complex * data
Definition: tagged_burst_to_pdu_impl.h:37
gr::iridium::burst_data::relative_frequency
float relative_frequency
Definition: tagged_burst_to_pdu_impl.h:33
gr::iridium::burst_data::magnitude
float magnitude
Definition: tagged_burst_to_pdu_impl.h:32
gr::iridium::burst_data::id
uint64_t id
Definition: tagged_burst_to_pdu_impl.h:30
gr::iridium::burst_data::len
size_t len
Definition: tagged_burst_to_pdu_impl.h:36
gr::iridium::burst_data::center_frequency
float center_frequency
Definition: tagged_burst_to_pdu_impl.h:34
gr::iridium::burst_data::offset
uint64_t offset
Definition: tagged_burst_to_pdu_impl.h:31
gr::iridium::burst_data::sample_rate
float sample_rate
Definition: tagged_burst_to_pdu_impl.h:35
gr::iridium::burst
Definition: fft_burst_tagger_impl.h:30
tagged_burst_to_pdu.h