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)
评论列表
文章目录