Re: [Discuss-gnuradio] Block with two or more outputs, with different sizes

2012-05-09 Thread André Selva
Josh,

The problem is that i don't know in advance the size of each stream. I'm
kind of routing the input stream to the output streams, according to some
information i read in each packet. So, I know a max value to the stream
number of items, but cannot know certainly the output actual size.

Att,

2012/5/9 Josh Blum 

>
>
> On 05/09/2012 12:06 PM, André Selva wrote:
> > Hi!
> >
> > I'm creating a signal processing block in C++, and I want my block to
> > separate the source information into two different outputs, according to
> a
> > pattern. The problem is that the outputs have different sizes, and, as a
> I
> > return noutput_items in the work method, the outputs are completed with
> > zeros until they have all the same size. Is it possible to have different
> > output sizes in the block?
> >
>
> ok yes, see io_signaturev and some of the convenience factory functions
> here:
>
> http://gnuradio.org/cgit/gnuradio.git/tree/gnuradio-core/src/lib/runtime/gr_io_signature.h
>
> -josh
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>



-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Block with two or more outputs, with different sizes

2012-05-09 Thread André Selva
Hi!

I'm creating a signal processing block in C++, and I want my block to
separate the source information into two different outputs, according to a
pattern. The problem is that the outputs have different sizes, and, as a I
return noutput_items in the work method, the outputs are completed with
zeros until they have all the same size. Is it possible to have different
output sizes in the block?

Thanks,

-- 
André F. B. Selva
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] New Block execution error

2012-03-01 Thread André Selva
The destructor was my problem!

Thank you!

2012/3/1 Tom Rondeau 

> On Thu, Mar 1, 2012 at 11:50 AM, André Selva wrote:
>
>> My files are attached. Everyone is correctly referenced in the Makefiles.
>
>
> A couple of things. First, in the make function, you want to return:
>
>  return gnuradio::get_initial_sptr (new gr_my_divisorcamadas_ff ());
>
> This is to make sure the pointers are cleaned up properly upon closing the
> program.
>
> More importantly, you don't have a destructor defined. You have it in the
> header file but no actual code for it. I'm surprised you're not getting a
> compiler error about this. Might be your problem.
>
> Tom
>
>
>
>> 2012/3/1 Tom Rondeau 
>>
>>> On Thu, Mar 1, 2012 at 11:20 AM, André Selva wrote:
>>>
>>>> I'm using autotools. And I checked many times, and all the Makefiles
>>>> are updated correctly with the new block's information.
>>>>
>>>> One strange point is that even if I delete all the references from the
>>>> block from all the Makefiles, the problem still persist.
>>>>
>>>> Att,
>>>
>>>
>>> Well, then I'm not too sure what else to tell you. There's obviously
>>> something wrong with how you've set up the block; that's really the only
>>> explanation. Are you absolutely sure you did everything correctly? What
>>> about the main .i file that  includes "#include " and
>>> "%include "yourswig.i" files?
>>>
>>> Tom
>>>
>>>
>>>
>>>> 2012/2/29 Tom Rondeau 
>>>>
>>>>> On Wed, Feb 29, 2012 at 5:26 PM, André Selva wrote:
>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> I develop a new block to my own library (called
>>>>>> gr_my_divisorcamadas_ff) . The compilation runs successfully, but when I
>>>>>> execute a flow graph with any block from the library, I got the following
>>>>>> message:
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "/home/rt-dsp/Desktop/Howtowrite/gr-my-basic/top_block.py",
>>>>>> line 14, in 
>>>>>> import gr_my
>>>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/__init__.py",
>>>>>> line 40, in 
>>>>>> from gr_my_swig import *
>>>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py",
>>>>>> line 24, in 
>>>>>> _gr_my_swig = swig_import_helper()
>>>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py",
>>>>>> line 20, in swig_import_helper
>>>>>> _mod = imp.load_module('_gr_my_swig', fp, pathname, description)
>>>>>> ImportError: /usr/local/lib/libgnuradio-gr_my-3.3.0.so.0: undefined
>>>>>> symbol: _ZTV23gr_my_divisorcamadas_ff
>>>>>>
>>>>>>
>>>>>>
>>>>>> Even if I delete the reference from the new block in all make files
>>>>>> and re-compile the library, the error still persist.
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>>
>>>>>> Best Regards,
>>>>>> --
>>>>>> André F. B. Selva -
>>>>>>
>>>>>
>>>>> We're going to need more information. Are you using cmake or autotools
>>>>> (Makefile.am) to do this? Are you sure you're editing the .cc, .h, and .i
>>>>> files, AND are you making sure that the relevant files in your build 
>>>>> system
>>>>> are updated with the correct information?
>>>>>
>>>>> The error just sounds like you haven't gotten all of the files updated
>>>>> correctly.
>>>>>
>>>>> Tom
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> André F. B. Selva -
>>>> SECOMP - Semana da Computação da Unicamp 2012
>>>> Coordenador Geral
>>>> CACo - Centro Acadêmico da Computação
>>>>
>>>>
>>>
>>
>>
>> --
>> André F. B. Selva -
>> SECOMP - Semana da Computação da Unicamp 2012
>> Coordenador Geral
>> CACo - Centro Acadêmico da Computação
>>
>>
>


-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] New Block execution error

2012-03-01 Thread André Selva
My files are attached. Everyone is correctly referenced in the Makefiles.



2012/3/1 Tom Rondeau 

> On Thu, Mar 1, 2012 at 11:20 AM, André Selva wrote:
>
>> I'm using autotools. And I checked many times, and all the Makefiles are
>> updated correctly with the new block's information.
>>
>> One strange point is that even if I delete all the references from the
>> block from all the Makefiles, the problem still persist.
>>
>> Att,
>
>
> Well, then I'm not too sure what else to tell you. There's obviously
> something wrong with how you've set up the block; that's really the only
> explanation. Are you absolutely sure you did everything correctly? What
> about the main .i file that  includes "#include " and
> "%include "yourswig.i" files?
>
> Tom
>
>
>
>> 2012/2/29 Tom Rondeau 
>>
>>> On Wed, Feb 29, 2012 at 5:26 PM, André Selva wrote:
>>>
>>>> Hi!
>>>>
>>>> I develop a new block to my own library (called
>>>> gr_my_divisorcamadas_ff) . The compilation runs successfully, but when I
>>>> execute a flow graph with any block from the library, I got the following
>>>> message:
>>>>
>>>> Traceback (most recent call last):
>>>>   File "/home/rt-dsp/Desktop/Howtowrite/gr-my-basic/top_block.py", line
>>>> 14, in 
>>>> import gr_my
>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/__init__.py", line
>>>> 40, in 
>>>> from gr_my_swig import *
>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py",
>>>> line 24, in 
>>>> _gr_my_swig = swig_import_helper()
>>>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py",
>>>> line 20, in swig_import_helper
>>>> _mod = imp.load_module('_gr_my_swig', fp, pathname, description)
>>>> ImportError: /usr/local/lib/libgnuradio-gr_my-3.3.0.so.0: undefined
>>>> symbol: _ZTV23gr_my_divisorcamadas_ff
>>>>
>>>>
>>>>
>>>> Even if I delete the reference from the new block in all make files and
>>>> re-compile the library, the error still persist.
>>>>
>>>> Any ideas?
>>>>
>>>>
>>>> Best Regards,
>>>> --
>>>> André F. B. Selva -
>>>>
>>>
>>> We're going to need more information. Are you using cmake or autotools
>>> (Makefile.am) to do this? Are you sure you're editing the .cc, .h, and .i
>>> files, AND are you making sure that the relevant files in your build system
>>> are updated with the correct information?
>>>
>>> The error just sounds like you haven't gotten all of the files updated
>>> correctly.
>>>
>>> Tom
>>>
>>>
>>
>>
>> --
>> André F. B. Selva -
>> SECOMP - Semana da Computação da Unicamp 2012
>> Coordenador Geral
>> CACo - Centro Acadêmico da Computação
>>
>>
>


-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
/* -*- c++ -*- */
/*
 * Copyright 2004 Free Software Foundation, Inc.
 * 
 * This file is part of GNU Radio
 * 
 * GNU Radio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 * 
 * GNU Radio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GNU Radio; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */

/*
 * config.h is generated by configure.  It contains the results
 * of probing for features, options etc.  It should be the first
 * file included in your .cc file.
 */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include 
#include 
#include 


/*
 * Create a new instance of gr_my_divisorcamadas_ff and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
gr_my_divisorcamadas_ff_sptr 
gr_make_my_divisorcamadas_ff ()
//gr_make_my_divisorcamadas_ff ()
{
  return gr_my_divisorcamadas_ff_sptr (new gr_my_divisorcamadas_ff ());
  //return gr_my_divisorcamadas_ff_sptr (new gr_my_divisorc

Re: [Discuss-gnuradio] New Block execution error

2012-03-01 Thread André Selva
I'm using autotools. And I checked many times, and all the Makefiles are
updated correctly with the new block's information.

One strange point is that even if I delete all the references from the
block from all the Makefiles, the problem still persist.

Att,



2012/2/29 Tom Rondeau 

> On Wed, Feb 29, 2012 at 5:26 PM, André Selva wrote:
>
>> Hi!
>>
>> I develop a new block to my own library (called gr_my_divisorcamadas_ff)
>> . The compilation runs successfully, but when I execute a flow graph with
>> any block from the library, I got the following message:
>>
>> Traceback (most recent call last):
>>   File "/home/rt-dsp/Desktop/Howtowrite/gr-my-basic/top_block.py", line
>> 14, in 
>> import gr_my
>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/__init__.py", line
>> 40, in 
>> from gr_my_swig import *
>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py", line
>> 24, in 
>> _gr_my_swig = swig_import_helper()
>>   File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py", line
>> 20, in swig_import_helper
>> _mod = imp.load_module('_gr_my_swig', fp, pathname, description)
>> ImportError: /usr/local/lib/libgnuradio-gr_my-3.3.0.so.0: undefined
>> symbol: _ZTV23gr_my_divisorcamadas_ff
>>
>>
>>
>> Even if I delete the reference from the new block in all make files and
>> re-compile the library, the error still persist.
>>
>> Any ideas?
>>
>>
>> Best Regards,
>> --
>> André F. B. Selva -
>>
>
> We're going to need more information. Are you using cmake or autotools
> (Makefile.am) to do this? Are you sure you're editing the .cc, .h, and .i
> files, AND are you making sure that the relevant files in your build system
> are updated with the correct information?
>
> The error just sounds like you haven't gotten all of the files updated
> correctly.
>
> Tom
>
>


-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] New Block execution error

2012-02-29 Thread André Selva
Hi!

I develop a new block to my own library (called gr_my_divisorcamadas_ff) .
The compilation runs successfully, but when I execute a flow graph with any
block from the library, I got the following message:

Traceback (most recent call last):
  File "/home/rt-dsp/Desktop/Howtowrite/gr-my-basic/top_block.py", line 14,
in 
import gr_my
  File "/usr/local/lib/python2.7/dist-packages/gr_my/__init__.py", line 40,
in 
from gr_my_swig import *
  File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py", line
24, in 
_gr_my_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py", line
20, in swig_import_helper
_mod = imp.load_module('_gr_my_swig', fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-gr_my-3.3.0.so.0: undefined symbol:
_ZTV23gr_my_divisorcamadas_ff



Even if I delete the reference from the new block in all make files and
re-compile the library, the error still persist.

Any ideas?


Best Regards,
-- 
André F. B. Selva -
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] How to synchronize two transmitters

2012-01-27 Thread André Selva
What I think that might be a solution is using only one computer with two
USRPs. In the flowgraph, you will have two sinks. If your network card are
both identical and the distance between the USRPs are not large enough to
be considered, I don't see why the signals would not be syncrhonized (or,
at least, very similar to each other).

Att,

2012/1/22 yend B. 

> I was wondering if there is a way to syncrhonize two transmitters running
> on two machines.
> Both transmitter use OFDM. I could use a shared reference clock, but the
> problem is that
> I don't know how exactly I can send packets SIMULTANEOUSLY from both
> transmitters.
> I want to measure co-channel interference and study multiuser detection
> alogorithms.
>
> Regards!
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>


-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Changing the value of a Python Variable into a block

2012-01-24 Thread André Selva
Hello!

I'm developing a TV enconder, and I need to extract information from my
input data, and this will be used to determine the parameters of other
blocks on the flow graph.
How can I change the value of a variable of the python (or grc) environment
from the block general_work() method?

Thanks!

-- 
André F. B. Selva -
SECOMP - Semana da Computação da Unicamp 2012
Coordenador Geral
CACo - Centro Acadêmico da Computação
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Saving block status

2012-01-14 Thread André Selva
I think that making the buffer larger wouldn't help much.

My problem is: I have an interleaver, where i pass my data through. This
interleaver is made of several shifters, of different sizes. The input goes
through the shifters in an especific order (given by keying), and the
output is formed by keying the shifters output in a different order. The
problem is that if the buffer finishes and i lost the data inside the
shifters, i'll lost data. So i need to conservate this structures among
each bufferized execution of the block.

Is that possible? What i think that may be helpful is some sort of global
structure where i can store this status.

Best Regards,

2012/1/13 Josh Blum 

>
>
> On 01/13/2012 08:11 AM, André Selva wrote:
> > Hi!
> >
> > I've been working on the development of a Digital TV transmitter on GNU
> > Radio.
> > The problem is that the information flow is bufferized before "entering"
> > the blocks, but the information i need to process is too large to be
> > bufferized.
> > So, I need the data contained on some internal structures of my blocks
> (for
> > example, shifters) to be preserved between the executions of each
> > bufferized part of the data flow. One of the alternatives is saving this
> > data in files and reloading then on the initialization, but i think this
> > may ruin my performance.
> > I've read on this<
> http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Saving-state
> >
> > tutorial, that exists the possibility to save the status between
> executions
> > using the methods start() ans stop() from the block, but i cannot find
> more
> > information about that. Is that the correct way to solve this problem? If
> > so, where can i find more information about those methods?
> >
>
> The idea behind "saving state" was to help users make their blocks
> robust against the flow graph starting/stopping. This is starting and
> stopping of processing as a whole, so it doesnt help your case which is
> "what to do" while processing. So, if you dont have enough CPU memory to
> buffer, than the only options two you mentioned.
>
> Or is it the case that you just need gnuradio buffers to be larger, and
> everything would therefore work out better for your processing
> implementation?
>
> -Josh
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>



-- 
André F. B. Selva
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Saving block status

2012-01-13 Thread André Selva
Hi!

I've been working on the development of a Digital TV transmitter on GNU
Radio.
The problem is that the information flow is bufferized before "entering"
the blocks, but the information i need to process is too large to be
bufferized.
So, I need the data contained on some internal structures of my blocks (for
example, shifters) to be preserved between the executions of each
bufferized part of the data flow. One of the alternatives is saving this
data in files and reloading then on the initialization, but i think this
may ruin my performance.
I've read on 
this
tutorial, that exists the possibility to save the status between executions
using the methods start() ans stop() from the block, but i cannot find more
information about that. Is that the correct way to solve this problem? If
so, where can i find more information about those methods?

Thank you!

-- 
André F. B. Selva
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Error while testing a new block

2011-11-18 Thread André Selva
Hello!

I was learning how to make a block, using the "how to make a block
tutorial", and when I develop a little block for tests, I got the error
message displayed below. The error occurred when i ran the python tests.

==
ERROR: test_001_quad_ff (__main__.qa_rtdsp)
--
Traceback (most recent call last):
  File "./qa_rtdsp.py", line 29, in setUp
self.fg = gr.flow_graph ()
AttributeError: 'module' object has no attribute 'flow_graph'

==

Also, it isn't clear for me exactly what files should I change to be able
to compile the new block. If I make modifications only in the files listed
on the tutorial, the make command indicate error in some other files. So,
basically, I'm opening every file from the example and checking if they
have any references to the block I develop. Is this the correct approach?
Do I have to change all those files?

-- 
André F. B. Selva
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio