Thanks for you reply.
I am wondering why the data stream ports of byte or integer 8 could be disconnected by other ports.
Here is an example. The connecting code is commented out, but we can run this program without getting a error.
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Top Block
# Generated: Thu Apr 24 11:57:08 2014
##################################################
from gnuradio import blocks
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes
from optparse import OptionParser
class top_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self, "Top Block")
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 32000
##################################################
# Blocks
##################################################
self.blocks_null_source_0 = blocks.null_source(gr.sizeof_char*1)
self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_char*1)
##################################################
# Connections
##################################################
#self.connect((self.blocks_null_source_0, 0), (self.blocks_null_sink_0, 0))
# QT sink close method reimplementation
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
(options, args) = parser.parse_args()
tb = top_block()
tb.start()
raw_input('Press Enter to quit: ')
tb.stop()
tb.wait()