Пример #1
0
 def __init__(self, msgq):
     gr.block.__init__(
         self, name = "_queue_to_blob",
         in_sig = None, out_sig = None,
         num_msg_outputs = 1
     )
     self._msgq = msgq
     self._mgr = pmt.pmt_mgr()
     for i in range(64):
         self._mgr.set(pmt.pmt_make_blob(10000))
Пример #2
0
 def test04 (self):
     try: mgr = pmt.pmt_mgr()
     except: return #may not be implemented
     mgr.set(pmt.pmt_make_blob(100))
     mgr.set(pmt.pmt_make_blob(100))
     a = mgr.acquire(False)
     b = mgr.acquire(False)
     c = mgr.acquire(False)
     self.assertTrue(not pmt.pmt_is_null(a))
     self.assertTrue(not pmt.pmt_is_null(b))
     self.assertTrue(pmt.pmt_is_null(c))
Пример #3
0
 def test04(self):
     try:
         mgr = pmt.pmt_mgr()
     except:
         return  #may not be implemented
     mgr.set(pmt.pmt_make_blob(100))
     mgr.set(pmt.pmt_make_blob(100))
     a = mgr.acquire(False)
     b = mgr.acquire(False)
     c = mgr.acquire(False)
     self.assertTrue(not pmt.pmt_is_null(a))
     self.assertTrue(not pmt.pmt_is_null(b))
     self.assertTrue(pmt.pmt_is_null(c))