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
23namespace gr {
24namespace rds {
25
26class parser_impl : public parser
27{
28public:
29 parser_impl(bool log, bool debug, unsigned char pty_locale);
30
31private:
32 ~parser_impl();
33
34 void reset();
35 void send_message(long, std::string);
36 void parse(pmt::pmt_t pdu);
37 void decode_af_pairs();
38 int decode_af(unsigned int af_code, bool lf_mf);
39 void decode_optional_content(int, unsigned long int *);
40
41 void decode_type0( unsigned int* group, bool B);
42 void decode_type1( unsigned int* group, bool B);
43 void decode_type2( unsigned int* group, bool B);
44 void decode_type3( unsigned int* group, bool B);
45 void decode_type4( unsigned int* group, bool B);
46 void decode_type5( unsigned int* group, bool B);
47 void decode_type6( unsigned int* group, bool B);
48 void decode_type7( unsigned int* group, bool B);
49 void decode_type8( unsigned int* group, bool B);
50 void decode_type9( unsigned int* group, bool B);
51 void decode_type10(unsigned int* group, bool B);
52 void decode_type11(unsigned int* group, bool B);
53 void decode_type12(unsigned int* group, bool B);
54 void decode_type13(unsigned int* group, bool B);
55 void decode_type14(unsigned int* group, bool B);
56 void decode_type15(unsigned int* group, bool B);
57
58 unsigned int program_identification;
59 unsigned char program_type;
60 unsigned char pi_country_identification;
61 unsigned char pi_area_coverage;
62 unsigned char pi_program_reference_number;
63 char radiotext[64];
64 unsigned int radiotext_segment_flags;
65 char program_service_name[8];
66 unsigned int program_service_name_segment_flags;
67 bool radiotext_AB_flag;
68 std::vector<unsigned int> af_pairs;
69 bool traffic_program;
70 bool traffic_announcement;
71 bool music_speech;
72 bool mono_stereo;
73 bool artificial_head;
74 bool compressed;
75 bool dynamic_pty;
76 bool log;
77 bool debug;
78 unsigned char pty_locale;
79 unsigned long int free_format[4];
80 int no_groups;
81 char ps_on[8];
82 gr::thread::mutex d_mutex;
83};
84
85} /* namespace rds */
86} /* namespace gr */
87
88#endif /* INCLUDED_RDS_PARSER_IMPL_H */
Definition decoder.h:24
Definition decoder.h:23