How can I skip N ites for each input?

I know there is a block ‘Skip Head’

When I use it, however, I don’t think that it works as I expected
I expected that like this:

Suppose a sequence 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
0 0
0 0 1 0 0 0 0 0 0 0
(one 1, seven 0’s and repeat forever)
I want to take just ‘1’ for EVERY time
So I place and connect ‘Skip Head’ block and set ‘Num items’ 7, which
means
it skips first 7 items.

In fact, as my guess and experiment, it just skips the very first 7
items!
In short, I have 800 items and use ‘Skip Head’ with 7 skips,
it passes 793 items. I expected 100 items! (800 / (7 + 1))

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/25/2010 08:39 AM, Songsong G. wrote:

Suppose a sequence 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
(one 1, seven 0’s and repeat forever)
I want to take just ‘1’ for EVERY time
So I place and connect ‘Skip Head’ block and set ‘Num items’ 7, which means
it skips first 7 items.

Is there a specific reason to not just skip the first seven items in
your block? Something like starting your processing at in[7] instead of
in[0] with a sync/sync decimator block?

Happy hacking,

Moritz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJM7iODAAoJEOjnDXL6I0uZMvMQALmr002jAAP+E59JTz1tIEmv
tTN1W6ddzFvJQwypiUOg0BMwIp+vd8PprdEI/HaqSsJx5o/gQNgTzFc1zjz7Mcx3
UrTPiqLY96h4RU6vikLJEHWk437R2kNXZBEKJ+/gY4ImzJk6IzZ5XMyrKFkqLEMG
rAvEFKPr0r+wl8ERhERrAK7KtRnUTLU8vWWnr8oLLB0aPTlXx6JxTYwKMFyUsPgi
VaqdiT/b4xqd0txRgVcYYpji/T09Nz4FSLAF3EmL7bOf1PLhiCcFOSLIFs+4sEvW
XTfios1wC8MgQWdeBSCRChShsC7vCksvvJCtuFN/8SUAQ/EwVplQgj2KW/Pbu5Jv
vejR4QgTx9xokLo0uamph3/2KkujxmEvz5n0FUk9l0GlZ5yuBXc5l50fi3rzo9Rd
0ogQIxxl+g/T88JxgBBkDq+sV8Vmvl+B/bx90+0eBIY0Qatu+Vo5+5wCs5dYsOqb
7MrNeXa4Xyp5Kzea1nz4nA4ZKArxjdFS3evUkjNZSEGv6EbSBiqy/SRDoBMJZ2si
WytoKAfvq7ejpA7wpZ10VZEQNXE1QB9NdCKKiDC7BPS/DcdVMOAzcv1WDj49pUH2
cyg9WCS8ksm+FpPlON/ZVcQl49fyapnnr2HE6h6wKL+EswBVsq4F+qAiHjrugYrp
WcLDAtLx3LaeCWIxSAXa
=Kuz6
-----END PGP SIGNATURE-----

There is a block called keep one in n. Is that what you are looking for?

http://gnuradio.org/doc/doxygen/classgr__keep__one__in__n.html

-Josh

Thank you very much
You are must be a genius

2010/11/25 Josh B. [email protected]

Hello,

I implemented a selective repeat ARQ-protocol using the USRP2.
Up til now I used the USRP2 driver.
Now I want to upgrade my system to use UHD.
I upgrade the to hosts, the FPGA image and the firmware of my USRP2s.
Now the continous data transmission works fine.
But the bursty protocol communication doesn’t work.

I used this code form the ursp sink in the downstream part of the
transmitter:

if not self.usrp:
self.usrp2_sink = uhd.single_usrp_sink(
device_addr=“addr=192.168.10.2”,
io_type=uhd.io_type_t.COMPLEX_FLOAT32,
num_channels=1,
)
self.usrp2_sink.set_samp_rate(self.output_samp_rate)
self.usrp2_sink.set_center_freq(self.center_frequency, 0)
self.usrp2_sink.set_gain(self.tx_gain, 0)
else:
self.usrp2_sink = usrp2.sink_32fc(‘eth1’,‘’)
self.usrp2_sink.set_interp(self.usrp_interp_rate)
self.usrp2_sink.set_center_freq(self.center_frequency)
self.usrp2_sink.set_gain(self.tx_gain)

And this one for the usrp source for the resceiving part of the feedback
channel in the transmitter of the overall system.

if not self.usrp:
self.usrp_source = uhd.single_usrp_source(
device_addr=“addr=192.168.10.2”,
io_type=uhd.io_type_t.COMPLEX_FLOAT32,
num_channels=1,
)
self.usrp_source.set_samp_rate(self.input_samp_rate)
self.usrp_source.set_center_freq(self.center_frequency, 0)
self.usrp_source.set_gain(self.rx_gain, 0)
self.usrp_rate = self.input_samp_rate
else:
self.usrp_source = usrp2.source_32fc(‘eth1’,‘’)
self.usrp_source.set_decim(self.usrp_decim_rate)
self.usrp_source.set_center_freq(self.center_frequency)
self.usrp_source.set_gain(self.rx_gain)
self.usrp_rate = int(self.usrp_source.adc_rate() /
self.usrp_decim_rate) # sample rate from USRP

Do I have to do something in addition to make it work for bursty
transmissions.

Furthermore I get an ‘U’ in terminal of the transmitter after each
burst. Is this the same problem?

Thanks for your help.

Regards,

Tobias


WEB.DE DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! WEB.DE Produkte Übersicht: Apps, Browser, MailCheck & Co.