diff options
Diffstat (limited to 'gnuradio-examples/grc/xmlrpc')
-rw-r--r-- | gnuradio-examples/grc/xmlrpc/readme.txt | 18 | ||||
-rw-r--r-- | gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc | 312 | ||||
-rw-r--r-- | gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py | 23 | ||||
-rw-r--r-- | gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc | 384 |
4 files changed, 0 insertions, 737 deletions
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 @@ -<?xml version='1.0' encoding='ASCII'?> -<flow_graph> - <timestamp>Thu Jul 24 14:27:44 2008</timestamp> - <block> - <key>options</key> - <param> - <key>id</key> - <value>client_block</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>title</key> - <value>XMLRPC Client</value> - </param> - <param> - <key>author</key> - <value>Example</value> - </param> - <param> - <key>description</key> - <value>example flow graph</value> - </param> - <param> - <key>window_size</key> - <value>1280, 1024</value> - </param> - <param> - <key>generate_options</key> - <value>wx_gui</value> - </param> - <param> - <key>category</key> - <value>Custom</value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>xmlrpc_client</key> - <param> - <key>id</key> - <value>xmlrpc_client0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>addr</key> - <value>localhost</value> - </param> - <param> - <key>port</key> - <value>1234</value> - </param> - <param> - <key>callback</key> - <value>set_ampl</value> - </param> - <param> - <key>variable</key> - <value>ampl</value> - </param> - <param> - <key>_coordinate</key> - <value>(409, 35)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>xmlrpc_client</key> - <param> - <key>id</key> - <value>xmlrpc_client</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>addr</key> - <value>localhost</value> - </param> - <param> - <key>port</key> - <value>1234</value> - </param> - <param> - <key>callback</key> - <value>set_freq</value> - </param> - <param> - <key>variable</key> - <value>freq</value> - </param> - <param> - <key>_coordinate</key> - <value>(222, 34)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable_slider</key> - <param> - <key>id</key> - <value>freq</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>label</key> - <value>Frequency (Hz)</value> - </param> - <param> - <key>value</key> - <value>1000</value> - </param> - <param> - <key>min</key> - <value>0</value> - </param> - <param> - <key>max</key> - <value>5000</value> - </param> - <param> - <key>num_steps</key> - <value>100</value> - </param> - <param> - <key>slider_type</key> - <value>horizontal</value> - </param> - <param> - <key>grid_pos</key> - <value>0, 0, 1, 2</value> - </param> - <param> - <key>_coordinate</key> - <value>(207, 162)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable_slider</key> - <param> - <key>id</key> - <value>ampl</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>label</key> - <value>Amplitude</value> - </param> - <param> - <key>value</key> - <value>1</value> - </param> - <param> - <key>min</key> - <value>0</value> - </param> - <param> - <key>max</key> - <value>2</value> - </param> - <param> - <key>num_steps</key> - <value>100</value> - </param> - <param> - <key>slider_type</key> - <value>horizontal</value> - </param> - <param> - <key>grid_pos</key> - <value>1, 0, 1, 2</value> - </param> - <param> - <key>_coordinate</key> - <value>(397, 167)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable_chooser</key> - <param> - <key>id</key> - <value>offset</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>label</key> - <value>Offset</value> - </param> - <param> - <key>value_index</key> - <value>1</value> - </param> - <param> - <key>choices</key> - <value>[-1, 0, 1]</value> - </param> - <param> - <key>labels</key> - <value>["neg", "zero", "pos"]</value> - </param> - <param> - <key>chooser_type</key> - <value>radio_buttons_horizontal</value> - </param> - <param> - <key>grid_pos</key> - <value>2, 0, 1, 2</value> - </param> - <param> - <key>_coordinate</key> - <value>(596, 177)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>xmlrpc_client</key> - <param> - <key>id</key> - <value>xmlrpc_client1</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>addr</key> - <value>localhost</value> - </param> - <param> - <key>port</key> - <value>1234</value> - </param> - <param> - <key>callback</key> - <value>set_offset</value> - </param> - <param> - <key>variable</key> - <value>offset*ampl</value> - </param> - <param> - <key>_coordinate</key> - <value>(608, 39)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>samp_rate</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>32000</value> - </param> - <param> - <key>_coordinate</key> - <value>(13, 172)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> -</flow_graph>
\ 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 @@ -<?xml version='1.0' encoding='ASCII'?> -<flow_graph> - <timestamp>Thu Jul 24 14:27:42 2008</timestamp> - <block> - <key>options</key> - <param> - <key>id</key> - <value>server_block</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>title</key> - <value>XMLRPC Server</value> - </param> - <param> - <key>author</key> - <value>Example</value> - </param> - <param> - <key>description</key> - <value>example flow graph</value> - </param> - <param> - <key>window_size</key> - <value>1280, 1024</value> - </param> - <param> - <key>generate_options</key> - <value>wx_gui</value> - </param> - <param> - <key>category</key> - <value>Custom</value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_sig_source_x</key> - <param> - <key>id</key> - <value>gr_sig_source_x</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>waveform</key> - <value>gr.GR_COS_WAVE</value> - </param> - <param> - <key>freq</key> - <value>freq</value> - </param> - <param> - <key>amp</key> - <value>ampl</value> - </param> - <param> - <key>offset</key> - <value>offset</value> - </param> - <param> - <key>_coordinate</key> - <value>(162, 200)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>offset</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(12, 390)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>xmlrpc_server</key> - <param> - <key>id</key> - <value>xmlrpc_server</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>addr</key> - <value>localhost</value> - </param> - <param> - <key>port</key> - <value>1234</value> - </param> - <param> - <key>_coordinate</key> - <value>(395, 240)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_throttle</key> - <param> - <key>id</key> - <value>gr_throttle</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samples_per_second</key> - <value>samp_rate</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(386, 93)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>wxgui_scopesink2</key> - <param> - <key>id</key> - <value>wxgui_scopesink2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>title</key> - <value>Scope Plot</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>frame_decim</key> - <value>15</value> - </param> - <param> - <key>v_scale</key> - <value>0</value> - </param> - <param> - <key>t_scale</key> - <value>.001</value> - </param> - <param> - <key>marker</key> - <value>set_format_line</value> - </param> - <param> - <key>num_inputs</key> - <value>1</value> - </param> - <param> - <key>grid_pos</key> - <value>0, 0, 2, 4</value> - </param> - <param> - <key>_coordinate</key> - <value>(623, 28)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>wxgui_fftsink2</key> - <param> - <key>id</key> - <value>wxgui_fftsink2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>title</key> - <value>FFT Plot</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>baseband_freq</key> - <value>0</value> - </param> - <param> - <key>y_per_div</key> - <value>10</value> - </param> - <param> - <key>y_divs</key> - <value>8</value> - </param> - <param> - <key>ref_level</key> - <value>50</value> - </param> - <param> - <key>fft_size</key> - <value>512</value> - </param> - <param> - <key>fft_rate</key> - <value>15</value> - </param> - <param> - <key>avg_alpha</key> - <value>0</value> - </param> - <param> - <key>average</key> - <value>False</value> - </param> - <param> - <key>peak_hold</key> - <value>False</value> - </param> - <param> - <key>grid_pos</key> - <value>2, 0, 2, 4</value> - </param> - <param> - <key>_coordinate</key> - <value>(630, 233)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>samp_rate</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>32000</value> - </param> - <param> - <key>_coordinate</key> - <value>(11, 160)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>freq</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>1000</value> - </param> - <param> - <key>_coordinate</key> - <value>(11, 237)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>ampl</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(13, 315)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <connection> - <source_block_id>gr_sig_source_x</source_block_id> - <sink_block_id>gr_throttle</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gr_throttle</source_block_id> - <sink_block_id>wxgui_scopesink2</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gr_throttle</source_block_id> - <sink_block_id>wxgui_fftsink2</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> -</flow_graph>
\ No newline at end of file |