GNU Radio's IRIDIUM Package
tagged_burst_to_pdu_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2020 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_TAGGED_BURST_TO_PDU_IMPL_H
22#define INCLUDED_IRIDIUM_TAGGED_BURST_TO_PDU_IMPL_H
23
25
26namespace gr {
27 namespace iridium {
28
29 struct burst_data {
30 uint64_t id;
31 uint64_t offset;
32 float magnitude;
36 size_t len;
37 gr_complex * data;
38 };
39
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);
75
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_TAGGED_BURST_TO_PDU_IMPL_H */
88
Definition tagged_burst_to_pdu_impl.h:41
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
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)
<+description of block+>
Definition tagged_burst_to_pdu.h:36
Definition burst_downmix.h:27
Definition iridium.h:2
Definition tagged_burst_to_pdu_impl.h:29
gr_complex * data
Definition tagged_burst_to_pdu_impl.h:37
float relative_frequency
Definition tagged_burst_to_pdu_impl.h:33
float magnitude
Definition tagged_burst_to_pdu_impl.h:32
uint64_t id
Definition tagged_burst_to_pdu_impl.h:30
size_t len
Definition tagged_burst_to_pdu_impl.h:36
float center_frequency
Definition tagged_burst_to_pdu_impl.h:34
uint64_t offset
Definition tagged_burst_to_pdu_impl.h:31
float sample_rate
Definition tagged_burst_to_pdu_impl.h:35
Definition fft_burst_tagger_impl.h:30