Hey Marcus,

Thanks a lot.


On Sun, Sep 8, 2013 at 1:28 PM, Marcus Müller <[email protected]> wrote:

> Hi Manu!
>
>  Suppose I don't know the block size before hand, and I want to pass a
>> parameter "x" to toe constructor such that block size can be obtained from
>> x using certain computation (that will be defined inside the constructor).
>> Can I do this? If so how?
>>
>  Yes, that's possible *inside the constructor only*. See the
> gr::basic_block::set_{in,out}**put_signature(gr::io_**signature::sptr)
> doxygen.


That worked!


>
>  When I add a new block "encoder", to the module "ldpc", modtool add files
>> "include/ldpc/encoder.h", "lib/encoder_impl.cc", and "lib/encoder_impl.h".
>> And the work function is to be declared and defined in encoder_impl.h and
>> encoder_impl.cc respectively. Consider that I have the function "encode"
>> defined and declared in ldpc.h and ldpc.cc respectively. ldpc.* does not
>> define any signal processing block, so I don't add them using modtool. But
>> they are required as they have the definition for the "encode" function and
>> inside the work function in encoder_impl.cc I just want to call the encode
>> function defined inside this ldpc class.
>>
>> Am I supposed to put ldpc.h in inlclude/ldpc/ and ldpc.cc in lib/? Or
>> should I put both of them inside lib/ ? Which section of CMakeLists.txt am
>> I supposed to modify?
>>
> Yes, that would be the correct structure.
> Just add ldpc.cc to lib/CMakeLists.txt:
>

It is not clear which option you meant. Both ldpc.h and ldpc.cc inside lib *
OR* should I put .h inside include/ldpc/ ?


>
> list_append (APPEND projectname_sources
> encoder_impl.cc
> ...
> ldpc.cc )
>
> Happy Hacking!
>
> PS:You should also the include_directuries(${library_**INCLUDE_DIR}) for
> each external library you use to that file if you haven't done so; same
> applies for target_link_libraries)
>
> ______________________________**_________________
> Discuss-gnuradio mailing list
> [email protected]
> https://lists.gnu.org/mailman/**listinfo/discuss-gnuradio<https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
>



-- 
Manu T S
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to