Hi Anil, > Does a block always *have* to return something? What you mean is the work function. I know this is a bit nit-picky, but there has always been a lot of confusion caused by exactly that: The block is the whole instance of a class derived from gr.block, and the work() (or general_work()) is the method of that class which gets called repeatedly at runtime. You can have state as properties of the instance.
I'm not quite sure what the effect of returning None (which is what happens when you don't return something in python) is, because that NoneObject would then be handled through SWIF to C++, and I have no idea whether SWIG has a uniform way of converting NoneObjects to integers. In essence: yes, general_work() must always return a number, but in most cases it's totally O.K. to return 0 if your block wasn't able to produce output. Best regards, Marcus _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio