setMotionQueueSize(3)

NAME
setMotionQueueSize, getMotionQueueSize -- change the size of the RCCL motion queue.

USAGE
setMotionQueueSize(mnp, size)
  MANIP *mnp;
  int size;

getMotionQueueSize(mnp)
  MANIP *mnp;

ARGUMENTS

mnp --
    Manipulator reference structure.

size --
    New size of the motion queue.

RESTRICTIONS
setMotionQueueSize() must be called from the planning level.

DESCRIPTION
These routines allow the size of a manipulator's motion queue to be adjusted. Changing the motion queue size alters the maximum number of motions that may be placed on the queue before calls to the move primitives start to block. By playing with the motion queue size, different blocking behaviours can be achieved.

If the motion queue size is set to 0, then all motion primitives will block until the requested motion has completed. This is equivalent to calling
        waitForCompleted(mnp);

after every motion request.

If the motion queue size is set to 1, then all motion primitives will block until the requested motion has started executing. This is a blocking behaviour similar to that used by the language VAL-II.

If the motion queue size is N, then all motion primitives will block until there are less than N items on the motion queue.

setMotionQueueSize() sets the size of the motion queue and returns the previous size, if successful. getMotionQueueSize() returns the current size of the motion queue. The motion queue may be made as large as MAX_MQ_ENTRIES. If the queue is made smaller than the number of entries currently on it, then the next motion request will block until the required queue size is satisfied.

DIAGNOSTICS
setMotionQueueSize() 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:

ERange --
    A motion queue size was specified that was either negative or larger than MAX_MQ_ENTRIES.

setMotionQueueSize() will abort the program if called from the control level.

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