Package avrora.extern

Examples of avrora.extern.ThreadTime


    int nodeId = (int) nextNode[0];
    long time  = nextNode[1];

    if (nodeId == Const.SYNC_TERMINATE && time == Const.SYNC_TERMINATE) {
      return new ThreadTime(null, 0); // Terminate the execution
    }
 
    Simulation.Node tmpNode = (Simulation.Node) nodes.get(new Integer(nodeId));
   
    if (tmpNode == null) {
      System.err.println("SimInput: Versuch, nicht vorhandenen Knoten aufzurufen, ID=\""+nodeId+"\"");
      System.exit(1);
    }

    SimulatorThread thread = tmpNode.getThread();

    if (thread == null) { // Das hier auch noch an Node anpassen, sonst NullPointer vorher moeglich
      System.err.println("Ungueltige ID uebergeben bekommen: "+nodeId);
      System.exit(1);
    }
    if (time <= 0) {
      System.err.println("Ungueltige Zyklenanzahl eingegeben: "+time);
      System.exit(1);
    }

    //return new ExternalTiming.ThreadTime(thread, time);
    return new ThreadTime(thread, time);

  } // getNextThread
View Full Code Here


              condition.wait(30);
            }
            Utils.debugMsg("Thread "+thread.hashCode()+" fragt naechsten Thread ab", this);

            this.activate = false;
            ThreadTime next = timing.getNextThread();
            SimulatorThread st = next.getSimulatorThread();
            long time = next.getTime();
     
            if (time == 0 && st == null) {
              terminateSim = true;
              condition.notifyAll();
              return;
View Full Code Here

        System.err.println("Ungueltige Zyklenanzahl eingegeben: "+time);
        System.exit(1);
      }

      //return new ExternalTiming.ThreadTime(thread, time);
      return new ThreadTime(thread, time);

    } // synchronized
  } // getNextThread
View Full Code Here

TOP

Related Classes of avrora.extern.ThreadTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.