Hi
Please forgive me if the questions are silly/basic. I’ve learnt a lot
from
replies on this forum and I’m making steps in the right direction, if
only
baby ones.
I am trying to implement a state machine based synchronization
algorithm.
The 2 states being “search for synch sequence” and “pass data through”.
As far as I can see, the ideal way to do this is to have the work
function
check what state it is in before proceeding. If it is in search state,
the
work function will search for the synch sequence and once found, switch
to
“pass data” and get out.
Next time work is called (use forecast to make sure that the number of
input items available matches the amount I have data I have after the
synch
sequence), it will pass data through. Switch state back to “search” and
so
on.
My questions are these:
-
Before each work call, does GNURadio automatically know the state
that I
left it in in the previous call? (Am I allowed to make work return
anything
else apart from len(output_items)? -
Is it better/possible to implement a separate block for the state
machine that can somehow make the system aware of what state it is in?
Thank you
Anil