Hi all -
I'm working on Tom's packet_handling branch (github.com/trondeau/gnuradio.git)
and building a custom packet formatter. Everything works in C++ land, including
QA code. However, SWIG is complaining about undeclared things. I duplicated the
CMake and SWIG structures of gnuradio/gr-digital/swig/ for building derived
classes such as gr::digital::packet_formatter_counter. Any ideas why this would
not work? Thanks!
---- first few lines of make errors ----
/home/me/code/gr-myoot/build/swig/myoot_swigPYTHON_wrap.cxx: In function
'PyObject* _wrap_packet_formatter_custom_make(PyObject*, PyObject*, PyObject*)':
/home/me/code/gr-myoot/build/swig/myoot_swigPYTHON_wrap.cxx:5030:3: error:
'sptr' was not declared in this scope
sptr result;
^
/home/me/code/gr-myoot/build/swig/myoot_swigPYTHON_wrap.cxx:5030:8: error:
expected ';' before 'result'
sptr result;
^
/home/me/code/gr-myoot/build/swig/myoot_swigPYTHON_wrap.cxx:5062:7: error:
'result' was not declared in this scope
result = gr::myoot::packet_formatter_custom::make((std::string const
&)*arg1,(std::string const &)*arg2,arg3);
^
---- gr-myoot/swig/myoot_swig.i ----
/* -*- c++ -*- */
#define MYOOT_API
%include "gnuradio.i" // the common stuff
//load generated python docstrings
%include "myoot_swig_doc.i"
%{
#include "myoot/packet_formatter_custom.h"
%}
%include "myoot/packet_formatter_custom.h"
GR_SWIG_BLOCK_MAGIC2(myoot, packet_formatter_custom);
// Properly package up non-block objects
%include "packet_formatter_custom.i"
---- gr-myoot/swig/packet_formatter_custom.i ----
%template(packet_formatter_custom_sptr)
boost::shared_ptr<gr::myoot::packet_formatter_custom>;
%pythoncode %{
packet_formatter_custom_sptr.__repr__ = lambda self: "<packet_formatter_custom>"
packet_formatter_custom = packet_formatter_custom .make;
%}
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio