Example #1
0
void AGOSEngine_Elvira2::oe2_ifExitLocked() {
	// 173: if exit locked
	Item *i = getNextItemPtr();
	uint16 n = getVarOrWord();
	uint16 d = getVarOrByte();
	setScriptCondition(getExitState(i, n, d) == 3);
}
Example #2
0
void AGOSEngine_Elvira2::oe2_ifExitOpen() {
	// 171: if exit open
	Item *i = getNextItemPtr();
	uint16 n = getVarOrWord();
	uint16 d = getVarOrByte();
	setScriptCondition(getExitState(i, n, d) == 1);
}
Example #3
0
int
QA::finally(int xCode)
{
  setExitState(xCode);

  // write pending results to qa-file.nc. Modes are considered there
  for( size_t i=0 ; i < qaExp.varMeDa.size() ; ++i )
    setExitState( qaExp.varMeDa[i].finally() );

  if( xCode == 63 ||
     ( nc == 0 && xCode ) || (currQARec == 0 && pIn->isTime ) )
  { // qa is up-to-date or a forced exit right from the start;
    // no data to write
    if( xCode == 63 )
      xCode=0 ;

    is_exit=true;

    if(nc)
    {
        nc->close();
        nc=0;
    }
  }

  if( nc )
  {
    if( qaTime.isTime )
      qaTime.finally( nc );

    // post-processing
    xCode = finally_data(xCode) ;

    if(isRequiredGlobal)
    {
        Variable& glob = pIn->variable[pIn->varSz] ;

        if( glob.isValidAtt("creation_date") )
           std::cout << "CREATE-BEG" << glob.getAttValue("creation_date")
                                     << "CREATE-END";
        if( glob.isValidAtt("tracking_id") )
           std::cout << "TRACK-BEG"  << glob.getAttValue("tracking_id")
                                     << "TRACK-END";
    }

    nc->close();
    nc=0;
  }

  setExitState(xCode);

  // distinguish from a sytem crash (segmentation error)
  std::cout << "STATUS-BEG" << xCode << "STATUS-END";
  std::cout << std::flush;

  return getExitState() ;
}
Example #4
0
int
QA::finally_data(int xCode)
{
  // post processing, but not for conditions which indicate
  // incomplete checking.
  if( getExitState() < 3 )
  {  // 3 or 4 interrupted any checking
    if( enablePostProc )
    {
      if( postProc() )
      {
        if( getExitState() == 63 )
            setExitState(1);  // this is considered a change

        notes->setCheckStatus(n_data, n_fail);
      }
    }
  }

  // read history from the qa-file.nc and append new entries
  appendToHistory();

  if( isCheckData )
  {
    // check for flags concerning the total data set,
    // but exclude the case of no record
    if( pIn->currRec > 0 )
      for( size_t j=0 ; j < qaExp.varMeDa.size() ; ++j )
        qaExp.varMeDa[j].qaData.checkFinally(qaExp.varMeDa[j].var);

    for( size_t j=0 ; j < qaExp.varMeDa.size() ; ++j )
    {
       // write qa-results attributes about statistics
       qaExp.varMeDa[j].qaData.setStatisticsAttribute(nc);

       // plausibility range checks about units
       qaExp.varMeDa[j].verifyPercent();
    }
  }

  return getExitState() ;
}