diff --git a/Makefile b/Makefile index 2a760cd694a0de8534a31b935e174059c486a65d..bded97dfe3caa43f5dae50427301f928c438d1e4 100755 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ all: ttooljar_std: rm -f $(TTOOL_BIN)/$(TTOOL_BINARY) cp $(TTOOL_SRC)/ui/images/$(STD_LOGO) $(TTOOL_SRC)/ui/images/$(LOGO) - cd $(TTOOL_SRC); $(JAR) cmf $(TTOOL_JAR_TXT) $(TTOOL_BIN)/$(TTOOL_BINARY) Main.class automata/*.class compiler/tmlparser/*.class tmltranslator/*.class tmltranslator/toautomata/*.class tmatrix/*.class tmltranslator/toturtle/*.class tmltranslator/touppaal/*.class tmltranslator/tosystemc/*.class tmltranslator/tomappingsystemc/*.class tmltranslator/tomappingsystemc2/*.class tpndescription/*.class ddtranslator/*.class launcher/*.class myutil/*.class sddescription/*.class sdtranslator/*.class translator/*.class translator/tojava/*.class translator/tosimujava/*.class translator/touppaal/*.class translator/totpn/*.class ui/*.class ui/*/*.class ui/*/*/*.class uppaaldesc/*.class ui/images/*.* ui/images/toolbarButtonGraphics/general/*.gif ui/images/toolbarButtonGraphics/media/*.gif $(TTOOL_BIN)/$(LAUNCHER_BINARY) RTLLauncher.class launcher/*.class fr/inria/oasis/vercors/cttool/model/*.class + cd $(TTOOL_SRC); $(JAR) cmf $(TTOOL_JAR_TXT) $(TTOOL_BIN)/$(TTOOL_BINARY) Main.class automata/*.class compiler/tmlparser/*.class tmltranslator/*.class tmltranslator/toautomata/*.class tmatrix/*.class tmltranslator/toturtle/*.class tmltranslator/touppaal/*.class tmltranslator/tosystemc/*.class tmltranslator/tomappingsystemc/*.class tmltranslator/tomappingsystemc2/*.class tpndescription/*.class ddtranslator/*.class launcher/*.class myutil/*.class sddescription/*.class sdtranslator/*.class translator/*.class translator/tojava/*.class translator/tosimujava/*.class translator/touppaal/*.class translator/totpn/*.class ui/*.class ui/*/*.class ui/*/*/*.class uppaaldesc/*.class ui/images/*.* ui/images/toolbarButtonGraphics/general/*.gif ui/images/toolbarButtonGraphics/media/*.gifBIN)/$(LAUNCHER_BINARY) RTLLauncher.class launcher/*.class fr/inria/oasis/vercors/cttool/model/*.class launcher: diff --git a/src/Main.java b/src/Main.java index 864cd3f993f6879786aa81e37c481e2c17736aa9..9f9f46b674a874d87619cdbfbf322e4e112a32d8 100755 --- a/src/Main.java +++ b/src/Main.java @@ -64,7 +64,7 @@ public class Main implements ActionListener { public static boolean tpn = false; public static boolean os = false; public static boolean uppaal = false; - + public static boolean nc = false ; // Network calculus public static void main(String[] args) { System.out.println("\n*** Your TTool version is: " + DefaultText.getFullVersion() + " ***\n"); @@ -128,7 +128,12 @@ public class Main implements ActionListener { tpn = true; System.out.println("TPN features activated - these are beta features that are meant to be used only for research purpose"); } - + + if (args[i].compareTo("-nc") ==0 ) { + nc = true; + System.out.println("Network calculus features activated - these are beta features that are meant to be used only for research purpose"); + } + if (args[i].compareTo("-os") == 0) { os = true; System.out.println("TURTLE-OS features activated - these are beta features that are meant to be used only for research purpose"); @@ -165,7 +170,7 @@ public class Main implements ActionListener { // making main window splashFrame.setMessage("Creating main window"); - MainGUI mainGUI = new MainGUI(systemc, lotos, proactive, tpn, os, uppaal); + MainGUI mainGUI = new MainGUI(systemc, lotos, proactive, tpn, os, uppaal, nc); splashFrame.setMessage("Building graphical components"); mainGUI.build(); diff --git a/src/nc/NCElement.java b/src/nc/NCElement.java new file mode 100755 index 0000000000000000000000000000000000000000..9e7284ff92b516dba761869f885b92df39bddf14 --- /dev/null +++ b/src/nc/NCElement.java @@ -0,0 +1,66 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCElement +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + +public class NCElement { + + protected String name; + + public NCElement() { + + } + + public String getName() { + return name; + } + + public void setName(String _name) { + name = _name; + } + + +} \ No newline at end of file diff --git a/src/nc/NCEquipment.java b/src/nc/NCEquipment.java new file mode 100755 index 0000000000000000000000000000000000000000..c6c286450c35ad0e507cf42f968c9213e1a111d8 --- /dev/null +++ b/src/nc/NCEquipment.java @@ -0,0 +1,55 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCEquipment +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + +public class NCEquipment extends NCLinkedElement { + + public NCEquipment() { + + } + +} \ No newline at end of file diff --git a/src/nc/NCLink.java b/src/nc/NCLink.java new file mode 100755 index 0000000000000000000000000000000000000000..d0f5dba765c046804a67cde2551e1b875191be1d --- /dev/null +++ b/src/nc/NCLink.java @@ -0,0 +1,64 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCLink +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + + +public class NCLink extends NCElement { + protected int capacity; + protected NCLinkedElement origin; + protected NCLinkedElement destination; + + public NCLink() {} + + public void setCapacity(int _capacity) { + capacity = _capacity; + } + + public int getCapacity() { + return capacity; + } +} \ No newline at end of file diff --git a/src/nc/NCLinkedElement.java b/src/nc/NCLinkedElement.java new file mode 100755 index 0000000000000000000000000000000000000000..4bef46ebb01aa802f2b0343fc52e8b8183283aaa --- /dev/null +++ b/src/nc/NCLinkedElement.java @@ -0,0 +1,56 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCLinkedElement +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + + +public class NCLinkedElement extends NCElement { + + public NCLinkedElement() { + + } + +} \ No newline at end of file diff --git a/src/nc/NCPath.java b/src/nc/NCPath.java new file mode 100755 index 0000000000000000000000000000000000000000..a66640cde236ade7ffdae64f839fc17d5109ee77 --- /dev/null +++ b/src/nc/NCPath.java @@ -0,0 +1,58 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCPath +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + +import java.util.*; + +public class NCPath extends NCElement { + public NCEquipment origin; + public NCEquipment destination; + public ArrayList<NCSwitch> switches; + + public NCPath() { + switches = new ArrayList<NCSwitch>(); + } +} \ No newline at end of file diff --git a/src/nc/NCStructure.java b/src/nc/NCStructure.java new file mode 100755 index 0000000000000000000000000000000000000000..bfb62492bc5fff8d7bba6aae897ccf41ead76538 --- /dev/null +++ b/src/nc/NCStructure.java @@ -0,0 +1,154 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCStructure +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + +import java.util.*; + +public class NCStructure extends NCElement { + public ArrayList<NCEquipment> equipments; + public ArrayList<NCSwitch> switches; + public ArrayList<NCTraffic> traffics; + public ArrayList<NCLink> links; + public ArrayList<NCPath> paths; + + public NCStructure() { + equipments = new ArrayList<NCEquipment>(); + switches = new ArrayList<NCSwitch>(); + traffics = new ArrayList<NCTraffic>(); + links = new ArrayList<NCLink>(); + paths = new ArrayList<NCPath>(); + } + + public String toXML() { + StringBuffer sb = new StringBuffer(""); + sb.append(getXMLHeader()); + sb.append("<NCStructure>\n"); + sb.append(getXMLEquipments()); + sb.append(getXMLSwitches()); + sb.append(getXMLTraffics()); + sb.append(getXMLLinks()); + sb.append("</NCStructure>\n"); + return sb.toString(); + } + + private String getXMLHeader() { + return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"; + } + + private String getXMLEquipments() { + String tmp = ""; + for(NCEquipment eq: equipments) { + tmp += "<Equipment "; + tmp += " name=\""; + tmp += eq.getName(); + tmp += "\" />"; + } + return tmp; + } + + + private String getXMLSwitches() { + String tmp = ""; + for(NCSwitch sw: switches) { + tmp += "<Switch "; + tmp += " name=\""; + tmp += sw.getName(); + tmp += "\" schedulingPolicy=\""; + tmp += NCSwitch.getStringSchedulingPolicy(sw.getSchedulingPolicy()); + tmp += "\" />"; + } + return tmp; + } + + private String getXMLTraffics() { + String tmp = ""; + for(NCTraffic tr: traffics) { + tmp += "<traffic "; + tmp += " name=\""; + tmp += tr.getName(); + tmp += "\" periodicity=\"" + tr.getPeriodicity(); + tmp += "\" />"; + } + return tmp; + } + + private String getXMLLinks() { + String tmp = ""; + for(NCLink lk: links) { + tmp += "<Link "; + tmp += " name=\""; + tmp += lk.getName(); + tmp += "\" capacity=\""; + tmp += lk.getCapacity(); + tmp += "\" />"; + } + return tmp; + } + + private String getXMLPaths() { + String tmp = ""; + for(NCPath pa: paths) { + tmp += "<Path "; + tmp += " name=\""; + tmp += pa.getName(); + tmp += "\" origin=\""; + tmp += pa.origin.getName(); + tmp += "\" destination=\""; + tmp += pa.destination.getName(); + tmp += "\" />"; + for(NCSwitch sw: pa.switches) { + tmp += "<Path "; + tmp += " name=\""; + tmp += pa.getName(); + tmp += "\" switch=\""; + tmp += sw.getName(); + tmp += "\" />"; + } + } + return tmp; + } + +} \ No newline at end of file diff --git a/src/nc/NCSwitch.java b/src/nc/NCSwitch.java new file mode 100755 index 0000000000000000000000000000000000000000..3f7f7eee22eb5c862c7a8cd5b504750fd722bc93 --- /dev/null +++ b/src/nc/NCSwitch.java @@ -0,0 +1,86 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCSwitch +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + + +public class NCSwitch extends NCLinkedElement { + + public static String FCFS = "FCFS"; + public static String STATIC = "Static priority"; + public static String WFQ = "Weight Fair Queuing"; + + public static String[] SchedulingPolicies = {FCFS, STATIC, WFQ}; + + private int schedulingPolicy = 0; + + public NCSwitch() { + } + + public void setSchedulingPolicy(int _sp) { + schedulingPolicy = _sp; + } + + public int getSchedulingPolicy() { + return schedulingPolicy; + } + + public static String getStringSchedulingPolicy(int sp) { + return SchedulingPolicies[sp]; + } + + public static int getFromStringSchedulingPolicy(String _sp) { + for(int i=0; i<SchedulingPolicies.length; i++) { + if (SchedulingPolicies[i].compareTo(_sp) == 0) { + return i; + } + } + + return -1; + } + + +} \ No newline at end of file diff --git a/src/nc/NCTraffic.java b/src/nc/NCTraffic.java new file mode 100755 index 0000000000000000000000000000000000000000..2a375c1b5324a5579e3dfc6e6b90c8e2f9cc6b4b --- /dev/null +++ b/src/nc/NCTraffic.java @@ -0,0 +1,63 @@ +/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +* +* ludovic.apvrille AT enst.fr +* +* This software is a computer program whose purpose is to allow the +* edition of TURTLE analysis, design and deployment diagrams, to +* allow the generation of RT-LOTOS or Java code from this diagram, +* and at last to allow the analysis of formal validation traces +* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP +* from INRIA Rhone-Alpes. +* +* This software is governed by the CeCILL license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL +* license as circulated by CEA, CNRS and INRIA at the following URL +* "http://www.cecill.info". +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* In this respect, the user's attention is drawn to the risks associated +* with loading, using, modifying and/or developing or reproducing the +* software by the user in light of its specific status of free software, +* that may mean that it is complicated to manipulate, and that also +* therefore means that it is reserved for developers and experienced +* professionals having in-depth computer knowledge. Users are therefore +* encouraged to load and test the software's suitability as regards their +* requirements in conditions enabling the security of their systems and/or +* data to be ensured and, more generally, to use and operate it in the +* same conditions as regards security. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL license and that you accept its terms. +* +* /** +* Class NCLinkedElement +* Creation: 14/11/2008 +* @version 1.0 14/11/2008 +* @author Ludovic APVRILLE +* @see +*/ + +package nc; + + + +public class NCTraffic extends NCElement { + private int periodicity; + + public NCTraffic() {} + + public void setPeriodicity(int _periodicity) { + periodicity = _periodicity; + } + + + public int getPeriodicity() { + return periodicity; + } +} \ No newline at end of file diff --git a/src/ui/MainGUI.java b/src/ui/MainGUI.java index 40c101a4d3d8207ba903c16ba3892c4ed5872357..71d7cf2e0087da7fae008d1485cee74164c535c2 100755 --- a/src/ui/MainGUI.java +++ b/src/ui/MainGUI.java @@ -89,6 +89,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { public static boolean tpnOn; public static boolean osOn; public static boolean uppaalOn; + public static boolean ncOn; public final static int LOTOS = 0; public final static int RT_LOTOS = 1; @@ -237,14 +238,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { //private int selectedAction = -1; - public MainGUI(boolean _systemcOn, boolean _lotosOn, boolean _proactiveOn, boolean _tpnOn, boolean _osOn, boolean _uppaalOn) { + public MainGUI(boolean _systemcOn, boolean _lotosOn, boolean _proactiveOn, boolean _tpnOn, boolean _osOn, boolean _uppaalOn, boolean _ncOn) { systemcOn = _systemcOn; lotosOn = _lotosOn; proactiveOn = _proactiveOn; tpnOn = _tpnOn; osOn = _osOn; uppaalOn = _uppaalOn; - + ncOn = _ncOn; } @@ -1182,6 +1183,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { ((TURTLEPanel)tabs.elementAt(tabs.size()-1)).tabbedPane.setSelectedIndex(0); mainTabbedPane.setSelectedIndex(tabs.size()-1); } + + public void newNCDesign() { + System.out.println("NEW NC DESIGN"); + //addTURTLEOSDesignPanel("TURTLE-OS Design", -1); + //((TURTLEPanel)tabs.elementAt(tabs.size()-1)).tabbedPane.setSelectedIndex(0); + //mainTabbedPane.setSelectedIndex(tabs.size()-1); + } public void newProactiveDesign() { //System.out.println("NEW DESIGN"); @@ -5289,7 +5297,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { private MainGUI mgui; private JPopupMenu menu; - private JMenuItem rename, remove, moveRight, moveLeft, newDesign, newAnalysis, newDeployment, newRequirement, newTMLDesign, newTMLComponentDesign, newTMLArchi, newProactiveDesign, newTURTLEOSDesign, sort, clone; + private JMenuItem rename, remove, moveRight, moveLeft, newDesign, newAnalysis, newDeployment, newRequirement, newTMLDesign, newTMLComponentDesign, newTMLArchi, newProactiveDesign, newTURTLEOSDesign, newNCDesign, sort, clone; public PopupListener(MainGUI _mgui) { mgui = _mgui; @@ -5331,6 +5339,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { newTMLArchi = createMenuItem("New DIPLODOCUS Architecture"); newProactiveDesign = createMenuItem("New Proactive Design"); newTURTLEOSDesign = createMenuItem("New TURTLE-OS Design"); + newNCDesign = createMenuItem("New Network Calculus Design"); menu = new JPopupMenu("TURTLE analysis, design and deployment / DIPLODOCUS design / Proactive design"); menu.add(moveLeft); @@ -5375,6 +5384,11 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { menu.add(newTMLComponentDesign); menu.add(newTMLArchi); } + + if (ncOn) { + menu.addSeparator(); + menu.add(newNCDesign); + } } @@ -5452,6 +5466,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { mgui.newProactiveDesign(); } else if (ac.equals("New TURTLE-OS Design")) { mgui.newTURTLEOSDesign(); + } else if (e.getSource() == newNCDesign) { + mgui.newNCDesign(); } } };