XMLRPC Server: Difference between revisions
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...") |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Block Docs]] | [[Category:Block Docs]] | ||
This block will start an XMLRPC server. | |||
This | |||
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). | |||
== Parameters == | == Parameters == | ||
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span> | (''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span> | ||
; | ; Address | ||
: Address the server will be listening at (default: localhost) | |||
; Port | |||
: Port the server will be listening at (default: 8080) | |||
== Example Flowgraph == | |||
This flowgraph is for version 3.9+ | |||
The 'siggen_xmlrpc_server.grc' flowgraph should be used in conjunction with the 'siggen_controller_xmlrpc_client.grc' flowgraph. Both are located in the 'gr-blocks/examples/xmlrpc' directory in GNURadio. Upon execution, this flowgraph generates a sinusoid, adds Gaussian noise and plots the resultant signal in both time and frequency domains. The XMLRPC Server block in the flowgraph enables all variables in the flowgraph to be controlled via XMLRPC through the IP address and port set in the block parameters. If using the XMLRPC Client flowgraph (see [[XMLRPC_Client]]) for control, when the slider is moved the client will send SET messages which the XMLRPC Server Block will receive. In this example, the SET commands will change the value of the frequency ('rmt_freq') variable in the server flowgraph which will be reflected in the GUI window. | |||
[[File:Xmlrpc_server.png]] | |||
: | |||
== Example | ==Example Output== | ||
Before Client Side GUI is Changed | |||
[[File:Xmlrpc_server_before.png]] | |||
After Client Side GUI is Changed | |||
[[File:Xmlrpc_server_after.png]] | |||
== Source Files == | |||
; Block definition | ; Block definition | ||
: [https://github.com/gnuradio/gnuradio | : [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/xmlrpc_server.block.yml] |
Latest revision as of 18:06, 21 November 2021
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).
Parameters
(R): Run-time adjustable
- Address
- Address the server will be listening at (default: localhost)
- Port
- Port the server will be listening at (default: 8080)
Example Flowgraph
This flowgraph is for version 3.9+
The 'siggen_xmlrpc_server.grc' flowgraph should be used in conjunction with the 'siggen_controller_xmlrpc_client.grc' flowgraph. Both are located in the 'gr-blocks/examples/xmlrpc' directory in GNURadio. Upon execution, this flowgraph generates a sinusoid, adds Gaussian noise and plots the resultant signal in both time and frequency domains. The XMLRPC Server block in the flowgraph enables all variables in the flowgraph to be controlled via XMLRPC through the IP address and port set in the block parameters. If using the XMLRPC Client flowgraph (see XMLRPC_Client) for control, when the slider is moved the client will send SET messages which the XMLRPC Server Block will receive. In this example, the SET commands will change the value of the frequency ('rmt_freq') variable in the server flowgraph which will be reflected in the GUI window.
Example Output
Before Client Side GUI is Changed
After Client Side GUI is Changed
Source Files
- Block definition
- [1]