Fri Apr 28 11:07:37 2017
options
author
window_size
category
[GRC Hier Blocks]
comment
description
_enabled
True
_coordinate
(8, 8)
_rotation
0
generate_options
qt_gui
hier_block_src_path
.:
id
top_block
max_nouts
0
qt_qss_theme
realtime_scheduling
run_command
{python} -u {filename}
run_options
prompt
run
True
thread_safe_setters
title
variable_qtgui_range
comment
SWR3
value
922e5
_enabled
0
_coordinate
(479, 0)
gui_hint
tabs@0:0,1,1,1
_rotation
0
id
freq1
label
min_len
200
orient
Qt.Horizontal
start
86e6
step
1e5
stop
108e6
rangeType
float
widget
counter_slider
variable
comment
_enabled
True
_coordinate
(846, 247)
_rotation
0
id
freq1
value
92.2e6
variable_qtgui_range
comment
value
98800000
_enabled
0
_coordinate
(343, 0)
gui_hint
tabs@0:0,0,1,1
_rotation
0
id
freq_tune
label
min_len
200
orient
Qt.Horizontal
start
86e6
step
1e5
stop
108e6
rangeType
float
widget
counter_slider
variable
comment
_enabled
True
_coordinate
(822, 151)
_rotation
0
id
freq_tune
value
98.8e6
variable_qtgui_range
comment
value
1200
_enabled
True
_coordinate
(718, 0)
gui_hint
tabs@0
_rotation
0
id
samp_rate
label
min_len
200
orient
Qt.Horizontal
start
500
step
100
stop
20000
rangeType
float
widget
counter_slider
blocks_file_source
alias
comment
affinity
_enabled
True
file
/user/wire2/richter/abgabe/crash-examples/tmc decoder crash/sync_decim_out_11221
_coordinate
(63, 131)
_rotation
0
id
blocks_file_source_0
maxoutbuf
0
minoutbuf
0
type
float
repeat
True
vlen
1
blocks_skiphead
alias
comment
affinity
_enabled
True
_coordinate
(287, 131)
_rotation
0
id
blocks_skiphead_0
maxoutbuf
0
minoutbuf
0
num_items
100000
type
float
vlen
1
blocks_throttle
alias
comment
affinity
_enabled
True
_coordinate
(455, 131)
_rotation
0
id
blocks_throttle_0
ignoretag
True
maxoutbuf
10
minoutbuf
0
samples_per_second
samp_rate
type
float
vlen
1
digital_binary_slicer_fb
alias
comment
affinity
_enabled
1
_coordinate
(455, 207)
_rotation
180
id
digital_binary_slicer_fb_0
maxoutbuf
0
minoutbuf
0
digital_diff_decoder_bb
alias
comment
affinity
_enabled
1
_coordinate
(255, 203)
_rotation
180
id
digital_diff_decoder_bb_0
maxoutbuf
0
minoutbuf
0
modulus
2
epy_block
alias
_io_cache
('freq-setter', 'blk', [('freqlist', '[92200000, 94700000, 101300000, 102300000, 105700000, 107700000]')], [], [('out', 'message', None)], 'Embedded Python Block example - a simple multiply const', ['freqlist'])
_source_code
"""
Embedded Python Blocks:
Each time this file is saved, GRC will instantiate the first class it finds
to get ports and parameters of your block. The arguments to __init__ will
be the parameters. All of them are required to have default values!
"""
import numpy as np
from gnuradio import gr
import pmt
from threading import Timer
#import time
class blk(gr.sync_block): # other base classes are basic_block, decim_block, interp_block
"""Embedded Python Block example - a simple multiply const"""
def __init__(self, freqlist=[92200000,94700000,101300000,102300000,105700000,107700000]): # only default arguments here
"""arguments to this function show up as parameters in GRC"""
gr.sync_block.__init__(
self,
name='freq-setter', # will show up in GRC
in_sig=None,
out_sig=None
)
# if an attribute with the same name as a parameter is found,
# a callback is registered (properties work, too).
self._freqlist=freqlist
self.message_port_register_out(pmt.intern('out'))
self.send_msg()
Timer(3, self.send_msg).start() #after 3 seconds (when table initialized)
#self.time=time.time()
@property
def freqlist(self):
"""I'm the 'freqlist' property."""
return self._freqlist
@freqlist.setter
def freqlist(self, value):
self._freqlist = value
self.send_msg()
@freqlist.deleter
def freqlist(self):
del self._freqlist
def send_msg(self):
#print(self.freqlist)
for i,freq in enumerate(self.freqlist):
send_string=str(i+1)+" "+str(freq)
send_pmt = pmt.string_to_symbol(send_string)
self.message_port_pub(pmt.intern('out'), send_pmt)
#def work(self, input_items, output_items):
#print("work")
#now=time.time()
#if now-self.time >2:
#self.time=now
#self.send_msg()
#return len(input_items[0])
comment
_enabled
True
freqlist
[freq1]
_coordinate
(263, 395)
_rotation
0
id
epy_block_0
multirds_rds_decoder_redsea
alias
comment
affinity
debug
True
_enabled
True
_coordinate
(255, 307)
_rotation
0
id
multirds_rds_decoder_redsea_0
log
False
maxoutbuf
0
minoutbuf
0
multirds_rds_parser_table_qt
alias
comment
affinity
debug
False
_enabled
True
_coordinate
(503, 351)
gui_hint
tabs@0
_rotation
0
id
multirds_rds_parser_table_qt_0
label
log
False
maxoutbuf
0
minoutbuf
0
nPorts
1
freq_tune
freq_tune
workdir
/user/wire2/richter/data/
writeDB
False
multirds_tmc_parser
alias
comment
affinity
debug
True
_enabled
1
_coordinate
(726, 363)
gui_hint
tabs@0
_rotation
0
id
multirds_tmc_parser_0
label
log
False
maxheight
0
workdir
/user/wire2/richter/data/
writeDB
True
qtgui_tab_widget
alias
comment
_enabled
1
_coordinate
(0, 355)
gui_hint
_rotation
0
id
tabs
label0
table
label1
graphs
label10
Tab 10
label11
Tab 11
label12
Tab 12
label13
Tab 13
label14
Tab 14
label15
Tab 15
label16
Tab 16
label17
Tab 17
label18
Tab 18
label19
Tab 19
label2
Tab 2
label3
Tab 3
label4
Tab 4
label5
Tab 5
label6
Tab 6
label7
Tab 7
label8
Tab 8
label9
Tab 9
num_tabs
2
blocks_file_source_0
blocks_skiphead_0
0
0
blocks_skiphead_0
blocks_throttle_0
0
0
blocks_throttle_0
digital_binary_slicer_fb_0
0
0
digital_binary_slicer_fb_0
digital_diff_decoder_bb_0
0
0
digital_diff_decoder_bb_0
multirds_rds_decoder_redsea_0
0
0
epy_block_0
multirds_rds_parser_table_qt_0
out
freq
multirds_rds_decoder_redsea_0
multirds_rds_parser_table_qt_0
out
in
multirds_rds_parser_table_qt_0
multirds_tmc_parser_0
tmc_raw
in