Changeset 15117 for trunk/FACT++/scripts


Ignore:
Timestamp:
03/18/13 21:24:41 (12 years ago)
Author:
tbretz
Message:
Moved reading of the schedule to the beginning of the file so that typos get noticed before all the rest of the startup procedure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/Main.js

    r15098 r15117  
    77//this is just the class implementation of 'Observation'
    88include('scripts/Observation_class.js');
     9
     10// this file just contains the definition of
     11// the variable observations, which builds our nightly schedule, hence the filename
     12include('scripts/schedule.js');
     13
     14// make Observation objects from user input and check if 'date' is increasing.
     15for (var i=0; i<observations.length; i++)
     16{
     17    observations[i] = new Observation(observations[i]);
     18
     19    // check if the start date given by the user is increasing.
     20    if (i>0 && observations[i].start <= observations[i-1].start)
     21    {
     22        throw new Error("Start time '"+ observations[i].start.toUTCString()+
     23                        "' in row "+i+" exceeds start time in row "+(i-1));
     24    }
     25}
     26
     27// ----------------------------------------------------------------
     28// ================================================================
     29// ----------------------------------------------------------------
    930
    1031dimctrl.defineState(37, "TimeOutBeforeTakingData", "MCP took more than 5minutes to start TakingData");
     
    484505
    485506// ----------------------------------------------------------------
    486 // ================================================================
    487 // ----------------------------------------------------------------
    488 
    489 // this file just contains the definition of
    490 // the variable observations, which builds our nightly schedule, hence the filename
    491 include('scripts/schedule.js');
    492 
    493 // make Observation objects from user input and check if 'date' is increasing.
    494 for (var i=0; i<observations.length; i++)
    495 {
    496     observations[i] = new Observation(observations[i]);
    497 
    498     // check if the start date given by the user is increasing.
    499     if (i>0 && observations[i].start <= observations[i-1].start)
    500     {
    501         throw new Error("Start time '"+ observations[i].start.toUTCString()+
    502                         "' in row "+i+" exceeds start time in row "+(i-1));
    503     }
    504 }
    505 
    506 // ----------------------------------------------------------------
    507507// Bring the system into a well defined state
    508508// ----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.