Hi Marcus,

Thanks for the quick response.
I'm a bit confused by your answer. When I generate a grc flow graph, It
automatically creates a python script with a set_mag() method. So yes, I
can play around with the set_mag() method, but I think it's quite absurd
that whoever created the "Struct Variable" block intended the user to
meddle around with the methods it creates so it would work properly.

Steve

On Thu, Jun 7, 2018 at 3:04 PM, Müller, Marcus (CEL) <muel...@kit.edu>
wrote:

> Sorry, I replied with an empty mail just now, confusion of keys. I
> added more coffee to solve the issue with the author.
>
> Steve,
>
> assuming your set_mag() is in C++: if you have control over the
> set_mag() method, write it so that it accepts vectors, for example.
> Then, you can just use Python lists or tuples.
>
> Does that help?
>
> Best regards,
> Marcus
>
> On Thu, 2018-06-07 at 08:45 +0300, shachar J. brown wrote:
> > Hi Everyone,
> >
> > I'm sure someone has encountered one of the following questions. Please
> help me figure this out:
> > At certain points in my flow graph I have different scenarios, each
> demanding a set of different parameters. I now ended up having large tables
> (1-2 K) of possible variable I would like to insert into the grc. Inserting
> such a huge table as a 2D array into a variable sounds like a pain in the
> neck. any more useful ways to store memory in the grc?
> > As a result of the above, I tried playing a bit with the "Struct
> Variable". sadly, I couldn't figure out how to use the "set_variable()"
> method correctly. say it's name is mag, and it has two fields: a,b. I tried
> set_mag(1,2), or set_mag.a(1), or set_mag(struct({'a': 1, 'b': 2})). None
> worked...
> > Thanks a lot!
> > Steve
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to