\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{robotMacros}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{ROBOT_DEV}},
{\tt \manName{ROBOT_WAKEUP}},
{\tt \manName{ROBOT_READY}}
-- RCI robot support macros.
}
\manSection{USAGE}
\cverbatim
#include <rci.h>

IO_DEVICE *ROBOT_DEV(rbt)
  RCI_RBT *rbt;

ROBOT_WAKEUP(rbt)
  RCI_RBT *rbt;

ROBOT_READY(rbt)
  RCI_RBT *rbt; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt rbt} --}
Pointer to robot data structure.
\manSection{DESCRIPTION}
These macros provide a few ``housekeeping'' functions for
robots which are attached to RCI tasks (see {\tt rciAttachRobot(3)});
they may be called from any part of an RCI program.

{\tt ROBOT_DEV()} returns a pointer to the I/O device associated with
a robot. This is only valid if called from the control task to
which the robot is attached.

{\tt ROBOT_WAKEUP()} executes a function to ``wake up'' a robot
for the next control cycle. The macro uses the {\TT wakeup} and {\TT
wakeupArg} fields in the {\TT rbt} structure; since these are usually
instantiated by the robot interface {\it startup} function, this
macro will not function properly until the startup function has
been called (which is usually done inside the control task's startup
function).

{\tt ROBOT_READY()} tests to see if a robot is ``ready''; that is,
the feedback data for the next control cycle has been collected and is
ready for reading by the control task.
This macro is typically used inside a robot control task's ``wakeup''
function.

\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt rciAttachRobot(3)}, {\tt rciWakeupOn(3)}, {\tt robotComfxns(7)},
{\tt controlFxns(7)}.
\manEnd
\end
