I’m looking into how the modulation and demodulation blocks work.
Specifically the BPSK mod and demod blocks. Here is a list of the files
I
looked through and the location:
Are there any other files I should look at the get an understanding what
happens to the bits?
In the generic_mod_demod.py file, I come across functions like
digital.map_bb(mod_codes.invert_code(self._constellation.pre_diff_code()))
and I find the function map_bb in the digital_swig.py file. But the only
code there is
return _digital_swig.map_bb(*args, **kwargs)
I can’t find anything on _digital_swig no matter where I look.
_digital_swig was set to something at the beginning of the file, but I
couldn’t understand it. Can someone tell me where to look to find the
source code for the _digital_swig.maps_bb() and the
_digital_swig.pfb_clock_sync_ccf() functions?
Also another thing I’ve been wondering is why is there the DIGITAL_API
in
some lines. For example,
class DIGITAL_API digital_constellation : public
boost::enable_shared_from_this<digital_constellation>
What is the point of DIGITAL_API?
digital_constellation.cc - */gr-digital/lib
gr_diff_encoder_bb.cc - */gnuradio-core/src/lib/general for
and I find the function map_bb in the digital_swig.py file. But the only
code there is
return _digital_swig.map_bb(*args, **kwargs)
I can’t find anything on _digital_swig no matter where I look.
_digital_swig was set to something at the beginning of the file, but I
couldn’t understand it. Can someone tell me where to look to find the
source code for the _digital_swig.maps_bb() and the
_digital_swig.pfb_clock_sync_ccf() functions?
Swig stuff are python bindings to C or C++ code. So in your example
pfb_clock_sync_ccf() has been coded in C++, and
_digital_swig.pfb_clock_sync_ccf() is the generated python wrapper to
access the C++ pfb_clock_sync_ccf() from a python script.
The C++ code is in include/ and lib/, swig bindings are in swig/ and
pure python code is in python/
Also another thing I’ve been wondering is why is there the DIGITAL_API
in some lines. For example,
class DIGITAL_API digital_constellation : public
boost::enable_shared_from_this<digital_constellation>
What is the point of DIGITAL_API?
This is a standard way to import/export symbols from/to .so or .dll in a
platform/OS agnostic way.
Look at gr-digital/include/digital_api.h
Hope this help.
Chris
Thanks a lot,
Frederick
This body part will be downloaded on demand.
–
Christian G.,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/
Swig stuff are python bindings to C or C++ code. So in your example
pfb_clock_sync_ccf() has been coded in C++, and
_digital_swig.pfb_clock_sync_ccf() is the generated python wrapper to
access the C++ pfb_clock_sync_ccf() from a python script.
The C++ code is in include/ and lib/, swig bindings are in swig/ and pure
python code is in python/
I never found that page on the gnuradio site. Thanks for clearing up
what
_digital_swig was. I was able to do a search in my gnuradio folder for
pfb_clock_sync_ccf and map_bb and found the header and source files.
Cheers,
Frederick
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.