Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
799bd462
Commit
799bd462
authored
7 years ago
by
apvrille
Browse files
Options
Downloads
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/tmltranslator/TMLChannel.java
+4
-3
4 additions, 3 deletions
src/main/java/tmltranslator/TMLChannel.java
src/main/java/tmltranslator/TMLPort.java
+43
-15
43 additions, 15 deletions
src/main/java/tmltranslator/TMLPort.java
with
47 additions
and
18 deletions
src/main/java/tmltranslator/TMLChannel.java
+
4
−
3
View file @
799bd462
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/tmltranslator/TMLPort.java
+
43
−
15
View file @
799bd462
/* 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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment