RPC Call

Synopsis

call [OPTIONS] SERVER-URI/METHOD([ARGUMENT])

Description

Call METHOD of the RSB RPC server at SERVER-URI with argument ARGUMENT and print the result to standard output, if any.

SERVER-URI designates the root scope of the remote server and the transport that should be used.

Tip

For details regarding the URI syntax involved in transport and channel specifications, see URIs.

ARGUMENT is treated as follows:

  • As string when surrounded with double-quotes (")
  • As integer number when consisting of digits without decimal point
  • As float number when consisting of digits with decimal point
  • If ARGUMENT is the single character -, the entire “contents” of standard input (until end of file) is read as a string and used as argument for the method call
  • If ARGUMENT is the empty string, i.e. the call specification is of the form SERVER-URI/METHOD(), the method is called without argument

The usual commandline options are accepted. Specialized commandline options:

--timeout SPEC, -t SPEC

If the result of the method call does not arrive within the amount of time specified by SPEC, consider the call to have failed and exit with non-zero status.

--no-wait

Do not wait for the result of the method call. Immediately return with zero status without printing a result to standard output.

Examples

  • $ call 'spread:/mycomponent/control/status()'
    "running" # prints return value, if any
    $ call 'spread:/mycomponent/control/terminate()'
    $ # returns once the method call completes
    

    In the above example, the call tool is used to invoke the status and terminate methods of the remote server at scope /mycomponent/control without an argument.

Implementations

Implementation Language Project Repository Link
Common Lisp rsb-tools-cl “0.10” branch of https://code.cor-lab.org/git/rsb.git.tools-cl