On Mon, May 2, 2011 at 10:06 AM, Marcus D. Leech
<address@hidden> wrote:
On 02/05/2011 9:54 AM, Tom Rondeau wrote:
Ok, that makes sense. It seems pretty easy, too, although I'm not sure it's possible.
Josh, can you have a parameter setting in a GRC block that is no a constructor argument? Instead, it's an accessor function that gets called to set a value after the block is instantiated?
Tom
I'll answer on Josh' behalf, since he's probably not awake yet, over there on the left coast :-)
Yes, a *lot* of the runtime-changeable parameters in GRC are actually implemented as calls to object methods, not just constructor functions.
Check out the XML sometime to get a feel for how this works. The XML files for GRC objects basically describe the properties of parameters, and
which methods to call to change those parameters. Which is how things like "frequency" on a UHD source block get changed at runtime.
Duh, yes of course that's how frequency an gain of the UHD blocks are done. I've made many GRC blocks, but always just the most straight-forward translation of the object constructor and some callbacks.
Thanks for point that out, Marcus. So yes, Stefan, it'll be easy to make a nicely parameterized GRC block with various settable values and reasonable defaults.
Tom