blob: e475b0f22e138ac8cb4e28a95c3da3cc0987f960 [file] [log] [blame]
piotr6c692872014-02-08 14:16:26 +01001/* -*- c++ -*- */
ptrkrysik529895b2014-12-02 18:07:38 +01002/*
3 * @file
Piotr Krysika6268a52017-08-23 16:02:19 +02004 * @author (C) 2014 by Piotr Krysik <ptrkrysik@gmail.com>
ptrkrysik529895b2014-12-02 18:07:38 +01005 * @section LICENSE
6 *
7 * Gr-gsm is free software; you can redistribute it and/or modify
piotr6c692872014-02-08 14:16:26 +01008 * 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.
ptrkrysik529895b2014-12-02 18:07:38 +010011 *
12 * Gr-gsm is distributed in the hope that it will be useful,
piotr6c692872014-02-08 14:16:26 +010013 * 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.
ptrkrysik529895b2014-12-02 18:07:38 +010016 *
piotr6c692872014-02-08 14:16:26 +010017 * You should have received a copy of the GNU General Public License
ptrkrysik529895b2014-12-02 18:07:38 +010018 * along with gr-gsm; see the file COPYING. If not, write to
piotr6c692872014-02-08 14:16:26 +010019 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_GSM_BURSTS_PRINTER_IMPL_H
24#define INCLUDED_GSM_BURSTS_PRINTER_IMPL_H
25
Roman Khassraf7faabf32015-07-24 14:14:16 +020026#define DUMMY_BURST_LEN 148
27
ptrkrysik3be74a72014-12-13 10:11:00 +010028#include <grgsm/misc_utils/bursts_printer.h>
piotr6d152d92014-02-21 00:02:44 +010029#include <set>
piotr6c692872014-02-08 14:16:26 +010030
31namespace gr {
32 namespace gsm {
33
34 class bursts_printer_impl : public bursts_printer
35 {
36 private:
37 void bursts_print(pmt::pmt_t burst);
Jacob Gilbert607a09e2014-12-13 10:41:20 -080038 pmt::pmt_t d_prepend_string;
Roman Khassraf717b57b2015-04-12 18:09:45 +020039 bool d_prepend_fnr;
Roman Khassraf63444962015-07-13 13:42:57 +020040 bool d_prepend_frame_count;
41 bool d_print_payload_only;
Roman Khassraf7faabf32015-07-24 14:14:16 +020042 bool d_ignore_dummy_bursts;
43 bool is_dummy_burst(int8_t *burst, size_t burst_len);
44 static const int8_t d_dummy_burst[];
piotr6c692872014-02-08 14:16:26 +010045 public:
Roman Khassraf63444962015-07-13 13:42:57 +020046 bursts_printer_impl(pmt::pmt_t prepend_string, bool prepend_fnr=false,
Roman Khassraf7faabf32015-07-24 14:14:16 +020047 bool prepend_frame_count=false, bool print_payload_only=false,
48 bool ignore_dummy_bursts=false);
piotr6c692872014-02-08 14:16:26 +010049 ~bursts_printer_impl();
50 };
51
52 } // namespace gsm
53} // namespace gr
54
55#endif /* INCLUDED_GSM_BURSTS_PRINTER_IMPL_H */
56