当前位置: 首页>>代码示例>>Python>>正文


Python gr.sync_block方法代码示例

本文整理汇总了Python中gnuradio.gr.sync_block方法的典型用法代码示例。如果您正苦于以下问题:Python gr.sync_block方法的具体用法?Python gr.sync_block怎么用?Python gr.sync_block使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnuradio.gr的用法示例。


在下文中一共展示了gr.sync_block方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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() 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:21,代码来源:pymavlink_source_sink_pp.py

示例2: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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() 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:19,代码来源:pymavlink_source_p.py

示例3: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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 
开发者ID:drom,项目名称:OFDM,代码行数:17,代码来源:epy_block_0.py

示例4: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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")) 
开发者ID:drom,项目名称:OFDM,代码行数:14,代码来源:block2_0.py

示例5: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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")) 
开发者ID:drom,项目名称:OFDM,代码行数:14,代码来源:epy_block_1.py

示例6: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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")) 
开发者ID:drom,项目名称:OFDM,代码行数:13,代码来源:block2.py

示例7: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
def __init__(self):
        gr.sync_block.__init__(self,
            name="capture_cc",
            #in_sig=[<+numpy.float+>],
            in_sig=[numpy.complex64, numpy.float32],
            out_sig=None) 
开发者ID:synack,项目名称:globalstar,代码行数:8,代码来源:capture_cc.py

示例8: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:16,代码来源:pymavlink_sink_p.py

示例9: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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) 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:11,代码来源:burst_verification.py

示例10: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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) 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:11,代码来源:pdu_control_to_pdu_vector.py

示例11: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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) 
开发者ID:deptofdefense,项目名称:gr-uaslink,代码行数:11,代码来源:pdu_vector_to_pdu_control.py

示例12: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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 = [] 
开发者ID:BastilleResearch,项目名称:so-you-want-to-hack-radios,代码行数:7,代码来源:doorbell-receiver.py

示例13: __init__

# 需要导入模块: from gnuradio import gr [as 别名]
# 或者: from gnuradio.gr import sync_block [as 别名]
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) 
开发者ID:lutusp,项目名称:PLSDR,代码行数:15,代码来源:Radio.py


注:本文中的gnuradio.gr.sync_block方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。