[Discuss-gnuradio] mytx.cpp

2014-05-13 Thread
 Hello all
  I write a c++ document mytx.cpp and i place it into the 
uhd/host/build/examples.And then what should i do to let it run?Should i type 
the make command in the shell or do other things?Thank you.
Best regards,
Xianda
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] convert old Gnu Radio applications

2014-05-07 Thread
Hello Sylvain
  Thank you very much.
  But another question i want to ask.Where can i find the 
document of function and class which are in the new api?These document can 
provide all the meaning of the function and class written by c++.And the 
document of api is so obscure that i can't find the frequently-used function 
for example the basic function for the transmit and receive.Now i want to write 
the basic transmit and receive modules by c++.And after i written it,which 
folder i place it?Thank you very much.
Best regards,
Xianda Wang
At 2014-05-07 02:39:22,Sylvain Munaut 246...@gmail.com wrote:
  Now i want to convert old Gnu Radio applications which were
 developed in the gnuradio 3.3.0 to the gnuradio 3.7.0.Can someone give me
 some advices on this?Any advices will be appreciated.

For modules : (or custom modules inside apps)

Recreate the modules from scratch using the new layout using gr_modtool.
Then cut  paste the actual processing methods from the old code and
adapt it, one module at a time.


For apps:

See the http://gnuradio.org/redmine/projects/gnuradio/wiki/Move_3-6_to_3-7
for namespace conversion.


Cheers,

   Sylvain

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] I have a trouble with new types in python!

2014-05-07 Thread
Hello
 Thank you so much.I have already read all the wiki somedays before.But 
i find it's difficult to write my own application.Have you some tutorials?And 
how do you be familiar with this area?Any advices will be appreciated.So many 
people want to learn it but no good ways to touch it.
Best regards,
Xianda Wang
At 2014-05-07 23:29:14,Marcus Müller mar...@hostalia.de wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Mostafa,


On 07.05.2014 16:34, Mostafa Alizadeh wrote:
 
 #define X 0x01864CFB

Attention! This is a preprocessing define. This means that /prior/ to
compilation, all occurences of X will be replaced by 0x01..., so your
compiler will never see X.

Is it possible that you want to define a default option for your make
function? That works! you can just have a make function with a
function stub like
...::make(int param1, float param2, unsigned char param3, int param4 =
0x0186);

Again, XML files are only useful for defining the graphical
representation of a GNU Radio block in GRC, it's not meant to define
constants. There are ways to do that, but most of the time it's not
what you want.
You can set default values for input fields in the block options, you
can also do dropdown menus. I don't know what you're really trying to
do, so you might be best of to look at different blocks in GRC and
find one that fits your problem best, and copy that block's XML.

Greetings,
Marcus


 and I should pass X, instead of  this 0x01864CFB which is 32 bits
 number to my make function of my block.
 
 What do you prefer for making a GRC xml file for this block?
 
 best,
 
 
 
 On Wed, May 7, 2014 at 5:54 PM, Marcus Müller
 marcus.muel...@ettus.comwrote:
 
 Hi Mostafa, this question is far more complex than you'd expect.
 I'll try to explain: - GRC is but a graphical interface to python
 code, which itself offers access GNU Radio blocks, partly written
 in python, mostly written in C++ and wrapped to python. It's
 always important to remember that GRC != GR - As you noticed,
 there is not always a direct matching between C++ and python
 types. This is an inherent problem caused by the fact that they
 are different internally. - When you create a block, and set up
 everything accordingly (which gr_modtool will do for you), then
 SWIG will generate wrapper code to make these classes (which are
 types!) available as blocks in python - also, you can generate
 XML files to represent blocks in GRC. Again, this will only be
 used to generate python code! If you want to define things so 
 that you can not only use them in python, generate XML. This is
 covered in the writing out of tree modules tutorial. - there is
 a difference between sample streams and variables: a variable in
 GRC is usually used to configure parameters of a block. I don't
 really see a reason not to use a standard integer value here; ok,
 you're wasting dozens of bits. But honestly, you do that once, it
 doesn't matter. - for streams, there is a byte type. Internally,
 neither python, nor GNU Radio care about the type; they just care
 about the item size, so defining things like bit, packed in
 byte does never make a difference.
 
 Hope that was a little helpful, Marcus Müller
 
 
 
 On Wed, May 7, 2014 at 3:01 PM, Mostafa Alizadeh
 m.alizade...@gmail.comwrote:
 
 Hello everybody, I have a new type in my gnuradio blocks which
 are defined in c++. However, the GRC don't know them. *The
 first question is how I could make GRC of such blocks? *
 
 I think if I could be able to define them in python I could add
 new types to the GRC of the block. Although I'm not so familiar
 with python, I want to define new type as it was previously
 defined in c++ as :
 
 *typedef unsigned char   bit; *
 
 *how could I define such variable in python!!!? *(may it helps
 me to make my GRC block)
 
 Thank,
 
 ___ 
 Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org 
 https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
 
 
 
 
 ___ Discuss-gnuradio
 mailing list Discuss-gnuradio@gnu.org 
 https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTalFKAAoJEBQ6EdjyzlHtRHwIAJnlorrctCzyARolZl4gc6mJ
7gTeGZc43oGj/1Ise3I7lqcY7lmBMkErGDLiKWsyWYOW0HTSHobDQr9xOY/UK5j+
HtaFAec2WeX9spTLNUBg87ZLTJlWBjoEvl6nT9xvbJSXDvoIBzF1cQ7EY1TkVU5V
zLWRxwMA1G6LeP9JGCuxlA1t92hP7gLR+UOoff1EmWx2HbwF4Jin8frn6irrzqpi
SCQ3X5VoMT2/vX10lFgbumEUhijTr5q9m3JvMIA2n7CBdq5SrLEpqjgZIHUPUxOs
nAN9h6UZ8mSfAvxjik8X1frDpp0rJxl2iZH+r69OILBAt+nQQJzb88LHyRh7UyQ=
=bJMO
-END PGP SIGNATURE-

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org

[Discuss-gnuradio] convert old Gnu Radio applications

2014-05-06 Thread
Hello all
 Now i want to convert old Gnu Radio applications which were developed 
in the gnuradio 3.3.0 to the gnuradio 3.7.0.Can someone give me some advices on 
this?Any advices will be appreciated.
 Thank you very much.
Best regards,
Xianda Wang___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio