setMotionFlag(3)

NAME
setMotionFlag -- synchronization support for RCCL move routines.

USAGE
#include <rccl.h>

setMotionFlag (mnp, mflagnum)
  MANIP *mnp;
  int mflagnum;

ARGUMENTS

mnp --
    Manipulator reference structure.

mflagnum --
    Motion flag number. This must be between 0 and (NUM_USRMFLAGS-1), and must also not be equal to the ID of a motion that is queued or being executed.

RESTRICTIONS
This routine must be called from the planning level.

DESCRIPTION
This routine allows a program to explicitly specify the ID number of the next motion request on a particular manipulator. This can be useful because motion IDs which are otherwise assigned by the system are automatically recycled after NUM_SYSMFLAGS motion requests. If it is desired to keep a motion ID around for longer than this, then it should be assigned explicitly using this routine.

The range of motion IDs reserved for exclusive use by application programs is 0 through (NUM_USRMFLAGS-1).

DIAGNOSTICS
This routine returns -1 in the event of an error. It 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:

EDescriptor --
    The specifed motion flag is out of range.

EBusy --
    The specified motion flag is presently assigned to another motion.

The routine will abort the program if called from the control level.

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