Cool thanks for the reply. The reason I am doing this is because I am trying to transmit signals at different times... and testing shows the interleave block acts like the sync type blocks you mention. I am guessing the same idea can be applied and make a new interleave block and inherits from the gr_block.
Though I am just wondering that this has to be a common problem with the dual usrp TX usage, I was wondering if anyone else has done similar work already or has an more "standard" solution using the tools already built into GNU radio. As I am not too familiar with the build toolchain and the C++ backbones behind the python, however I will be reading up on it now. Tom Rondeau wrote: > > On Sat, Feb 19, 2011 at 4:52 AM, ichigo.san <ichigo....@gmail.com> wrote: > >> >> Hi, >> >> I was wondering if there is a method to have a source block constantly >> sending out "0" and once it recieves a message from python, e.g a packet, >> it >> will then stream the message and switch back to sending "0" when done. >> >> I've tried: >> Message Source ----------------------------> (Add, 0) >> Constant Source/Vector Source with 0 -----> (Add, 1) ---> output >> >> However, the add block (and all blocks in gnuradio) waits for stream >> items >> from both inputs to be ready (i.e no interpolation) before making a >> output >> stream item. This effectively nullifies the const source in the above >> example. >> >> I was wondering if there is any possible way to solve this problem? >> >> The reason I am asking this is I am using a dual TX setup on a single >> USRP >> which interleaves output signals. I have I output signal that is >> constantly >> sending (beacon) and one that is only sending sometimes, however the >> interleaving of output signals means that both streams needs to be >> constantly sending. >> > > Right, the add block needs to see items from both streams so that it can > add > them together. If there is no data on one stream, there is nothing to add > and it does not assume zeros. > > My advice is to make a new block. The easiest would probably to make a new > add block that inherits from gr_block instead of gr_sync_block. In this > block, you tests the length of both inputs and add which items together > that > you want, substituting zeros when there is no more data on the incoming > message stream. It will be pretty specific to your needs, and be careful > with your consume() and return item numbers to account for what you've > done > with both streams. > > Tom > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > -- View this message in context: http://old.nabble.com/Constant-output-message-source-tp30964604p31029150.html Sent from the GnuRadio mailing list archive at Nabble.com. _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio