\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{setMotionFlag}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{setMotionFlag}}
-- synchronization support for RCCL move routines.

}
\manSection{USAGE}
\cverbatim
#include <rccl.h>

setMotionFlag (mnp, mflagnum)
  MANIP *mnp;
  int mflagnum;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt mnp} --}
Manipulator reference structure.
\manItem{{\tt mflagnum} --}
Motion flag number.
This must be between 0 and ({\tt NUM_USRMFLAGS}${}-1$), and
must also not be equal to the ID of a motion that is queued or being
executed.
\manSection{RESTRICTIONS}
This routine must be called from the planning level.
\manSection{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 {\tt 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 ({\tt NUM_USRMFLAGS-1}).
\manSection{DIAGNOSTICS}
This routine returns {\tt -1} in the event of an error.
It will automatically abort the program if the option {\tt RCCL_ERROR_EXIT} is
set (see {\tt rcclSetOptions(3)}).
Error codes and messages are placed on the {\it errorStack} (q.v.). 
The following error codes may be set:

\manItem{{\tt EDescriptor} --}
The specifed motion flag is out of range.
\manItem{{\tt EBusy} --}
The specified motion flag is presently assigned to another motion.

The routine will abort the program if called from the control level.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt move(3)}, {\tt rcclSetOptions(3)}, {\tt errorStack(3)}.
\manEnd
\end

