GNU Radio's RDS Package
parser_impl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Bastian Bloessl <bloessl@ccs-labs.org>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 #ifndef INCLUDED_RDS_PARSER_IMPL_H
18 #define INCLUDED_RDS_PARSER_IMPL_H
19 
20 #include <rds/parser.h>
21 #include <gnuradio/thread/thread.h>
22 
23 namespace gr {
24 namespace rds {
25 
26 class parser_impl : public parser
27 {
28 public:
29  parser_impl(bool log, bool debug);
30 
31 private:
32  ~parser_impl();
33 
34  void reset();
35  void send_message(long, std::string);
36  void parse(pmt::pmt_t msg);
37  double decode_af(unsigned int);
38  void decode_optional_content(int, unsigned long int *);
39 
40  void decode_type0( unsigned int* group, bool B);
41  void decode_type1( unsigned int* group, bool B);
42  void decode_type2( unsigned int* group, bool B);
43  void decode_type3( unsigned int* group, bool B);
44  void decode_type4( unsigned int* group, bool B);
45  void decode_type5( unsigned int* group, bool B);
46  void decode_type6( unsigned int* group, bool B);
47  void decode_type7( unsigned int* group, bool B);
48  void decode_type8( unsigned int* group, bool B);
49  void decode_type9( unsigned int* group, bool B);
50  void decode_type10(unsigned int* group, bool B);
51  void decode_type11(unsigned int* group, bool B);
52  void decode_type12(unsigned int* group, bool B);
53  void decode_type13(unsigned int* group, bool B);
54  void decode_type14(unsigned int* group, bool B);
55  void decode_type15(unsigned int* group, bool B);
56 
57  unsigned int program_identification;
58  unsigned char program_type;
59  unsigned char pi_country_identification;
60  unsigned char pi_area_coverage;
61  unsigned char pi_program_reference_number;
62  char radiotext[65];
63  char program_service_name[9];
64  bool radiotext_AB_flag;
65  bool traffic_program;
66  bool traffic_announcement;
67  bool music_speech;
68  bool mono_stereo;
69  bool artificial_head;
70  bool compressed;
71  bool static_pty;
72  bool debug;
73  bool log;
74  gr::thread::mutex d_mutex;
75 };
76 
77 } /* namespace rds */
78 } /* namespace gr */
79 
80 #endif /* INCLUDED_RDS_PARSER_IMPL_H */
81 
Definition: decoder.h:23