discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OutOfTree-zmq-configuration


From: isaac mario tupac davila
Subject: OutOfTree-zmq-configuration
Date: Fri, 25 Sep 2020 23:38:40 -0500

Hello everyone

I've been configuring an C++ OOT  block basing me in the wiki: https://wiki.gnuradio.org/index.php/OutOfTreeModulesConfig.

I could make it correct with the example of the Filter, but when I follow the same steps to implement a zeroMQ OOT block, an error appears:
error: invalid new-_expression_ of abstract class type ‘gr::zeromq::base_sink_impl’

Any help , I'll appreciate it. Thanks.

Pd:I add some code to clarify more the idea.

 /*
     * The private constructor of my OOT block
     */
    zeromq_f_impl::zeromq_f_impl()
      : gr::sync_block("zeromq_f",
              gr::io_signature::make(1, 1, sizeof(float)),
              gr::io_signature::make(0, 0, 0))
    {
     d_zeromq = new gr::zeromq::base_sink_impl(ZMQ_PUSH, sizeof(float), 1, "tcp://127.0.0.1:9098", 100, false, -1);
      }

/*
     Part of the base_impl .h  of the gr-zeromq
*/
namespace gr {
  namespace zeromq {

    class base_impl : public virtual gr::sync_block
    {
    public:
      base_impl(int type, size_t itemsize, size_t vlen, int timeout, bool pass_tags);
      virtual ~base_impl();
     
    protected:
      zmq::context_t  *d_context;
      zmq::socket_t   *d_socket;
      size_t          d_vsize;
      int             d_timeout ;
      bool            d_pass_tags ;
    };

    class base_sink_impl : public base_impl
    {
    public:
      base_sink_impl(int type, size_t itemsize, size_t vlen, char *address, int timeout, bool pass_tags, int hwm);

    protected:
      int send_message(const void *in_buf, const int in_nitems, const uint64_t in_offset);
    };

}
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]