GNU Radio's DAB Package
fib_sink_vb_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright belongs to Andreas Mueller
4  * Modified 2017 by Moritz Luca Schmid, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT).
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this software; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 #ifndef INCLUDED_DAB_FIB_SINK_VB_IMPL_H
22 #define INCLUDED_DAB_FIB_SINK_VB_IMPL_H
23 
24 #include <grdab/fib_sink_vb.h>
25 
26 namespace gr {
27  namespace dab {
28 /*! \brief sink for DAB FIBs, interprets MSC and SI
29  *
30  */
31  class fib_sink_vb_impl : public fib_sink_vb {
32 
33  private:
34  int process_fib(const char *fib);
35 
36  int process_fig(uint8_t type, const char *data, uint8_t length);
37 
38  bool d_crc_passed;
39 
40  std::string d_json_ensemble_info;
41  // service info
42  std::string d_json_service_info;
43  std::string d_service_info_current;
44  int d_service_info_written_trigger;
45  // service labels
46  std::string d_json_service_labels;
47  std::string d_service_labels_current;
48  int d_service_labels_written_trigger;
49  // service subch
50  std::string d_json_subch_info;
51  std::string d_subch_info_current;
52  int d_subch_info_written_trigger;
53  // programme type
54  std::string d_json_programme_type;
55  std::string d_programme_type_current;
56  int d_programme_type_written_trigger;
57 
58 
59  bool d_print_channel_info;
60 
61  public:
63 
64  virtual std::string get_ensemble_info()
65  { return d_json_ensemble_info; }
66 
67  virtual std::string get_service_info()
68  { return d_json_service_info;}
69 
70  virtual std::string get_service_labels()
71  { return d_json_service_labels;}
72 
73  virtual std::string get_subch_info()
74  { return d_json_subch_info;}
75 
76  virtual std::string get_programme_type()
77  { return d_json_programme_type;}
78 
79  virtual bool get_crc_passed()
80  { return d_crc_passed;}
81 
82  int work(int noutput_items,
83  gr_vector_const_void_star &input_items,
84  gr_vector_void_star &output_items);
85  void set_print_channel_info(bool val);
86  };
87  }
88 }
89 
90 #endif /* INCLUDED_DAB_FIB_SINK_B_H */
virtual std::string get_service_labels()
Definition: fib_sink_vb_impl.h:70
virtual std::string get_ensemble_info()
Definition: fib_sink_vb_impl.h:64
sink for DAB FIBs, interprets MSC and SI
Definition: fib_sink_vb_impl.h:31
<+description of block+>
Definition: fib_sink_vb.h:36
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
virtual std::string get_programme_type()
Definition: fib_sink_vb_impl.h:76
virtual std::string get_service_info()
Definition: fib_sink_vb_impl.h:67
Definition: complex_to_interleaved_float_vcf.h:28
virtual bool get_crc_passed()
Definition: fib_sink_vb_impl.h:79
virtual std::string get_subch_info()
Definition: fib_sink_vb_impl.h:73
void set_print_channel_info(bool val)