|
From: | Ron Hall |
Subject: | [Discuss-gnuradio] Unrecognized Enum |
Date: | Thu, 17 Dec 2009 14:30:56 +0000 |
Trying the following: #!/usr/bin/env python from gnuradio import gr from gnuradio import audio class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self) sample_rate = 32000 ampl = 0.1 src = ""> dst = gr.null_sink(1000) b2f = gr.chunks_to_symbols_bf self.connect(src,b2f,dst) if __name__ == '__main__': try: my_top_block().run() except KeyboardInterrupt: pass Receiving the following error: Traceback (most recent call last): File "test_gnuradio.py", line 21, in <module> my_top_block().run() File "test_gnuradio.py", line 13, in __init__ src = "">NameError: global name 'GR_GAUSSIAN' is not defined Not finding the gr_noise_type defined in python: help> gnuradio.gr.noise_type no Python documentation found for 'gnuradio.gr.noise_type' help> gnuradio.gr.noise_source_f help> gnuradio.gr.noise_type no Python documentation found for 'gnuradio.gr.noise_type' But the gr_noise_type.h file is installed: address@hidden:~/Desktop# locate gr_noise_type.h /gnuradio/gnuradio-3.2.2/gnuradio-core/src/lib/gengen/gr_noise_type.h /usr/local/include/gnuradio/gr_noise_type.h address@hidden:~/Desktop# ...the file does contain the enum as listed in the C++ API. #ifndef INCLUDED_GR_NOISE_TYPE_H #define INCLUDED_GR_NOISE_TYPE_H typedef enum { GR_UNIFORM = 200, GR_GAUSSIAN, GR_LAPLACIAN, GR_IMPULSE } gr_noise_type_t; #endif /* INCLUDED_GR_NOISE_TYPE_H */ address@hidden:~/Desktop# Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now. |
[Prev in Thread] | Current Thread | [Next in Thread] |