From faab807cf5e8b4a4c950d1fd8ae6672296fb1ad9 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 3 Apr 2012 18:21:52 -0400 Subject: Rework example directories. Gets rid of gnuradio-examples, moves these to more appropriate components. gnuradio-core and grc now have their own examples directories for files directly related to them. --- gnuradio-examples/grc/xmlrpc/readme.txt | 18 - gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc | 312 ----------------- .../grc/xmlrpc/xmlrpc_client_script.py | 23 -- gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc | 384 --------------------- 4 files changed, 737 deletions(-) delete mode 100644 gnuradio-examples/grc/xmlrpc/readme.txt delete mode 100644 gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc delete mode 100644 gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py delete mode 100644 gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc (limited to 'gnuradio-examples/grc/xmlrpc') diff --git a/gnuradio-examples/grc/xmlrpc/readme.txt b/gnuradio-examples/grc/xmlrpc/readme.txt deleted file mode 100644 index c1f87c1cb..000000000 --- a/gnuradio-examples/grc/xmlrpc/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ -################################################## -# XMLRPC example -################################################## - -XMLRPC allows software to make remote function calls over http. -In the case of GRC, one can use XMLRPC to modify variables in a running flow graph. -See http://www.xmlrpc.com/ - ---- Server Example --- -Place an "XMLRPC Server" block inside of any flow graph. -The server will provide set functions for every variable in the flow graph. -If a variable is called "freq", the server will provide a function set_freq(new_freq). -Run the server example and experiment with the example client script. - --- Client Example -- -The "XMLRPC Client" block will give a variable control over one remove function. -In the example client, there is one client block and gui control per variable. -This technique can be used to remotely control a flow graph, perhaps running on a non-gui machine. diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc b/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc deleted file mode 100644 index 3bb4e7ed3..000000000 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc +++ /dev/null @@ -1,312 +0,0 @@ - - - Thu Jul 24 14:27:44 2008 - - options - - id - client_block - - - _enabled - True - - - title - XMLRPC Client - - - author - Example - - - description - example flow graph - - - window_size - 1280, 1024 - - - generate_options - wx_gui - - - category - Custom - - - _coordinate - (10, 10) - - - _rotation - 0 - - - - xmlrpc_client - - id - xmlrpc_client0 - - - _enabled - True - - - addr - localhost - - - port - 1234 - - - callback - set_ampl - - - variable - ampl - - - _coordinate - (409, 35) - - - _rotation - 0 - - - - xmlrpc_client - - id - xmlrpc_client - - - _enabled - True - - - addr - localhost - - - port - 1234 - - - callback - set_freq - - - variable - freq - - - _coordinate - (222, 34) - - - _rotation - 0 - - - - variable_slider - - id - freq - - - _enabled - True - - - label - Frequency (Hz) - - - value - 1000 - - - min - 0 - - - max - 5000 - - - num_steps - 100 - - - slider_type - horizontal - - - grid_pos - 0, 0, 1, 2 - - - _coordinate - (207, 162) - - - _rotation - 0 - - - - variable_slider - - id - ampl - - - _enabled - True - - - label - Amplitude - - - value - 1 - - - min - 0 - - - max - 2 - - - num_steps - 100 - - - slider_type - horizontal - - - grid_pos - 1, 0, 1, 2 - - - _coordinate - (397, 167) - - - _rotation - 0 - - - - variable_chooser - - id - offset - - - _enabled - True - - - label - Offset - - - value_index - 1 - - - choices - [-1, 0, 1] - - - labels - ["neg", "zero", "pos"] - - - chooser_type - radio_buttons_horizontal - - - grid_pos - 2, 0, 1, 2 - - - _coordinate - (596, 177) - - - _rotation - 0 - - - - xmlrpc_client - - id - xmlrpc_client1 - - - _enabled - True - - - addr - localhost - - - port - 1234 - - - callback - set_offset - - - variable - offset*ampl - - - _coordinate - (608, 39) - - - _rotation - 0 - - - - variable - - id - samp_rate - - - _enabled - True - - - value - 32000 - - - _coordinate - (13, 172) - - - _rotation - 0 - - - \ No newline at end of file diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py b/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py deleted file mode 100644 index 956fa07fb..000000000 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -import time -import random -import xmlrpclib - -#create server object -s = xmlrpclib.Server("http://localhost:1234") - -#randomly change parameters of the sinusoid -for i in range(10): - #generate random values - new_freq = random.uniform(0, 5000) - new_ampl = random.uniform(0, 2) - new_offset = random.uniform(-1, 1) - #set new values - time.sleep(1) - s.set_freq(new_freq) - time.sleep(1) - s.set_ampl(new_ampl) - time.sleep(1) - s.set_offset(new_offset) - diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc b/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc deleted file mode 100644 index dc539ef1b..000000000 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc +++ /dev/null @@ -1,384 +0,0 @@ - - - Thu Jul 24 14:27:42 2008 - - options - - id - server_block - - - _enabled - True - - - title - XMLRPC Server - - - author - Example - - - description - example flow graph - - - window_size - 1280, 1024 - - - generate_options - wx_gui - - - category - Custom - - - _coordinate - (10, 10) - - - _rotation - 0 - - - - gr_sig_source_x - - id - gr_sig_source_x - - - _enabled - True - - - type - float - - - samp_rate - samp_rate - - - waveform - gr.GR_COS_WAVE - - - freq - freq - - - amp - ampl - - - offset - offset - - - _coordinate - (162, 200) - - - _rotation - 0 - - - - variable - - id - offset - - - _enabled - True - - - value - 0 - - - _coordinate - (12, 390) - - - _rotation - 0 - - - - xmlrpc_server - - id - xmlrpc_server - - - _enabled - True - - - addr - localhost - - - port - 1234 - - - _coordinate - (395, 240) - - - _rotation - 0 - - - - gr_throttle - - id - gr_throttle - - - _enabled - True - - - type - float - - - samples_per_second - samp_rate - - - vlen - 1 - - - _coordinate - (386, 93) - - - _rotation - 0 - - - - wxgui_scopesink2 - - id - wxgui_scopesink2 - - - _enabled - True - - - type - float - - - title - Scope Plot - - - samp_rate - samp_rate - - - frame_decim - 15 - - - v_scale - 0 - - - t_scale - .001 - - - marker - set_format_line - - - num_inputs - 1 - - - grid_pos - 0, 0, 2, 4 - - - _coordinate - (623, 28) - - - _rotation - 0 - - - - wxgui_fftsink2 - - id - wxgui_fftsink2 - - - _enabled - True - - - type - float - - - title - FFT Plot - - - samp_rate - samp_rate - - - baseband_freq - 0 - - - y_per_div - 10 - - - y_divs - 8 - - - ref_level - 50 - - - fft_size - 512 - - - fft_rate - 15 - - - avg_alpha - 0 - - - average - False - - - peak_hold - False - - - grid_pos - 2, 0, 2, 4 - - - _coordinate - (630, 233) - - - _rotation - 0 - - - - variable - - id - samp_rate - - - _enabled - True - - - value - 32000 - - - _coordinate - (11, 160) - - - _rotation - 0 - - - - variable - - id - freq - - - _enabled - True - - - value - 1000 - - - _coordinate - (11, 237) - - - _rotation - 0 - - - - variable - - id - ampl - - - _enabled - True - - - value - 1 - - - _coordinate - (13, 315) - - - _rotation - 0 - - - - gr_sig_source_x - gr_throttle - 0 - 0 - - - gr_throttle - wxgui_scopesink2 - 0 - 0 - - - gr_throttle - wxgui_fftsink2 - 0 - 0 - - \ No newline at end of file -- cgit