Commit f270ba6b authored by apvrille's avatar apvrille
Browse files

Adding the notion of Vc to graphical channels

parent 14dd1056
......@@ -82,6 +82,8 @@ public class TMLChannel extends TMLCommunicationElement {
private String CR = "\n";
private String SP = " ";
private int priority;
private int vc;
public ArrayList<TMLTask> originalOriginTasks = new ArrayList<TMLTask>();
public ArrayList<TMLTask> originalDestinationTasks = new ArrayList<TMLTask>();
......@@ -187,6 +189,13 @@ public class TMLChannel extends TMLCommunicationElement {
public int getNumberOfSamples() { return nbOfSamples;}
public void setVC(int vc) {
this.vc = vc;
}
public int getVC() { return vc;}
public TMLTask getDestinationTask(int index) {
return destinationTasks.get(index);
}
......
......@@ -908,6 +908,7 @@ public class GTMLModeling {
channel.setMax(port1.getMax());
channel.ports.add(port1);
channel.ports.add(port2);
channel.setVC(port1.getVC());
if (port1.isBlocking() && port2.isBlocking()) {
channel.setType(TMLChannel.BRBW);
} else if (!port1.isBlocking() && port2.isBlocking()) {
......
......@@ -744,6 +744,7 @@ public class JDialogTMLCompositePort extends JDialogBase implements ActionListen
lossPercentageText.setEnabled(origin.getSelectedIndex() == 0);
maxNbOfLossText.setEnabled(origin.getSelectedIndex() == 0);
lossPercentageLabel.setEnabled(origin.getSelectedIndex() == 0);
vcText.setEnabled(origin.getSelectedIndex() == 0);
maxNbOfLossLabel.setEnabled(origin.getSelectedIndex() == 0);
if (confCheckBox.isSelected() || authCheckBox.isSelected()) {
refReq.setEnabled(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment