discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Initialize a pointer - object


From: Jose Torres Diaz
Subject: [Discuss-gnuradio] Initialize a pointer - object
Date: Wed, 3 Oct 2012 15:03:36 +0930

Hi,

I'm modifying the block BLOB_TO_STREAM and I would like to pass a pointer to that function. The original file (blob_to_stream.cc) is like this:

class blob_to_stream_impl : public blob_to_stream{
public:
    blob_to_stream_impl(const size_t item_size):
        block(
            "blob_to_stream",
            gr_make_io_signature(0, 0, 0),
            gr_make_io_signature(1, 1, item_size),
            msg_signature(true, 0)
        ),
        _item_size(item_size)
    {
        _offset = 0;
    }

//Work function here
       
private:
    const size_t _item_size;
    gr_tag_t _msg;
    size_t _offset;
};

My new version, it will be something like this:

class blob_to_stream_impl : public blob_to_stream{
public:
    blob_to_stream_impl(const size_t *file):
        block(
            "blob_to_stream",
            gr_make_io_signature(0, 0, 0),
            gr_make_io_signature(1, 1, item_size),
            msg_signature(true, 0)
        ),
    
    {
        _offset = 0;
    }

But my question is, how can I initialize the pointer *file here?. I tried different methods, but I always get an error.

Any comment will be highly appreciate it,

Cheers,

Jose

reply via email to

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