summaryrefslogtreecommitdiff
path: root/grc/blocks/xmlrpc_client.xml
diff options
context:
space:
mode:
Diffstat (limited to 'grc/blocks/xmlrpc_client.xml')
-rw-r--r--grc/blocks/xmlrpc_client.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/grc/blocks/xmlrpc_client.xml b/grc/blocks/xmlrpc_client.xml
new file mode 100644
index 000000000..dc4d154d1
--- /dev/null
+++ b/grc/blocks/xmlrpc_client.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Simple XMLRPC Client
+###################################################
+ -->
+<block>
+ <name>XMLRPC Client</name>
+ <key>xmlrpc_client</key>
+ <import>import xmlrpclib</import>
+ <make>xmlrpclib.Server('http://$(addr()):$(port)')</make>
+ <callback>$(callback())($variable)</callback>
+ <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>
+ <param>
+ <name>Callback</name>
+ <key>callback</key>
+ <value>set_</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Variable</name>
+ <key>variable</key>
+ <type>raw</type>
+ </param>
+ <doc>
+This block will create an XMLRPC client. \
+The client will execute the callback on the server when the variable is changed. \
+The callback should be a the name of a function registered on the server. \
+The variable should be an expression containing a the name of a variable in flow graph.
+ </doc>
+</block>