getRciTask(3)

NAME
getRciTask, findRciTask, getCurrentTask, rciTaskName -- routines for obtaining RCI task descriptors or names.

USAGE
RCI_DESC *getRciTask(name)
  const char *name;

RCI_DESC *findRciTask(id)
  int id;

RCI_DESC *getCurrentTask()

char *rciTaskName(td)
  RCI_DESC *td;

ARGUMENTS

name --
    Name of an RCI task (the same name that was given to rciCreate()).

id --
    ID number of an RCI task (the same number that would be returned by TASKNUM(td)).

td --
    Pointer to an RCI task, as would be returned by rciCreate() or getRciTask().

DESCRIPTION
These routines give RCI tasks a way of obtaining pointers to task descriptors for either themselves or some other task. They may be called from any part of the RCI program.

getRciTask() returns a task descriptor td for the named task.

findRciTask() returns a task descriptor td for the RCI task with the indicated ID number.

getCurrentTask() returns the task descriptor for the current RCI task (which will be the planning task, if called from the planning level).

rciTaskName() returns a pointer to the name of the RCI task described by the descriptor td.

DIAGNOSTICS
getRciTask() returns NULL if it can't find the named task; the other routines assume that nothing will go wrong.

BUGS
The other routines assume that nothing will go wrong.

SEE ALSO
rciCreate(3), TASKNUM(3).