Skip to content
Snippets Groups Projects
Commit 799bd462 authored by apvrille's avatar apvrille
Browse files

Merge branch 'master' of gitlab.enst.fr:mbe-tools/TTool

parents c0391c15 22b0900c
No related branches found
No related tags found
No related merge requests found
......@@ -464,7 +464,6 @@ public class TMLChannel extends TMLCommunicationElement {
return s;
}
// We assume the channel is a basic channel
public String toXML() {
TraceManager.addDev("Channel:" + this.toString());
String s = "<TMLCHANNEL ";
......@@ -474,6 +473,7 @@ public class TMLChannel extends TMLCommunicationElement {
s += "originport=\"" + originPort.getName() + "\" ";
s += "destinationtask=\"" + destinationTask.getName() + "\" ";
s += "destinationport=\"" + destinationPort.getName() + "\" ";
s += "dataFlowType=\"" + originPort.getDataFlowType() + "\" ";
}
if( isAForkChannel() ) {
s += "origintask=\"" + originTasks.get(0).getName() + "\" ";
......@@ -486,6 +486,7 @@ public class TMLChannel extends TMLCommunicationElement {
}
s += "destinationtask=\"" + destTask + "\" ";
s += "destinationport=\"" + destPort + "\" ";
s += "dataFlowType=\"" + originPort.getDataFlowType() + "\" ";
}
if (isAJoinChannel()) {
s += "destinationtask=\"" + destinationTasks.get(0).getName() + "\" ";
......@@ -500,10 +501,11 @@ public class TMLChannel extends TMLCommunicationElement {
}
s += "origintask=\"" + oriTask + "\" ";
s += "originport=\"" + oriPort + "\" ";
s += "dataFlowType=\"" + originPorts.get(0).getDataFlowType() + "\" ";
}
s += "isLossy=\"" + isLossy + "\" ";
s += "lossPercentage=\"" + lossPercentage + "\" ";
s += "lossPercentage=\"" + lossPercentage + "\" ";
s += "maxNbOfLoss=\"" + maxNbOfLoss + "\" ";
switch(type) {
case BRBW:
......@@ -518,7 +520,6 @@ public class TMLChannel extends TMLCommunicationElement {
}
s += "size=\"" + size + "\" ";
s += "max=\"" + max + "\" ";
s += " />\n";
return s;
}
......
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
* Andrea ENRICI, Nokia Bell Labs France
*
* ludovic.apvrille AT enst.fr
* andrea.enrici AT nokia-bell-labs.com
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
......@@ -37,47 +39,73 @@
*/
package tmltranslator;
/**
* Class TMLPort
* Creation: 16/02/2015
* @version 1.0 16/02/2015
* @author Ludovic APVRILLE
* @author Ludovic APVRILLE, Andrea ENRICI
*/
package tmltranslator;
import ui.tmlcompd.TMLCPrimitivePort;
public class TMLPort extends TMLElement {
private boolean prex;
private boolean postex;
private String associatedEvent;
private String associatedEvent;
private String dataFlowType;
public TMLPort( String _name, Object _referenceObject ) {
super( _name, _referenceObject );
dataFlowType = ( (TMLCPrimitivePort)referenceObject ).getDataFlowType();
public TMLPort(String _name, Object _referenceObject) {
super(_name, _referenceObject);
}
public void setPrex( boolean _prex ) {
prex = _prex;
}
public boolean isPrex() {
return prex;
}
public void setPostex( boolean _postex ) {
postex = _postex;
}
public boolean isPostex() {
return postex;
}
public void setAssociatedEvent( String _eventName ) {
associatedEvent = _eventName;
}
public void setAssociatedEvent( String _eventName ) {
public String getAssociatedEvent() {
return associatedEvent;
}
associatedEvent = _eventName;
}
public String getAssociatedEvent() {
return associatedEvent;
}
public String getDataFlowType() {
return dataFlowType;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment