XMLRPC Server: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
Line 24: Line 24:
[[File:Xmlrpc_server.png]]
[[File:Xmlrpc_server.png]]


==Before Client Side GUI is Changed==
==Example Output==
 
Before Client Side GUI is Changed


[[File:Xmlrpc_server_before.png]]
[[File:Xmlrpc_server_before.png]]


==After Client Side GUI is Changed==
After Client Side GUI is Changed


[[File:Xmlrpc_server_after.png]]
[[File:Xmlrpc_server_after.png]]

Revision as of 10: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.

Xmlrpc server.png

Example Output

Before Client Side GUI is Changed

Xmlrpc server before.png

After Client Side GUI is Changed

Xmlrpc server after.png

Source Files

Block definition
[1]