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 {
27namespace iridium {
28
29struct burst_data {
30 uint64_t id;
31 double offset;
32 float magnitude;
34 double center_frequency;
35 float sample_rate;
36 uint64_t timestamp;
37 float noise;
38 size_t len;
39 gr_complex* data;
40};
41
43{
44private:
45 bool d_debug;
46 float d_relative_center_frequency;
47 float d_relative_span;
48 float d_relative_sample_rate;
49 double d_sample_offset;
50 int d_max_burst_size;
51 int d_outstanding;
52 int d_max_outstanding;
53 int d_outstanding_limit;
54 uint64_t d_n_dropped_bursts;
55 bool d_drop_overflow;
56 bool d_blocked;
57
58 float d_lower_border;
59 float d_upper_border;
60
61 std::map<uint64_t, burst_data> d_bursts;
62
63 void append_to_burst(burst_data& burst, const gr_complex* data, size_t n);
64 void publish_burst(burst_data& burst);
65
66 void create_new_bursts(int noutput_items, const gr_complex* in);
67 void publish_and_remove_old_bursts(int noutput_items, const gr_complex* in);
68 void update_current_bursts(int noutput_items, const gr_complex* in);
69
72 void burst_handled(pmt::pmt_t msg);
73
74public:
75 tagged_burst_to_pdu_impl(int max_burst_size,
76 float relative_center_frequency,
77 float relative_span,
78 float d_relative_sample_rate,
79 double sample_offset,
80 int outstanding_limit,
81 bool drop_overflow);
83
85
86 // Where all the action really happens
87 int work(int noutput_items,
88 gr_vector_const_void_star& input_items,
89 gr_vector_void_star& output_items);
90};
91
92} // namespace iridium
93} // namespace gr
94
95#endif /* INCLUDED_IRIDIUM_TAGGED_BURST_TO_PDU_IMPL_H */
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, double sample_offset, int outstanding_limit, bool drop_overflow)
<+description of block+>
Definition tagged_burst_to_pdu.h:36
virtual int get_output_queue_size()=0
virtual int get_output_max_queue_size()=0
Definition burst_downmix.h:28
Definition burst_downmix.h:27
Definition fft_channelizer_impl.h:18
uint64_t timestamp
Definition fft_channelizer_impl.h:25
gr_complex * data
Definition fft_channelizer_impl.h:28
float relative_frequency
Definition fft_channelizer_impl.h:22
double offset
Definition fft_channelizer_impl.h:20
float noise
Definition fft_channelizer_impl.h:26
float magnitude
Definition fft_channelizer_impl.h:21
double center_frequency
Definition fft_channelizer_impl.h:23
uint64_t id
Definition fft_channelizer_impl.h:19
size_t len
Definition fft_channelizer_impl.h:27
float sample_rate
Definition fft_channelizer_impl.h:24
Definition fft_burst_tagger_impl.h:30