io_helpers.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def getStreamDef( self, name=None, hostip=None, pkts=1000, block=True, returnSddsAnalyzer=True):
        # grab data if stream definition is available 
        sdef =None
        aid=name
        if not aid:
            if len(self._streamdefs) ==  0:
                raise Exception("No attachment have been made, use grabData or call attach")

            aid = self._streamdefs.keys()[0]
            print "Defaults to first entry, attach id = ", aid
            sdef = self._streamdefs[aid]
        else:
            sdef = sefl._streamdefs[aid]

        if not sdef:
            raise Exception("No SDDS stream definition for attach id:" + aid )

        if not hostip:
            hostip = _socket.gethostbyname(_socket.gethostname())

        return self.getData( sdef.multicastAddress, hostip, sdef.port, packets, block=block, returnSDDSAnalyzer=returnSDDSAnalyzer)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号