summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-22 22:58:56 +0000
committerPaul Buetow <paul@buetow.org>2008-05-22 22:58:56 +0000
commit3c7a6abb7aa82f3b7c1d44db9520763469af415f (patch)
tree5829746ffe6c2668b2a10efad8e2e85215708eb9
parent6f16d971c6ab18afd05e4b5b694ccf9944a0537c (diff)
A ProcessRecoverEvent should get handled the VERY first.
Dafault sim time now 15s. New brainstorm.
-rw-r--r--ROADMAP4
-rw-r--r--sources/core/VSTask.java19
-rw-r--r--sources/prefs/VSDefaultPrefs.java6
3 files changed, 24 insertions, 5 deletions
diff --git a/ROADMAP b/ROADMAP
index 338c8eb..68be1fe 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -19,6 +19,10 @@ Evtl:
Sender <-> Receiver specific deliver time calc
Systemschnitte?
Middleware-Schicht?
+ Ereignisse, die Prozessvariablen aendern
+ Bedingte Ereignisse
+ Simulationen beliebig lang machen
Optimierungen:
Methoden alphanumerisch sortieren, code tools
KeyEvent Manager
+
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index 2687ec3..d92ca79 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -123,9 +123,23 @@ public class VSTask implements Comparable {
else if (taskTime > task.getTaskTime())
return 1;
+ /* If it's a ProtocolRecover, it should get handled very first */
+ boolean a = event instanceof ProcessRecoverEvent;
+ boolean b = task.getEvent() instanceof ProcessRecoverEvent;
+
+ if (a && b)
+ return 0;
+
+ if (a)
+ return -1;
+
+ if (b)
+ return 1;
+
+
/* If it's a ProtocolEvent, it should get handled first */
- boolean a = event instanceof ProtocolEvent;
- boolean b = task.getEvent() instanceof ProtocolEvent;
+ a = event instanceof ProtocolEvent;
+ b = task.getEvent() instanceof ProtocolEvent;
if (a && b)
return 0;
@@ -135,6 +149,7 @@ public class VSTask implements Comparable {
if (b)
return 1;
+
}
return 0;
diff --git a/sources/prefs/VSDefaultPrefs.java b/sources/prefs/VSDefaultPrefs.java
index a7f659f..428df66 100644
--- a/sources/prefs/VSDefaultPrefs.java
+++ b/sources/prefs/VSDefaultPrefs.java
@@ -144,7 +144,7 @@ public class VSDefaultPrefs extends VSPrefs {
initInteger("sim.process.num", 3, "Anzahl der Prozesse", 1, 6);
initIntegerUnit("message.prob.outage", 0, "Nachrichtenverlustw'keit", 0, 100, "%");
initIntegerUnit("process.prob.crash", 0, "Prozessausfallw'keit", 0, 100, "%");
- initIntegerUnit("sim.seconds", 30, "Simulationsdauer", 5, 120, "s");
+ initIntegerUnit("sim.seconds", 15, "Simulationsdauer", 5, 120, "s");
/* Internal prefs */
initInteger("keyevent.about", KeyEvent.VK_A, null, 0, 100);
@@ -186,8 +186,8 @@ public class VSDefaultPrefs extends VSPrefs {
public void fillDefaultLongs() {
/* Simulation prefs */
- initLongUnit("message.sendingtime.min", 1000, "Minimale Übertragungszeit", "ms");
- initLongUnit("message.sendingtime.max", 5000, "Maximale Übertragungszeit", "ms");
+ initLongUnit("message.sendingtime.min", 500, "Minimale Übertragungszeit", "ms");
+ initLongUnit("message.sendingtime.max", 2000, "Maximale Übertragungszeit", "ms");
}
public void fillDefaultColors() {