Python gnuradio.gr.sync_block() Examples
The following are 13
code examples of gnuradio.gr.sync_block().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
gnuradio.gr
, or try the search function
.
Example #1
Source File: block2.py From OFDM with MIT License | 6 votes |
def __init__(self): # only default arguments here """arguments to this function show up as parameters in GRC""" gr.sync_block.__init__( self, name='find corr', # will show up in GRC in_sig=[(np.float32,320), (np.float32,320)], out_sig=[np.float32,np.float32] ) # if an attribute with the same name as a parameter is found, # a callback is registered (properties work, too). self.message_port_register_out(pmt.to_pmt("out"))
Example #2
Source File: pymavlink_source_p.py From gr-uaslink with GNU General Public License v3.0 | 6 votes |
def __init__(self, connection_string, baud_rate=57600): gr.sync_block.__init__(self, name="pymavlink_source_p", in_sig=None, out_sig=None) self.connection_string=connection_string self.baud_rate=baud_rate #self.message_port_register_in(pmt.intern("command")) #self.set_msg_handler(pmt.intern("command"), self.cmd_handler) self.message_port_register_out(pmt.intern("MAVLink")) self.mavlink_connection = mavutil.mavlink_connection(connection_string,baud=baud_rate) print (self.mavlink_connection) self.running=True #print self.mavlink_connection self.thread = threading.Thread(target=self.check_for_message) self.thread.daemon = True self.thread.start()
Example #3
Source File: pymavlink_source_sink_pp.py From gr-uaslink with GNU General Public License v3.0 | 6 votes |
def __init__(self, connection_string,baud_rate=57600): gr.sync_block.__init__(self, name="pymavlink_source_sink_pp", in_sig=None, out_sig=None) self.connection_string=connection_string self.baud_rate=baud_rate #self.message_port_register_in(pmt.intern("command")) #self.set_msg_handler(pmt.intern("command"), self.cmd_handler) self.message_port_register_in(pmt.intern("MAVLink_IN")) self.message_port_register_out(pmt.intern("MAVLink_OUT")) self.mavlink_connection = mavutil.mavlink_connection(connection_string,baud=baud_rate) self.set_msg_handler(pmt.intern("MAVLink_IN"), self.mavlink_handler) print (self.mavlink_connection) self.running=True #print self.mavlink_connection self.thread = threading.Thread(target=self.check_for_message) self.thread.daemon = True self.thread.start()
Example #4
Source File: block2_0.py From OFDM with MIT License | 5 votes |
def __init__(self): # only default arguments here """arguments to this function show up as parameters in GRC""" gr.sync_block.__init__( self, name='convert to message', # will show up in GRC in_sig=[np.float32], out_sig=[np.float32] # out_sig=[] ) # if an attribute with the same name as a parameter is found, # a callback is registered (properties work, too). self.message_port_register_out(pmt.to_pmt("out"))
Example #5
Source File: epy_block_0.py From OFDM with MIT License | 5 votes |
def __init__(self, example_param=1.0): # only default arguments here self.fixed_index = None self.last_index = None self.done = False """arguments to this function show up as parameters in GRC""" gr.sync_block.__init__( self, name='keep m in n', # will show up in GRC in_sig=[(np.complex64,320),np.float32], out_sig=[(np.complex64,256),np.float32] ) # if an attribute with the same name as a parameter is found, # a callback is registered (properties work, too). self.example_param = example_param
Example #6
Source File: epy_block_1.py From OFDM with MIT License | 5 votes |
def __init__(self): # only default arguments here """arguments to this function show up as parameters in GRC""" gr.sync_block.__init__( self, name='convert to message 2', # will show up in GRC in_sig=[np.float32], out_sig=[np.float32] # out_sig=[] ) # if an attribute with the same name as a parameter is found, # a callback is registered (properties work, too). self.message_port_register_out(pmt.to_pmt("out"))
Example #7
Source File: capture_cc.py From globalstar with GNU General Public License v2.0 | 5 votes |
def __init__(self): gr.sync_block.__init__(self, name="capture_cc", #in_sig=[<+numpy.float+>], in_sig=[numpy.complex64, numpy.float32], out_sig=None)
Example #8
Source File: pymavlink_sink_p.py From gr-uaslink with GNU General Public License v3.0 | 5 votes |
def __init__(self, connection_string,baud_rate=57600): gr.sync_block.__init__(self, name="pymavlink_sink_p", in_sig=None, out_sig=None) self.connection_string=connection_string self.baud_rate=baud_rate #self.message_port_register_in(pmt.intern("command")) #self.set_msg_handler(pmt.intern("command"), self.cmd_handler) self.message_port_register_in(pmt.intern("MAVLink")) self.mavlink_connection = mavutil.mavlink_connection(connection_string,baud=baud_rate) self.set_msg_handler(pmt.intern("MAVLink"), self.mavlink_handler) print (self.mavlink_connection) # we will use a fifo as an encode/decode buffer
Example #9
Source File: burst_verification.py From gr-uaslink with GNU General Public License v3.0 | 5 votes |
def __init__(self): gr.sync_block.__init__(self, name="burst_verification", in_sig=None, out_sig=None) self.message_port_register_in(pmt.intern("PDU_IN")) self.message_port_register_out(pmt.intern("Control_OUT")) self.data=[0]*8 self.set_msg_handler(pmt.intern("PDU_IN"), self.pdu_handler)
Example #10
Source File: pdu_control_to_pdu_vector.py From gr-uaslink with GNU General Public License v3.0 | 5 votes |
def __init__(self): gr.sync_block.__init__(self, name="pdu_control_to_pdu_vector", in_sig=None, out_sig=None) self.message_port_register_in(pmt.intern("Control_IN")) self.message_port_register_out(pmt.intern("Vector_OUT")) self.data=[0]*9 self.set_msg_handler(pmt.intern("Control_IN"), self.control_handler)
Example #11
Source File: pdu_vector_to_pdu_control.py From gr-uaslink with GNU General Public License v3.0 | 5 votes |
def __init__(self): gr.sync_block.__init__(self, name="pdu_vector_to_pdu_control", in_sig=None, out_sig=None) self.message_port_register_in(pmt.intern("Vector_IN")) self.message_port_register_out(pmt.intern("Control_OUT")) self.data=[0]*8 self.set_msg_handler(pmt.intern("Vector_IN"), self.vector_handler)
Example #12
Source File: doorbell-receiver.py From so-you-want-to-hack-radios with GNU General Public License v3.0 | 5 votes |
def __init__(self, ): gr.sync_block.__init__(self, name="Doorbell Framer", in_sig=[numpy.float32], out_sig=None) self.last_state = 0 self.last_change = 0 self.bits = []
Example #13
Source File: Radio.py From PLSDR with GNU General Public License v3.0 | 5 votes |
def __init__(self,main,sz): self.main = main self.sz = sz gr.sync_block.__init__( self, name = "My Vector sink", in_sig = [(np.float32,self.sz)], out_sig = None, ) # event-related self.drawgr = DrawGraphics() self.drawgr.draw.connect(self.main.draw_fft_disp)