Пример #1
0
/**
   Finds a child of this node with the given name
   @param name The name of the child we are interested in finding
   @return The task, if found.  If not found, NULL.
*/
AREXPORT ArSyncTask *ArSyncTask::findNonRecursive(const char * name)
{
  ArSyncTask *proc;
  std::multimap<int, ArSyncTask *>::iterator it;
  
  for (it = myMultiMap.begin(); it != myMultiMap.end(); ++it)
  {
    proc = (*it).second;
    if (strcmp(proc->getName().c_str(), name) == 0)  
      return proc;
  }
  return NULL;
}
Пример #2
0
AREXPORT const char *ArSyncLoop::getThreadActivity(void)
{
  if (myRunning)
  {
    ArSyncTask *syncTask;
    syncTask = myRobot->getSyncTaskRoot()->getRunning();
    if (syncTask != NULL)
      return syncTask->getName().c_str();
    else
      return "Unknown running";
  }
  else
    return "Unknown"; 
}