Forum: GNU Radio SWIG Error: Syntax error in input

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C64f7f638aa2670aa9d5e4a0630e87aa?d=identicon&s=25 E. Ornelas (Guest)
on 2009-06-08 17:22
(Received via mailing list)
Hi!

I've been creating a block based on the howto create a block example.
But this time something strange happened and I can't seem to find the
cause.

I already had several input parameters in the altered version of the
block,
but after adding the variable "frequency" in the input I started getting
this compilation error:

/usr/bin/swig -c++ -fvirtual -python -modern
-I/usr/local/include/gnuradio/swig -I/usr/local/include/gnuradio
-module
howto -o howto.cc ../../src/lib/howto.i
../../src/lib/howto.i:58: Error: Syntax error in input(3).

The line it points me to didn't suffer any changes because its on a
diferent
block.( This is what's confusing me...)

If someone could spot the error, I'd be much appreciated.

Next is the relevant code:

>>>howto.i<<<
// ----------------------------------------------------------------
GR_SWIG_BLOCK_MAGIC(howto,co_cx_stat);

howto_co_cx_stat_sptr howto_make_co_cx_stat ( unsigned int vector_size,

unsigned int sampling,

unsigned int frequency,

unsigned int fftsize,

char *filename);

class howto_co_cx_stat : public gr_block
{
private:
  howto_co_cx_stat (unsigned int vector_size,
                              unsigned int sampling,
                              unsigned int frequency,
                              unsigned int fftsize,
                              char *filename);

public:
  int create_new_log(char file_name[255]);
};

// ----------------------------------------------------------------
GR_SWIG_BLOCK_MAGIC(howto,buffer_sink);

howto_buffer_sink_sptr howto_make_buffer_sink (unsigned int vector_size,
float center_f, unsigned int fft_size, float f_sample);

class howto_buffer_sink : public gr_sync_block
{
private:
  howto_buffer_sink (unsigned int vector_size, float center_f, unsigned
int
fft_size, float f_sample);

public:
  std::vector<float> out_freq () const;
  std::vector<float> out_mag () const;             <<<<<<<<<<<<<<<<<
LINE 58
  std::vector<float> out_fft () const;
  std::vector<float> out () cons;
  int SetFrequency(float freq);
};


>>>howto_co_cx_stat.cc<<<
/*
 * Create a new instance of howto_co_cx_stat and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
howto_co_cx_stat_sptr
howto_make_co_cx_stat (  unsigned int vector_size,
                                        unsigned int sampling,
                                        unsigned int frequency,
                                        unsigned int fftsize,
                                        char *filename)
{
  return howto_co_cx_stat_sptr (new howto_co_cx_stat
(vector_size,sampling,frequency,fftsize,filename));
}

/*
 * The private constructor
 */
howto_co_cx_stat::howto_co_cx_stat (unsigned int vector_size,
                                                         unsigned int
sampling,
                                                         unsigned int
frequency,
                                                         unsigned int
fftsize,
                                                         char *filename)
  : gr_block ("co_cx_stat",
              gr_make_io_signature (MIN_IN, MAX_IN, vector_size*sizeof
(gr_complex)),
              gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float))),
              d_vector_size(vector_size),
              d_sampling(sampling),
              d_frequency(frequency),
              d_fftsize(fftsize)
{
}




>>>howto_co_cx_stat.h<<<

howto_co_cx_stat_sptr howto_make_co_cx_stat (unsigned int vector_size,

unsigned int sampling,

unsigned int frequency,

unsigned int fftsize,

char *filename);


class howto_co_cx_stat : public gr_block
{
private:
  friend howto_co_cx_stat_sptr
         howto_make_co_cx_stat (unsigned int vector_size,

unsigned int sampling,

unsigned int frequency,

unsigned int fftsize,
                                                                       char
*filename);


  howto_co_cx_stat (unsigned int vector_size,
                                    unsigned int sampling,
                                    unsigned int frequency,
                                    unsigned int fftsize,
                                    char *filename);    // private
constructor

  unsigned int d_vector_size;
  unsigned int d_sampling;
  unsigned int d_fftsize;
  unsigned int d_frequency;
  char d_filename[255];

public:
  ~howto_co_cx_stat ();  // public destructor

  int general_work (int noutput_items,
        gr_vector_int &ninput_items,
        gr_vector_const_void_star &input_items,
        gr_vector_void_star &output_items);

  int create_new_log(char file_name[255]);
}
--
View this message in context:
http://www.nabble.com/SWIG-Error%3A-Syntax-error-i...
Sent from the GnuRadio mailing list archive at Nabble.com.
This topic is locked and can not be replied to.