setCompletedSig(3)

NAME
setCompletedSig, setStopSig -- deliver UNIX signal when RCCL motions complete.

USAGE
#include <rccl.h>

setCompletedSig (mnp, signum)
  MANIP *mnp;
  int signum;

setStopSig (mnp, signum, mid)
  MANIP *mnp;
  int signum;
  int mid;

ARGUMENTS

mnp --
    Manipulator reference structure.

signum --
    UNIX signal number.

mid --
    Motion ID. This is the number returned by the move request.

RESTRICTIONS
These routines must be called from the planning level. Signals SIGXCPU and SIGHUP are reserved for use by RCI and cannot be used.

DESCRIPTION
These routines arrange for a UNIX signal to be delivered when either the motion queue empties or a particular motion finishes.

setCompletedSig() arranges for a signal to be delivered the next time the motion queue empties and the trajectory generator finds itself idle. This is equivalent to having a signal delivered at the point where waitForCompleted(mnp) would return.

setStopSig() arranges for a UNIX signal to be delivered when the indicated motion terminates.

For both of the routines, specifying a signal number of less than 1 cancels any pending signal request.

DIAGNOSTICS
These routines return -1 in the event of an error. They will automatically abort the program if the option RCCL_ERROR_EXIT is set (see rcclSetOptions(3)). Error codes and messages are placed on the errorStack (q.v.). The following error codes may be set:

ERange --
    Illegal UNIX signal value specified.

setStopSig may also set the following:

EDescriptor --
    Bad or invalid motion ID number specified.

These routines will abort the program if called from the control level.

SEE ALSO
move(3), setMotionFlag(3), rcclSetOptions(3), errorStack(3).