Marcus,

Your comment:

“just give your block, which is a
normal C++ or Python class, a member that holds the state”

implies that I can simply define a simple class member of the custom block
C++ class to store the state.

However, I was initially thinking that would mean feedback as well. After
thinking through though it shouldn’t be because member variables are not
input/output streams.

I still have one question though. Do class member variables of custom GRC
block retain their state across two different calls of the function? I
guess I don’t really understand how GRC calls the custom block during
runtime. Does the custom block class’ object gets created once during
initialization and only the general work function gets called multiple
times for processing. That way all custom block’s class’ object retain all
their state across the calls? The only state we loose are the local
variables which get defined in the general work function itself.

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

Reply via email to