From 8d3e76eae334a22040bd505841c18be3627c42fb Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Thu, 13 Oct 2011 08:16:25 +0000 Subject: [PATCH] DIPLODOCUS: Bug on loss on requests --- executablecode/Makefile.src | 2 +- src/tmltranslator/TMLCommunicationElement.java | 5 +++++ src/ui/GTMLModeling.java | 4 ++-- src/ui/window/JDialogAvatarExecutableCodeGeneration.java | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/executablecode/Makefile.src b/executablecode/Makefile.src index 6fd0a8b4dc..8eef782972 100755 --- a/executablecode/Makefile.src +++ b/executablecode/Makefile.src @@ -1 +1 @@ -SRCS = generated_src/main.c generated_src/PageLoader.c generated_src/UserModel.c generated_src/DisplayDriver.c generated_src/EReaderController.c \ No newline at end of file +SRCS = generated_src/main.c generated_src/VentricularController.c generated_src/Heart.c generated_src/ObservingSystem.c generated_src/Chronometer_Observer2.c generated_src/Chronometer_Observer1.c generated_src/PropLRI_PropHRI_Observer.c generated_src/PropVRP.c \ No newline at end of file diff --git a/src/tmltranslator/TMLCommunicationElement.java b/src/tmltranslator/TMLCommunicationElement.java index 0115907323..5893a1cb99 100755 --- a/src/tmltranslator/TMLCommunicationElement.java +++ b/src/tmltranslator/TMLCommunicationElement.java @@ -45,6 +45,8 @@ knowledge of the CeCILL license and that you accept its terms. package tmltranslator; +import myutil.*; + public abstract class TMLCommunicationElement extends TMLElement { @@ -63,6 +65,9 @@ public abstract class TMLCommunicationElement extends TMLElement { // No maxNbOfLoss -> set it to -1 public void setLossy(boolean _isLossy, int _percentage, int _maxNbOfLoss) { + if (_isLossy) { + TraceManager.addDev("***** Setting lossy " + this + " precentage = " + _percentage + " maxLoss = " + _maxNbOfLoss); + } isLossy = _isLossy; lossPercentage = _percentage; maxNbOfLoss = _maxNbOfLoss; diff --git a/src/ui/GTMLModeling.java b/src/ui/GTMLModeling.java index 9bfe2868fc..eaa230961a 100755 --- a/src/ui/GTMLModeling.java +++ b/src/ui/GTMLModeling.java @@ -977,8 +977,8 @@ public class GTMLModeling { request.addOriginTask(tt2); //TraceManager.addDev("LOSS?"); if (port2.isLossy()) { - //TraceManager.addDev("LOSS***** Lossy request port"); - request.setLossy(true, port1.getLossPercentage(), port1.getMaxNbOfLoss()); + TraceManager.addDev("LOSS***** Lossy request port" + port2.getLossPercentage() + " maxLoss=" + port2.getMaxNbOfLoss()); + request.setLossy(true, port2.getLossPercentage(), port2.getMaxNbOfLoss()); } } diff --git a/src/ui/window/JDialogAvatarExecutableCodeGeneration.java b/src/ui/window/JDialogAvatarExecutableCodeGeneration.java index 1c4a959de0..bb5975b11d 100644 --- a/src/ui/window/JDialogAvatarExecutableCodeGeneration.java +++ b/src/ui/window/JDialogAvatarExecutableCodeGeneration.java @@ -122,7 +122,7 @@ public class JDialogAvatarExecutableCodeGeneration extends javax.swing.JFrame im protected JComboBox versionCodeGenerator, units; protected JButton showSimulationTrace; - private static int selectedUnit = 2; + private static int selectedUnit = 1; private Thread t; -- GitLab