Merge commit 'v3.3.0' into upstream
[debian/gnuradio] / gr-atsc / src / lib / atsc.i
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2009 Free Software Foundation, Inc.
4  * 
5  * This file is part of GNU Radio
6  * 
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  * 
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 %include "gnuradio.i"                           // the common stuff
24
25 %{
26 #include <atsc_randomizer.h>
27 #include <atsc_derandomizer.h>
28 #include <atsc_rs_encoder.h>
29 #include <atsc_rs_decoder.h>
30 #include <atsc_interleaver.h>
31 #include <atsc_deinterleaver.h>
32 #include <atsc_trellis_encoder.h>
33 #include <atsc_viterbi_decoder.h>
34 #include <atsc_ds_to_softds.h>
35 #include <atsc_field_sync_mux.h>
36 #include <atsc_field_sync_demux.h>
37 #include <atsc_equalizer.h>
38 #include <atsc_fs_checker.h>
39 #include <atsc_bit_timing_loop.h>
40 #include <atsc_fpll.h>
41 #include <atsc_depad.h>
42 #include <atsc_pad.h>
43 %}
44
45 %include "atsc_consts.h"
46
47 %constant int sizeof_atsc_mpeg_packet = sizeof(atsc_mpeg_packet);
48 %constant int sizeof_atsc_mpeg_packet_no_sync = sizeof(atsc_mpeg_packet_no_sync);
49 %constant int sizeof_atsc_mpeg_packet_rs_encoded = sizeof(atsc_mpeg_packet_rs_encoded);
50 %constant int sizeof_atsc_data_segment = sizeof(atsc_data_segment);
51 %constant int sizeof_atsc_soft_data_segment = sizeof(atsc_soft_data_segment);
52
53 %constant int sizeof_atsc_mpeg_packet_pad = atsc_mpeg_packet::NPAD;
54 %constant int sizeof_atsc_mpeg_packet_no_sync_pad = atsc_mpeg_packet_no_sync::NPAD;
55 %constant int sizeof_atsc_mpeg_packet_rs_encoded_pad = atsc_mpeg_packet_rs_encoded::NPAD;
56 %constant int sizeof_atsc_data_segment_pad = atsc_data_segment::NPAD;
57 %constant int sizeof_atsc_soft_data_segment_pad = atsc_soft_data_segment::NPAD;
58
59 // ----------------------------------------------------------------
60
61 GR_SWIG_BLOCK_MAGIC(atsc,randomizer);
62
63 atsc_randomizer_sptr atsc_make_randomizer();
64
65 class atsc_randomizer : public gr_sync_block
66 {
67   atsc_randomizer();
68
69 public:
70   void reset();
71 };
72
73 // ----------------------------------------------------------------
74
75 GR_SWIG_BLOCK_MAGIC(atsc,derandomizer);
76
77 atsc_derandomizer_sptr atsc_make_derandomizer();
78
79 class atsc_derandomizer : public gr_sync_block
80 {
81   atsc_derandomizer();
82
83 public:
84   void reset();
85 };
86
87 // ----------------------------------------------------------------
88
89 GR_SWIG_BLOCK_MAGIC(atsc,rs_encoder);
90
91 atsc_rs_encoder_sptr atsc_make_rs_encoder();
92
93 class atsc_rs_encoder : public gr_sync_block
94 {
95   atsc_rs_encoder();
96
97 public:
98   void reset();
99 };
100
101 // ----------------------------------------------------------------
102
103 GR_SWIG_BLOCK_MAGIC(atsc,rs_decoder);
104
105 atsc_rs_decoder_sptr atsc_make_rs_decoder();
106
107 class atsc_rs_decoder : public gr_sync_block
108 {
109   atsc_rs_decoder();
110
111 public:
112   void reset();
113 };
114
115 // ----------------------------------------------------------------
116
117 GR_SWIG_BLOCK_MAGIC(atsc,interleaver);
118
119 atsc_interleaver_sptr atsc_make_interleaver();
120
121 class atsc_interleaver : public gr_sync_block
122 {
123   atsc_interleaver();
124
125 public:
126   void reset();
127 };
128
129 // ----------------------------------------------------------------
130
131 GR_SWIG_BLOCK_MAGIC(atsc,deinterleaver);
132
133 atsc_deinterleaver_sptr atsc_make_deinterleaver();
134
135 class atsc_deinterleaver : public gr_sync_block
136 {
137   atsc_deinterleaver();
138
139 public:
140   void reset();
141 };
142
143 // ----------------------------------------------------------------
144
145 GR_SWIG_BLOCK_MAGIC(atsc,trellis_encoder);
146
147 atsc_trellis_encoder_sptr atsc_make_trellis_encoder();
148
149 class atsc_trellis_encoder : public gr_sync_block
150 {
151   atsc_trellis_encoder();
152
153 public:
154   void reset();
155 };
156
157 // ----------------------------------------------------------------
158
159 GR_SWIG_BLOCK_MAGIC(atsc,viterbi_decoder);
160
161 atsc_viterbi_decoder_sptr atsc_make_viterbi_decoder();
162
163 class atsc_viterbi_decoder : public gr_sync_block
164 {
165   atsc_viterbi_decoder();
166
167 public:
168   void reset();
169 };
170
171 // ----------------------------------------------------------------
172
173 GR_SWIG_BLOCK_MAGIC(atsc,ds_to_softds);
174
175 atsc_ds_to_softds_sptr atsc_make_ds_to_softds();
176
177 class atsc_ds_to_softds : public gr_sync_block
178 {
179   atsc_ds_to_softds();
180
181 public:
182   void reset();
183 };
184
185 // ----------------------------------------------------------------
186
187 GR_SWIG_BLOCK_MAGIC(atsc,field_sync_mux);
188
189 atsc_field_sync_mux_sptr atsc_make_field_sync_mux();
190
191 class atsc_field_sync_mux : public gr_sync_block
192 {
193   atsc_field_sync_mux();
194
195 public:
196   void reset();
197 };
198
199 // ----------------------------------------------------------------
200
201 GR_SWIG_BLOCK_MAGIC(atsc,field_sync_demux);
202
203 atsc_field_sync_demux_sptr atsc_make_field_sync_demux();
204
205 class atsc_field_sync_demux : public gr_block
206 {
207   atsc_field_sync_demux();
208
209 public:
210   void reset();
211 };
212
213 // ----------------------------------------------------------------
214
215 GR_SWIG_BLOCK_MAGIC(atsc,equalizer);
216
217 atsc_equalizer_sptr atsc_make_equalizer();
218
219 class atsc_equalizer : public gr_sync_block
220 {
221   atsc_equalizer();
222
223 public:
224   void reset();
225 };
226
227 // ----------------------------------------------------------------
228
229 GR_SWIG_BLOCK_MAGIC(atsc,fs_checker);
230
231 atsc_fs_checker_sptr atsc_make_fs_checker();
232
233 class atsc_fs_checker : public gr_sync_block
234 {
235   atsc_fs_checker();
236
237 public:
238   void reset();
239 };
240
241 // ----------------------------------------------------------------
242
243 GR_SWIG_BLOCK_MAGIC(atsc,bit_timing_loop);
244
245 atsc_bit_timing_loop_sptr atsc_make_bit_timing_loop();
246
247 class atsc_bit_timing_loop : public gr_block
248 {
249   atsc_bit_timing_loop();
250
251 public:
252   void reset();
253 };
254
255 // ----------------------------------------------------------------
256
257 GR_SWIG_BLOCK_MAGIC(atsc,fpll);
258
259 atsc_fpll_sptr atsc_make_fpll();
260
261 class atsc_fpll : public gr_sync_block
262 {
263   atsc_fpll();
264
265 public:
266   void reset();
267
268 };
269
270 // ----------------------------------------------------------------
271
272 GR_SWIG_BLOCK_MAGIC(atsc,depad);
273
274 atsc_depad_sptr atsc_make_depad();
275
276 class atsc_depad : public gr_sync_interpolator
277 {
278   atsc_depad();
279
280 public:
281   void reset();
282
283 };
284
285 // ----------------------------------------------------------------
286
287 GR_SWIG_BLOCK_MAGIC(atsc,pad);
288
289 atsc_pad_sptr atsc_make_pad();
290
291 class atsc_pad : public gr_sync_decimator
292 {
293   atsc_pad();
294
295 public:
296   void reset();
297
298 };
299
300 // ----------------------------------------------------------------
301