Piotr Krysik | 773a194 | 2016-05-20 12:45:54 +0200 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
2 | ################################################## | ||||
3 | # GNU Radio Python Flow Graph | ||||
4 | # Title: BCCH + CCCH demapper | ||||
5 | # Author: Piotr Krysik | ||||
6 | # Description: Demapper for BCCH + CCCH control channels. This corresponds to channel combination iv specified in GSM 05.02, section 6.4 | ||||
7 | # Generated: Fri May 20 12:11:59 2016 | ||||
8 | ################################################## | ||||
9 | |||||
10 | from gnuradio import gr | ||||
11 | from gnuradio.filter import firdes | ||||
12 | import grgsm | ||||
13 | |||||
14 | |||||
15 | class gsm_bcch_ccch_demapper(grgsm.hier_block): | ||||
16 | |||||
17 | def __init__(self, timeslot_nr=0): | ||||
18 | grgsm.hier_block.__init__( | ||||
19 | self, "BCCH + CCCH demapper", | ||||
20 | gr.io_signature(0, 0, 0), | ||||
21 | gr.io_signature(0, 0, 0), | ||||
22 | ) | ||||
23 | self.message_port_register_hier_in("bursts") | ||||
24 | self.message_port_register_hier_out("bursts") | ||||
25 | |||||
26 | ################################################## | ||||
27 | # Parameters | ||||
28 | ################################################## | ||||
29 | self.timeslot_nr = timeslot_nr | ||||
30 | |||||
31 | ################################################## | ||||
32 | # Blocks | ||||
33 | ################################################## | ||||
34 | self.gsm_universal_ctrl_chans_demapper_0 = grgsm.universal_ctrl_chans_demapper(timeslot_nr, ([0,0,2,2,2,2,6,6,6,6,0,0,12,12,12,12,16,16,16,16,0,0,22,22,22,22,26,26,26,26,0,0,32,32,32,32,36,36,36,36,0,0,42,42,42,42,46,46,46,46,0,]), ([0,0,1,1,1,1,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,]), ([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]), ([0,0,0,0,0,0,6,6,6,6,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,41,41,41,41,0,0,47,47,47,47]), ([2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,]), ([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,])) | ||||
35 | |||||
36 | ################################################## | ||||
37 | # Connections | ||||
38 | ################################################## | ||||
39 | self.msg_connect((self.gsm_universal_ctrl_chans_demapper_0, 'bursts'), (self, 'bursts')) | ||||
40 | self.msg_connect((self, 'bursts'), (self.gsm_universal_ctrl_chans_demapper_0, 'bursts')) | ||||
41 | |||||
42 | def get_timeslot_nr(self): | ||||
43 | return self.timeslot_nr | ||||
44 | |||||
45 | def set_timeslot_nr(self, timeslot_nr): | ||||
46 | self.timeslot_nr = timeslot_nr |