discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] XML parameter checking


From: Mike Rex
Subject: Re: [Discuss-gnuradio] XML parameter checking
Date: Thu, 19 Oct 2017 17:17:55 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Thanks Marcus!  That should have been a natural next step for me, but so many Google search results for xml operators put "=" as a comparison!  Knowing it just needs to be a valid Python _expression_ is good to know for future needs.

Much appreciated for your assistance once again.

p.s. for anyone who finds this thread in the future, Marcus meant gr-analog/grc/analog_nbfm_rx.xml for an example of a mod in check tag.

On 2017-10-19 2:36 AM, Marcus Müller wrote:
Hi Mike,

what's in the <check> tag just needs to be a valid Python _expression_, afaik. So,

$psize % 8 == 0

would work (notice the double =; this is comparison, not assignment!).

For comparison, see the gr-audio/grc/analog_nbfm_rx.xml, for example.

Best regards,

Marcus


On 2017-10-19 04:02, Mike Rex wrote:
What would be the best way to make sure the user enters a parameter that is a multiple of 8 in the GRC XML file?  My first thought is this might do the trick, but seems there is no mod function for XML.  Any suggestions?

<check>$psize % 8 = 0</check> or <check>$psize mod 8 = 0</check>

Thanks in advance,
Mike


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]