diff options
author | jcorgan | 2008-08-23 02:26:15 +0000 |
---|---|---|
committer | jcorgan | 2008-08-23 02:26:15 +0000 |
commit | d52c462e5fd3eae7d00505a64a013e811d43234c (patch) | |
tree | 6b2a9e77c095ecc273e8b2b33a4bab37cfdf2fcd /grc/data/grc_gnuradio/blocks/xmlrpc_server.xml | |
parent | 5c02ea03e1226ed706abeede426f0e1727f1ea25 (diff) | |
download | gnuradio-d52c462e5fd3eae7d00505a64a013e811d43234c.tar.gz gnuradio-d52c462e5fd3eae7d00505a64a013e811d43234c.tar.bz2 gnuradio-d52c462e5fd3eae7d00505a64a013e811d43234c.zip |
Merged changeset r9285:9377 from jblum/grc into trunk, with distcheck fixes
and local modifications.
Integrates previously separate GNU Radio Companion into top-level component
'grc'. (Josh Blum)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9378 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data/grc_gnuradio/blocks/xmlrpc_server.xml')
-rw-r--r-- | grc/data/grc_gnuradio/blocks/xmlrpc_server.xml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/grc/data/grc_gnuradio/blocks/xmlrpc_server.xml b/grc/data/grc_gnuradio/blocks/xmlrpc_server.xml new file mode 100644 index 000000000..40e547efc --- /dev/null +++ b/grc/data/grc_gnuradio/blocks/xmlrpc_server.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple XMLRPC Server +################################################### + --> +<block> + <name>XMLRPC Server</name> + <key>xmlrpc_server</key> + <import>import SimpleXMLRPCServer</import> + <import>import threading</import> + <make>SimpleXMLRPCServer.SimpleXMLRPCServer(($addr, $port), allow_none=True) +self.$(id).register_instance(self) +threading.Thread(target=self.$(id).serve_forever).start()</make> + <param> + <name>Address</name> + <key>addr</key> + <value>localhost</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>8080</value> + <type>int</type> + </param> + <doc> +This block will start an XMLRPC server. \ +The server provides access to the run, start, stop, wait functions of the flow graph. \ +The server also provides access to the variable callbacks in the flow graph. \ +Ex: If the variable is called freq, the function provided by the server will be called set_freq(new_freq). + +Example client in python: + +import xmlrpclib +s = xmlrpclib.Server("http://localhost:8080") +s.set_freq(5000) + </doc> +</block> |