YARP  2.3.70.1
Yet Another Robot Platform
The administrative interface to YARP ports
Author
Paul Fitzpatrick

Most of the time, YARP ports are conduits for messages. Users write messages to ports, and read messages from ports, and the ports themselves don't inspect the content of those messages.

In some cases, though, you may find yourself wishing to talk to a port itself, in order to query it about its state, or to request it to take some action (such as making or breaking a connection). There is a low level protocol for this, but it is somewhat arcane (see Port commands).

To send an administrative message to a port is simple. From the commandline, just use "yarp admin write" or "yarp admin rpc" instead of "yarp write" or "yarp rpc":

  echo "[list] [in]" | yarp admin rpc /port_name

This will list all the inputs to the port /port_name. The square brackets may be omitted in the current implementation of YARP.

From code, set the "admin" flag in yarp::os::Network::write, or call yarp::os::Port::setAdminMode. Messages can be read/written as regular yarp::os::Bottle objects. Nothing else is needed.

Here are the things you can do using the administrative interface:

help

[help]

Lists all the available administration commands.

add

[add] /port/name
[add] /port/name carrier

Add an output to the specified port, using a given carrier (tcp, udp, etc.)

del

[del] /port/name

Remove an output to the specified port.

list

[list] [in]
[list] [out]

List input or output connections.

ver

[ver]

Report the version of the port protocol in operation.