コード例 #1
0
void t4p::ConfigTagDetectorActionClass::OnProcessComplete(wxCommandEvent &event) {
    if (ParamsQueue.empty()) {
        SignalEnd();
    } else {
        NextDetection();
    }
}
コード例 #2
0
ファイル: cntrlTask.c プロジェクト: openrobots/genom
$module$CntrlTask(void *arg)
{
  static SERV_ID $module$ServId;              /* Id du serveur */

  /* Routine d'initialisation */
  CNTRL_TASK_STATUS = $module$CntrlInitTask (&$module$ServId);
  if (CNTRL_TASK_STATUS == ERROR)
     CNTRL_TASK_BILAN = errnoGet();
  else
     CNTRL_TASK_BILAN = OK;
  
  /* Donner le sem de fin d'initialisation */
  semGive (sem$module$CntrlTaskInit) ;

  /* Se suspendre en cas de probleme */
  if (CNTRL_TASK_STATUS == ERROR) {
     $module$CntrlTaskSuspend(FALSE);
  }

  moduleEventCntrl.moduleNum = $numModule$;

  /* Record a signal handler */
  $module$SignalAbort = FALSE;
  signal(SIGTERM, $module$SignalHandler);
  /* Boucler indefiniment */
  FOREVER
    {
      /* Bloquer dans l'attente d'evenements internes et externes */
      if (h2evnSusp (0) != TRUE)
	 $module$CntrlTaskSuspend (FALSE);

      /* Prendre l'acces aux SDI */
      commonStructTake ((void *) $module$CntrlStrId);
      commonStructTake ((void *) $module$DataStrId);
 
      if ($module$SignalAbort) {
	      $module$SignalEnd();
      }
      /* Traiter les evenements internes */
      $module$CntrlIntEvnExec ($module$ServId);

      /* Traiter les evenements externes */
      $module$CntrlExtEvnExec ($module$ServId);

      /* Lancer les activites en attentes */
      $module$SpawnActivities($module$ServId);

      /* Mettre a jour le poster de controle */
      $module$CntrlPosterWrite();

      CNTRL_TASK_BILAN = errnoGet();

     /* Liberer l'acces aux SDI */
      commonStructGive ((void *) $module$DataStrId);
      commonStructGive ((void *) $module$CntrlStrId);

    }
  return NULL;
}
コード例 #3
0
void t4p::ConfigTagDetectorActionClass::OnProcessFailed(wxCommandEvent &event) {
    wxString msg = event.GetString();
    wxString extensionMissingErr = wxT("requires the PDO and pdo_sqlite PHP extensions.");
    if (msg.Find(extensionMissingErr) != wxNOT_FOUND) {
        t4p::EditorLogError(t4p::ERR_MISSING_PHP_EXTENSIONS, msg);
    } else {
        t4p::EditorLogErrorFix(event.GetString(), _("There is an unexpected error in the detector. Was it modified?"));
    }
    if (ParamsQueue.empty()) {
        SignalEnd();
    } else {
        NextDetection();
    }
}