Re: [Discuss-gnuradio] Newbie trying to follow OOT module tutorial

2017-03-05 Thread West, Nathan
Keep reading the tutorial and read the errors. The code that comes out of
gr_modtool isn't really valid c++ yet, but it's close.

"""
/home/pi/gr-howto/lib/square_ff_impl.cc:43:38: error: expected
primary-expression before ‘<’ token
   gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
sizeof(<+ITYPE+>)),
  ^
/home/pi/gr-howto/lib/square_ff_impl.cc:43:40: error: ‘MIN_IN’ was not
declared in this scope
   gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
sizeof(<+ITYPE+>)),
^
/home/pi/gr-howto/lib/square_ff_impl.cc:43:47: error: expected
primary-expression before ‘>’ token
   gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
sizeof(<+ITYPE+>)),
   ^
/home/pi/gr-howto/lib/square_ff_impl.cc:43:48: error: expected
primary-expression before ‘,’ token
   gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
sizeof(<+ITYPE+>)),
"""

That's telling you that the code isn't valid C++. It's filler from a
template with hints as to what goes there.I also suggest not working off of
a raspberry pi immediately. You'll be more comfortable and  iterate faster
on a laptop or desktop.

On Sun, Mar 5, 2017 at 11:38 AM, Honcho41  wrote:

> Hi, I'm a complete novice to GNURadio but I'm trying to follow the gnu
> tutorial for creating a OOT block.  When I get to the CMake part I keep
> getting these error codes.  I'm sure I'm just missing a dependancy or
> something simple but I'm also pretty new to RPi too.  I'm trying to create
> a
> project for a university degree and I'm getting a bit stumped.  Any help is
> appreciated.
>
> pi@raspberrypi:~/gr-howto/build $ cmake
> -DCMAKE_INSTALL_PREFIX=/usr/share/gnuradio ../
> -- Build type not specified: defaulting to release.
> -- Boost version: 1.55.0
> -- Found the following Boost libraries:
> --   filesystem
> --   system
> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.8")
> Checking for GNU Radio Module: RUNTIME
>  * INCLUDES=/usr/include
>  *
> LIBS=/usr/lib/arm-linux-gnueabihf/libgnuradio-runtime.
> so;/usr/lib/arm-linux-gnueabihf/libgnuradio-pmt.so
> GNURADIO_RUNTIME_FOUND = TRUE
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
> cmake_policy
>   command to set the policy and suppress this warning.
>
>   The LOCATION property should not be read from target "test-howto".  Use
> the
>   target name directly with add_custom_command, or use the generator
>   expression $, as appropriate.
>
> Call Stack (most recent call first):
>   lib/CMakeLists.txt:79 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
> cmake_policy
>   command to set the policy and suppress this warning.
>
>   The LOCATION property should not be read from target "gnuradio-howto".
> Use
>   the target name directly with add_custom_command, or use the generator
>   expression $, as appropriate.
>
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0045 is not set: Error on non-existent target in
>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
> details.
>   Use the cmake_policy command to set the policy and suppress this warning.
>
>   get_target_property() called with non-existent target "/usr/bin/python2".
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0045 is not set: Error on non-existent target in
>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
> details.
>   Use the cmake_policy command to set the policy and suppress this warning.
>
>   get_target_property() called with non-existent target
>   "/home/pi/gr-howto/python/qa_square_ff.py".
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/pi/gr-howto/build
> pi@raspberrypi:~/gr-howto/build $ make
> [  6%] Building CXX object
> lib/CMakeFiles/gnuradio-howto.dir/square_ff_impl.cc.o
> /home/pi/gr-howto/lib/square_ff_impl.cc: In

Re: [Discuss-gnuradio] Newbie trying to follow OOT module tutorial

2017-03-05 Thread Dave NotTelling
Check out
http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide.
You'll see that the <+MAX_IN+>, <+MAX_OUT+>, <+MIN_IN+>, <+MIN_OUT+>,
<+ITYPE+>, and <+OTYPE+> have all been replaced with actual values.  Unless
you have multiple inputs and/or outputs you'll replace all of the
<+MAX_IN+>, <+MAX_OUT+>, <+MIN_IN+>, <+MIN_OUT+> parts with the number 1.
  <+ITYPE+>, and <+OTYPE+> are dependent on what your input and output
types are for the block.  Suppose your block reads in complex values and
output floats.  In that case you would replace all instances of <+ITYPE+>
with gr_complex and all instances of <+OTYPE+> with float.  Also make sure
that your XML file for the block matches the number of inputs, and outputs
as well as the types for each.

On Sun, Mar 5, 2017 at 11:38 AM, Honcho41  wrote:

> Hi, I'm a complete novice to GNURadio but I'm trying to follow the gnu
> tutorial for creating a OOT block.  When I get to the CMake part I keep
> getting these error codes.  I'm sure I'm just missing a dependancy or
> something simple but I'm also pretty new to RPi too.  I'm trying to create
> a
> project for a university degree and I'm getting a bit stumped.  Any help is
> appreciated.
>
> pi@raspberrypi:~/gr-howto/build $ cmake
> -DCMAKE_INSTALL_PREFIX=/usr/share/gnuradio ../
> -- Build type not specified: defaulting to release.
> -- Boost version: 1.55.0
> -- Found the following Boost libraries:
> --   filesystem
> --   system
> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.8")
> Checking for GNU Radio Module: RUNTIME
>  * INCLUDES=/usr/include
>  *
> LIBS=/usr/lib/arm-linux-gnueabihf/libgnuradio-runtime.
> so;/usr/lib/arm-linux-gnueabihf/libgnuradio-pmt.so
> GNURADIO_RUNTIME_FOUND = TRUE
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
> cmake_policy
>   command to set the policy and suppress this warning.
>
>   The LOCATION property should not be read from target "test-howto".  Use
> the
>   target name directly with add_custom_command, or use the generator
>   expression $, as appropriate.
>
> Call Stack (most recent call first):
>   lib/CMakeLists.txt:79 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
> cmake_policy
>   command to set the policy and suppress this warning.
>
>   The LOCATION property should not be read from target "gnuradio-howto".
> Use
>   the target name directly with add_custom_command, or use the generator
>   expression $, as appropriate.
>
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0045 is not set: Error on non-existent target in
>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
> details.
>   Use the cmake_policy command to set the policy and suppress this warning.
>
>   get_target_property() called with non-existent target "/usr/bin/python2".
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at
> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
> (get_target_property):
>   Policy CMP0045 is not set: Error on non-existent target in
>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
> details.
>   Use the cmake_policy command to set the policy and suppress this warning.
>
>   get_target_property() called with non-existent target
>   "/home/pi/gr-howto/python/qa_square_ff.py".
> Call Stack (most recent call first):
>   python/CMakeLists.txt:44 (GR_ADD_TEST)
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/pi/gr-howto/build
> pi@raspberrypi:~/gr-howto/build $ make
> [  6%] Building CXX object
> lib/CMakeFiles/gnuradio-howto.dir/square_ff_impl.cc.o
> /home/pi/gr-howto/lib/square_ff_impl.cc: In constructor
> ‘gr::howto::square_ff_impl::square_ff_impl()’:
> /home/pi/gr-howto/lib/square_ff_impl.cc:43:38: error: expected
> primary-expression before ‘<’ token
>gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
> sizeof(<+ITYPE+>)),
>   ^
> /home/pi/gr-howto/lib/square_ff_impl.cc:43:40: error: ‘MIN_IN’ was not
> declared in this scope
>gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>,
> sizeof(<+IT

Re: [Discuss-gnuradio] Newbie trying to follow OOT module tutorial

2017-03-05 Thread Dave NotTelling
Oh, here's a better link:
http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_C++#424-Step-3-Fleshing-out-the-code

On Sun, Mar 5, 2017 at 12:09 PM, Dave NotTelling 
wrote:

> Check out http://gnuradio.org/redmine/projects/gnuradio/
> wiki/BlocksCodingGuide.  You'll see that the <+MAX_IN+>, <+MAX_OUT+>,
> <+MIN_IN+>, <+MIN_OUT+>, <+ITYPE+>, and <+OTYPE+> have all been replaced
> with actual values.  Unless you have multiple inputs and/or outputs you'll
> replace all of the <+MAX_IN+>, <+MAX_OUT+>, <+MIN_IN+>, <+MIN_OUT+> parts
> with the number 1.   <+ITYPE+>, and <+OTYPE+> are dependent on what your
> input and output types are for the block.  Suppose your block reads in
> complex values and output floats.  In that case you would replace all
> instances of <+ITYPE+> with gr_complex and all instances of <+OTYPE+> with
> float.  Also make sure that your XML file for the block matches the number
> of inputs, and outputs as well as the types for each.
>
> On Sun, Mar 5, 2017 at 11:38 AM, Honcho41  wrote:
>
>> Hi, I'm a complete novice to GNURadio but I'm trying to follow the gnu
>> tutorial for creating a OOT block.  When I get to the CMake part I keep
>> getting these error codes.  I'm sure I'm just missing a dependancy or
>> something simple but I'm also pretty new to RPi too.  I'm trying to
>> create a
>> project for a university degree and I'm getting a bit stumped.  Any help
>> is
>> appreciated.
>>
>> pi@raspberrypi:~/gr-howto/build $ cmake
>> -DCMAKE_INSTALL_PREFIX=/usr/share/gnuradio ../
>> -- Build type not specified: defaulting to release.
>> -- Boost version: 1.55.0
>> -- Found the following Boost libraries:
>> --   filesystem
>> --   system
>> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.8")
>> Checking for GNU Radio Module: RUNTIME
>>  * INCLUDES=/usr/include
>>  *
>> LIBS=/usr/lib/arm-linux-gnueabihf/libgnuradio-runtime.so;/
>> usr/lib/arm-linux-gnueabihf/libgnuradio-pmt.so
>> GNURADIO_RUNTIME_FOUND = TRUE
>> CMake Warning (dev) at
>> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
>> (get_target_property):
>>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>>   Run "cmake --help-policy CMP0026" for policy details.  Use the
>> cmake_policy
>>   command to set the policy and suppress this warning.
>>
>>   The LOCATION property should not be read from target "test-howto".  Use
>> the
>>   target name directly with add_custom_command, or use the generator
>>   expression $, as appropriate.
>>
>> Call Stack (most recent call first):
>>   lib/CMakeLists.txt:79 (GR_ADD_TEST)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at
>> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
>> (get_target_property):
>>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>>   Run "cmake --help-policy CMP0026" for policy details.  Use the
>> cmake_policy
>>   command to set the policy and suppress this warning.
>>
>>   The LOCATION property should not be read from target "gnuradio-howto".
>> Use
>>   the target name directly with add_custom_command, or use the generator
>>   expression $, as appropriate.
>>
>> Call Stack (most recent call first):
>>   python/CMakeLists.txt:44 (GR_ADD_TEST)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at
>> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
>> (get_target_property):
>>   Policy CMP0045 is not set: Error on non-existent target in
>>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
>> details.
>>   Use the cmake_policy command to set the policy and suppress this
>> warning.
>>
>>   get_target_property() called with non-existent target
>> "/usr/bin/python2".
>> Call Stack (most recent call first):
>>   python/CMakeLists.txt:44 (GR_ADD_TEST)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> CMake Warning (dev) at
>> /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrTest.cmake:45
>> (get_target_property):
>>   Policy CMP0045 is not set: Error on non-existent target in
>>   get_target_property.  Run "cmake --help-policy CMP0045" for policy
>> details.
>>   Use the cmake_policy command to set the policy and suppress this
>> warning.
>>
>>   get_target_property() called with non-existent target
>>   "/home/pi/gr-howto/python/qa_square_ff.py".
>> Call Stack (most recent call first):
>>   python/CMakeLists.txt:44 (GR_ADD_TEST)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to: /home/pi/gr-howto/build
>> pi@raspberrypi:~/gr-howto/build $ make
>> [  6%] Building CXX object
>> lib/CMakeFiles/gnuradio-howto.dir/square_ff_impl.cc.o
>> /home/pi/gr-howto/lib/square_ff_impl.cc: In constructor
>> ‘gr::howto::square_ff_impl::square_ff_impl()’:
>> /home/pi/gr-howto/lib/square_ff_impl.cc:43:38: error: expected
>> prim