\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{rcclSetInterval}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{rcclSetInterval}},
{\tt \manName{rcclGetInterval}} 
-- routines for manipulating the RCCL sample rate.
}
\manSection{USAGE}
\cverbatim
rcclSetInterval (interval)
  int interval;

rcclGetInterval()@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt interval} --}
Trajectory generator sample interval (milliseconds).
\manSection{RESTRICTIONS}
{\tt rcclSetInterval()} must be called from the planning level,
and it is not permitted
to change the sample interval when the system is in operation.
\manSection{DESCRIPTION}
These routines are used to control the rate at which the RCCL
trajectory generator runs.
For instance, it is sometimes useful to use a longer
sample interval to facilitate more complex control level calculations.
On the other hand, it may be necessary to use a shorter sample interval for
certain types of feedback applications.
The default interval is specified by the {\tt RCCL} parameter {\tt interval}
in the {\tt .rciparams} file (see {\tt RCCL_params(5)}). 

{\tt rcclSetInterval()} sets the sample interval. This must be done
when the trajectory generator is not running.

{\tt rcclGetInterval()} returns the current sample interval in milliseconds.
\manSection{DIAGNOSTICS}
{\tt rcclSetInterval()} 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 ETaskActive} --}
RCCL control level is running.
\manItem{{\tt EInternal} --}
Unexpected internal software or communication failure.

{\tt rcclGetInterval()} returns {\tt -1} if no call has yet been made
to either {\tt rcclCreate()} or {\tt rcclSetInterval()}.

{\tt rcclSetInterval()} will abort the program if called from the control
level. 
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt rcclCreate(3)}, {\tt rcclStart(3)}, 
{\tt rciParameters(3)}, {\tt errorStack(3)}.
\manEnd
\end
