YARP  2.3.68+225-20170329.5+gitb0d3289
Yet Another Robot Platform
yarp::os::Run Class Reference

yarprun provides the APIs to a client-server environment that is able to run, kill and monitor applications commands on a remote machin in Windows and Linux. More...

#include <yarp/os/Run.h>

Static Public Member Functions

static int start (const ConstString &node, Property &command, ConstString &keyv)
 Launch a yarprun server. More...
 
static int sigterm (const ConstString &node, const ConstString &keyv)
 Terminate an application running on a yarprun server. More...
 
static int sigterm (const ConstString &node)
 Terminate all applications running on a yarprun server. More...
 
static int kill (const ConstString &node, const ConstString &keyv, int s)
 Send a SIGNAL to an application running on a yarprun server (Linux only). More...
 
static bool isRunning (const ConstString &node, ConstString &keyv)
 Get a report of all applications running on a yarprun server. More...
 
static int client (Property &config)
 Send a property object to a run server, bundling up all the settings usually specified on the command line. More...
 

Detailed Description

yarprun provides the APIs to a client-server environment that is able to run, kill and monitor applications commands on a remote machin in Windows and Linux.

Definition at line 85 of file Run.h.

Member Function Documentation

◆ client()

int yarp::os::Run::client ( Property config)
static

Send a property object to a run server, bundling up all the settings usually specified on the command line.

See the documentation for the "yarprun" command.

Parameters
configthe property object to send.
Returns
0 on success, -1 on failure

Definition at line 1222 of file Run.cpp.

◆ isRunning()

bool yarp::os::Run::isRunning ( const ConstString node,
ConstString keyv 
)
static

Get a report of all applications running on a yarprun server.

Parameters
nodeis the yarprun server port name. It must be unique in the network.
processesis a list of applications running on the remote yarprun server. It must not be allocated and it is responsability of the caller to delete it.
num_processesreturn the number of running processes.
Returns
0=success -1=failed. Report if an application is still running on a yarprun server.
Parameters
nodeis the yarprun server port name. It must be unique in the network.
keyvis the tag that identifies the application. It must be unique in the network.
Returns
true=running false=terminated.

Definition at line 3752 of file Run.cpp.

◆ kill()

int yarp::os::Run::kill ( const ConstString node,
const ConstString keyv,
int  s 
)
static

Send a SIGNAL to an application running on a yarprun server (Linux only).

Parameters
nodeis the yarprun server port name. It must be unique in the network.
keyvis the tag that identifies the running application. It must be unique in the network.
sis the SIGNAL number.
Returns
0=success -1=failed.

Definition at line 3730 of file Run.cpp.

◆ sigterm() [1/2]

int yarp::os::Run::sigterm ( const ConstString node,
const ConstString keyv 
)
static

Terminate an application running on a yarprun server.

Parameters
nodeis the yarprun server port name. It must be unique in the network.
keyvis the tag that identifies the running application. It must be unique in the network.
Returns
0=success -1=failed.

Definition at line 3689 of file Run.cpp.

◆ sigterm() [2/2]

int yarp::os::Run::sigterm ( const ConstString node)
static

Terminate all applications running on a yarprun server.

Parameters
nodeis the yarprun server port name. It must be unique in the network.
Returns
0=success -1=failed.

Definition at line 3710 of file Run.cpp.

◆ start()

int yarp::os::Run::start ( const ConstString node,
Property command,
ConstString keyv 
)
static

Launch a yarprun server.

Parameters
nodeis the yarprun server port name. It must be unique in the network.
commandis the command to be executed by the remote server. It can include an argument list and different options, in the standard yarp Property key/value mode:
  • name COMMAND_NAME
  • parameters ARGUMENT_LIST (optional)
  • stdio /SERVERPORT (optional)
  • geometry WxH+X+Y (optional)
  • hold (optional)
keyvis the tag that will identify the running application. It must be unique in the network.
Returns
0=success -1=failed.

Definition at line 3631 of file Run.cpp.


The documentation for this class was generated from the following files: