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 use [email protected].
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to