Saturday, March 3, 2018

Re: [Discuss-gnuradio] control port problem with incorrect throttle rate

I don't see any obvious reason this would happen, but maybe the
flowgraph glitches each time you connect and that does something to the
throttle's algorithm.

Try changing your program so it connects once, then iterates over the
knobs in a loop with a 1-sec sleep. That will tell you whether which
part of the program is causing this behavior.

On 03/03/2018 02:22 PM, Christiansen, Mark W. @ CSG - CSW wrote:
> I would like some help sorting out a problem I have with control port. I
> have a python script that runs every second to gather the current status
> of control port variables. It looks like that causes the flow-graph to
> speed up somewhat. I set up a simple flow-graph to test it.
>
> signal_source -> throttle -> probe_rate
>
> I have the throttle set to 32k. If I don't probe with my python script,
> the probe rate settles in close to 32k on control port monitor window.
> If I do have my python script running every second, then it averages
> about 34k but bouncing around from 33 to 35k on control port monitor
> window. I included my python script below.
>
> Thanks.
>
> Mark.
>
> "Simplicity is prerequisite for reliability."
>
> ~ Edsger W. Dijkstra
>
> -----------------------------------------
>
> #!/usr/bin/python
>
> # -*- coding: utf-8 -*-
>
> import sys, os, time, struct
>
> class MyApp(object):
>
>     def __init__(self, args):
>
>         from gnuradio.ctrlport.GNURadioControlPortClient import
> GNURadioControlPortClient
>
>         program = sys.argv[0]
>
>         hostIP = sys.argv[1]
>
>         hostPort = sys.argv[2]
>
>         fileName = sys.argv[3]
>
>         GNURadioControlPortClient([program, hostIP, hostPort],
> 'thrift', self.store_radioclient)
>
>         knobs_dict = self.radioclient.getKnobs([])
>
>         f = open(fileName, 'w')
>
>         for prop in knobs_dict:
>
>             try:
>
>
> self.radioclient.setKnobs(self.radioclient.getKnobs([prop]))
>
>                 settable = True;
>
>             except:
>
>                 settable = False;
>
>             print >> f, prop, '#', settable , '#',
> str(knobs_dict[prop].value)
>
>             # print prop, ' has value ', str(knobs_dict[prop].value)
>
>         f.close()
>
>     def store_radioclient(self, client):
>
>         self.radioclient = client;
>
>         # print '"',self.radioclient,'"'
>
> if __name__ == '__main__':
>
>     MyApp(sys.argv)
>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole
> use of the intended recipient and may contain material that is
> proprietary, confidential, privileged or otherwise legally protected or
> restricted under applicable government laws. Any review, disclosure,
> distributing or other use without expressed permission of the sender is
> strictly prohibited. If you are not the intended recipient, please
> contact the sender and delete all copies without reading, printing, or
> saving.
> Beginning April 1, 2018, L3 Technologies, Inc. will discontinue the use
> of all @L-3Com.com email addresses. To ensure delivery of your messages
> to this recipient, please update your records to
> usemark.w.christiansen@L3T.com.
>
>
> _______________________________________________
> 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

No comments:

Post a Comment