From 536c0d72615d94e10d50d947319ef07925ff04d0 Mon Sep 17 00:00:00 2001 From: yfr Date: Tue, 20 Jul 2004 10:03:12 +0000 Subject: [PATCH] DCQ:prepare 2.0.0 --- idl/AddComponent.idl | 1 - idl/DataStreamComponent.idl | 76 - idl/FactorialComponent.idl | 1 - idl/Makefile.in | 43 +- resources/COMPONENTCatalog.xml | 3095 +++++++---------- src/AddComponent/AddComponent_Impl.cxx | 12 +- .../DataStreamComponent_CheckOfUndefined.cxx | 37 - .../DataStreamComponent_Impl.cxx | 160 - .../DataStreamComponent_Impl.hxx | 106 - src/DataStreamComponent/Makefile.in | 60 - src/DivComponent/DivComponent.cxx | 2 +- src/Makefile.in | 7 +- src/MulComponent/MulComponent.cxx | 2 +- src/SubComponent/SubComponent.cxx | 2 +- src/SyrComponent/COMPONENT_shared_modules.py | 1 - src/SyrComponent/SyrComponent_Impl.cxx | 38 +- 16 files changed, 1371 insertions(+), 2272 deletions(-) delete mode 100644 idl/DataStreamComponent.idl delete mode 100644 src/DataStreamComponent/DataStreamComponent_CheckOfUndefined.cxx delete mode 100644 src/DataStreamComponent/DataStreamComponent_Impl.cxx delete mode 100644 src/DataStreamComponent/DataStreamComponent_Impl.hxx delete mode 100644 src/DataStreamComponent/Makefile.in diff --git a/idl/AddComponent.idl b/idl/AddComponent.idl index 9806f9f..08b8ab3 100644 --- a/idl/AddComponent.idl +++ b/idl/AddComponent.idl @@ -35,7 +35,6 @@ module SuperVisionTest { interface AddComponent : Engines::Component { Adder Addition() ; double Add( in double x , in double y , out double z ) ; - long Sigma( in long n ) ; double LastResult() ; }; diff --git a/idl/DataStreamComponent.idl b/idl/DataStreamComponent.idl deleted file mode 100644 index ebbe279..0000000 --- a/idl/DataStreamComponent.idl +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DataStreamComponent.idl -// Author : Jean Rahuel -// $Header: - -#ifndef _DATASTREAMCOMPONENT_IDL -#define _DATASTREAMCOMPONENT_IDL - -#include "SALOME_Component.idl" - -module DataStreamComponent { - - interface DataStream ; - - interface DataStreamFactory : Engines::Component { - - // DataStreamPorts Setxy istream(INTEGER, in, T), ostream(INTEGER, out, T) - void Setxy( in long x , in long y ) ; - - void Getxy( out long x , out long y ) ; - - // DataStreamPorts Add istream(INTEGER, in, I), ostream(INTEGER, out, I), OStream(INTEGER, out, I ) - void Add( in long x , in long y , out long z ) ; - - // DataStreamPorts Sub istream(INTEGER, in, I), Istream(INTEGER, in, I) - void Sub( in long x , in long y , out long z ) ; - - void Mul( in long x , in long y , out long z ) ; - - // DataStreamPorts Div ostream(INTEGER, out, I) - void Div( in long x , in long y , out long z ) ; - - DataStream NewDataStream() ; - - }; - - interface DataStream : Engines::Component { - - // DataStreamPorts StreamSetxy istream(INTEGER, in, T), ostream(INTEGER, out, T) - void StreamSetxy( in long x , in long y ) ; - - void StreamGetxy( out long x , out long y ) ; - - // DataStreamPorts StreamAdd istream(INTEGER, in, I), ostream(INTEGER, out, I), OStream(INTEGER, out, I ) - void StreamAdd( in long x , in long y , out long z ) ; - // DataStreamPorts StreamSub istream(INTEGER, in, I), Istream(INTEGER, in, I) - void StreamSub( in long x , in long y , out long z ) ; - void StreamMul( in long x , in long y , out long z ) ; - // DataStreamPorts StreamDiv ostream(INTEGER, out, I) - void StreamDiv( in long x , in long y , out long z ) ; - - }; - -} ; - -#endif diff --git a/idl/FactorialComponent.idl b/idl/FactorialComponent.idl index 8ed5ff2..6ac4439 100644 --- a/idl/FactorialComponent.idl +++ b/idl/FactorialComponent.idl @@ -29,7 +29,6 @@ module SuperVisionTest { interface FactorialComponent : Engines::Component { long eval(in long n); - long sigma(in long n); }; }; diff --git a/idl/Makefile.in b/idl/Makefile.in index cf7ccbd..bf01242 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -1,27 +1,8 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# - # +# generate dependencies for idl file : # -# File : Makefile.in -# Module : idl + +# source path top_srcdir=@top_srcdir@ top_builddir=.. srcdir=@srcdir@ @@ -30,15 +11,15 @@ VPATH=.:${KERNEL_ROOT_DIR}/idl/salome @COMMENCE@ IDL_FILES = \ - AddComponent.idl \ - DivComponent.idl \ - FactorialComponent.idl \ - MulComponent.idl \ - SubComponent.idl \ - SyrComponent.idl \ - SyrControlComponent.idl \ - TypesCheck.idl \ - DataStreamComponent.idl + AddComponent.idl \ + MulComponent.idl \ + SyrControlComponent.idl \ + DivComponent.idl \ + SubComponent.idl \ + FactorialComponent.idl \ + SyrComponent.idl \ + TypesCheck.idl \ + Calculator.idl PY_CLIENT_IDL = $(IDL_FILES) diff --git a/resources/COMPONENTCatalog.xml b/resources/COMPONENTCatalog.xml index e88a350..1a8488f 100644 --- a/resources/COMPONENTCatalog.xml +++ b/resources/COMPONENTCatalog.xml @@ -1,5 +1,6 @@ - + + @@ -10,1312 +11,1350 @@ - - AddComponent - SuperVisionTestAdd - SuperVisionTest - MTJ - 1.0 - - 0 - - AddComponent - + ... - - - Addition - MTJ - 1.0 - Floating add - 1 - - - - SuperVisionTest::Adder - Adder - Adder object - - - - - Add - MTJ - 1.0 - Floating add - 1 - - - double - x - First number - - - double - y - Second number - - - - - double - FuncValue - Substract result - - - double - z - Addition result - - - - - Sigma - JR - 1.0 - Sigma - 0 - - - long - n - - - - - - long - f - result n(n+1)/2 - - - - - Adder - + ... - - - Add - MTJ - 1.0 - Floating add - 1 - 0 - - - SuperVisionTest::Adder - Adder - Adder Object - - - double - x - First number - - - double - y - Second number - - - - - double - FuncValue - Substract result - - - double - z - Addition result - - - - - AddAndCompare - MTJ - 1.0 - Floating add - 1 - 0 - - - SuperVisionTest::Adder - Adder - Adder Object - - - double - x - First number - - - double - y - Second number - - - SuperVisionTest::Adder - anOtherAdder - Adder Object - - - - - double - FuncValue - Substract result - - - double - z - Addition result - - - - - SetLastResult - MTJ - 1.0 - set the last result field - 1 - 0 - - - SuperVisionTest::Adder - Adder - Adder Object - - - double - z - number - - - - - - LastResult - MTJ - 1.0 - get the last result field - 1 - 0 - - - SuperVisionTest::Adder - Adder - Adder Object - - - - - double - z - number - - - - - - + + AddComponent + AddComponent + SuperVisionTest + MTJ + 1.0 + Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py + 0 + + + AddComponent + + ... + + + + + Addition + MTJ + 1.0 + Floating add + 1 + + + + + + SuperVisionTest::Adder + Adder + Adder object + + + + + + Add + MTJ + 1.0 + Floating add + 1 + + + + double + x + First number + + + double + y + Second number + + + + + double + FuncValue + Substract result + + + double + z + Addition result + + + + + Sigma + JR + 1.0 + Sigma + 0 + + + + long + n + + + + + + long + f + result n(n+1)/2 + + + + + Adder + + ... + + + + + Add + MTJ + 1.0 + Floating add + 1 + 0 + + + + SuperVisionTest::Adder + Adder + Adder Object + + + double + x + First number + + + double + y + Second number + + + + + double + FuncValue + Substract result + + + double + z + Addition result + + + + + + AddAndCompare + MTJ + 1.0 + Floating add + 1 + 0 + + + + SuperVisionTest::Adder + Adder + Adder Object + + + double + x + First number + + + double + y + Second number + + + SuperVisionTest::Adder + anOtherAdder + Adder Object + + + + + double + FuncValue + Substract result + + + double + z + Addition result + + + + + + SetLastResult + MTJ + 1.0 + set the last result field + 1 + 0 + + + + SuperVisionTest::Adder + Adder + Adder Object + + + double + z + number + + + + + + + + LastResult + MTJ + 1.0 + get the last result field + 1 + 0 + + + + SuperVisionTest::Adder + Adder + Adder Object + + + + + double + z + number + + + + + + - - SubComponent - SuperVisionTestSub - SuperVisionTest - MTJ - 1.0 - Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py - 0 - - SubComponent - - ... - - - Sub - MTJ - 1.0 - Floating substract - 1 - - - double - x - First number - - - double - y - Second number - - - - - double - z - Substraction result - - - - - - + + SubComponent + SubComponent + SuperVisionTest + MTJ + 1.0 + Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py + 0 + + + SubComponent + - ... + + + + + Sub + MTJ + 1.0 + Floating substract + 1 + + + + double + x + First number + + + double + y + Second number + + + + + double + z + Substraction result + + + + + + - - MulComponent - SuperVisionTestMul - SuperVisionTest - MTJ - 1.0 - Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py - 0 - - MulComponent - * ... - - - Mul - MTJ - 1.0 - Float multiply - 1 - - - double - x - First number - - - double - y - Second number - - - - - double - z - Multiplication result - - - - - - + + MulComponent + MulComponent + SuperVisionTest + MTJ + 1.0 + Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py + 0 + + + MulComponent + * ... + + + + + Mul + MTJ + 1.0 + Float multiply + 1 + + + + double + x + First number + + + double + y + Second number + + + + + double + z + Multiplication result + + + + + + - - DivComponent - SuperVisionTestDiv - SuperVisionTest - MTJ - 1.0 - Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py - 0 - - DivComponent - / ... - - - Div - MTJ - 1.0 - Floating divide - 1 - - - double - x - First number - - - double - y - Second number - - - - - double - z - Division result - - - - - - + + DivComponent + DivComponent + SuperVisionTest + MTJ + 1.0 + Test SuperVision SALOME/src/SALOME_SWIG/supervisionexample[1].py + 0 + + + DivComponent + / ... + + + + + Div + MTJ + 1.0 + Floating divide + 1 + + + + double + x + First number + + + double + y + Second number + + + + + double + z + Division result + + + + + + - SyrComponent - SuperVisionTestSyr - SuperVisionTest - JR - - SuperVisionTest - 1 - - - - SyrComponent - - - - C_ISEVEN - - - - 0 - - - long - anInteger - - - - - - long - BoolEven - - - - - - C_ISONE - - - - 0 - - - long - anInteger - - - - - - long - BoolOne - - - - - - C_M3 - - - - 0 - - - long - anOddInteger - - - - - - long - anInteger - - - - - - C_M3P1 - - - - 0 - - - long - anOddInteger - - - - - - long - anEvenInteger - - - - - - C_DIV2 - - - - 0 - - - long - anEvenInteger - - - - - - long - anInteger - - - - - - C_INCR - - - - 0 - - - long - aCount - - - - - - long - aNewCount - - - - - - C_MIN - - - - 0 - - - long - aMinVal - - - - long - anInteger - - - - - - long - aNewMinVal - - - - - - C_MAX - - - - 0 - - - long - aMaxVal - - - - long - anInteger - - - - - - long - aNewMaxVal - - - - - - C_LISTOFSYR - - - - 0 - - - - ListOfSyr - aListOfSyr - - - - - - C_AVERAGE - - - - 0 - - - ListOfSyr - aListOfSyr - - - - long - anInteger - - - - long - aCount - - - - - - ListOfSyr - aNewListOfSyr - - - - double - anAverage - - - - - - Init - - - - 0 - - - long - anOddInteger - - - - - - Syr - aSyracuse - - - - - - Syr - - - - Count - - - - 0 - - - Syr - aSyracuse - - - - - - long - aCount - - - - - - Current - - - - 0 - - - Syr - aSyracuse - - - - - - long - aCurrent - - - - - - IsEven - - - - 0 - - - Syr - aSyracuse - - - - - - long - BoolEven - - - - - - IsOne - - - - 0 - - - Syr - aSyracuse - - - - - - long - BoolOne - - - - - - M3p1 - - - - 0 - - - Syr - aSyracuse - - - - - - - Div2 - - - - 0 - - - Syr - aSyracuse - - - - - - - Incr - - - - 0 - - - Syr - aSyracuse - - - - - - - - + SyrComponent + SyrComponent + SuperVisionTest + JR + + SuperVisionTest + 1 + + + + SyrComponent + + + + C_ISEVEN + + + + 0 + + + long + anInteger + + + + + + long + BoolEven + + + + + + C_ISONE + + + + 0 + + + long + anInteger + + + + + + long + BoolOne + + + + + + C_M3 + + + + 0 + + + long + anOddInteger + + + + + + long + anInteger + + + + + + C_M3P1 + + + + 0 + + + long + anOddInteger + + + + + + long + anEvenInteger + + + + + + C_DIV2 + + + + 0 + + + long + anEvenInteger + + + + + + long + anInteger + + + + + + C_INCR + + + + 0 + + + long + aCount + + + + + + long + aNewCount + + + + + + C_MIN + + + + 0 + + + long + aMinVal + + + + long + anInteger + + + + + + long + aNewMinVal + + + + + + C_MAX + + + + 0 + + + long + aMaxVal + + + + long + anInteger + + + + + + long + aNewMaxVal + + + + + + C_LISTOFSYR + + + + 0 + + + + + ListOfSyr + aListOfSyr + + + + + + C_AVERAGE + + + + 0 + + + ListOfSyr + aListOfSyr + + + + long + anInteger + + + + long + aCount + + + + + + ListOfSyr + aNewListOfSyr + + + + double + anAverage + + + + + + Init + + + + 0 + + + long + anOddInteger + + + + + + Syr + aSyracuse + + + + + + Syr + + + + Count + + + + 0 + + + Syr + aSyracuse + + + + + + long + aCount + + + + + + Current + + + + 0 + + + Syr + aSyracuse + + + + + + long + aCurrent + + + + + + IsEven + + + + 0 + + + Syr + aSyracuse + + + + + + long + BoolEven + + + + + + IsOne + + + + 0 + + + Syr + aSyracuse + + + + + + long + BoolOne + + + + + + M3p1 + + + + 0 + + + Syr + aSyracuse + + + + + + + + Div2 + + + + 0 + + + Syr + aSyracuse + + + + + + + + Incr + + + + 0 + + + Syr + aSyracuse + + + + + + + + + - - FactorialComponent - SuperVisionTestFactorial - SuperVisionTest - Malvagi, Tajchman - 1.0 - Factorial - 0 - - - FactorialComponent - No comment - - - eval - MT-FM - 1.0 - Factorial - 1 - - - long - n - - - - - - long - f - result - - - - - sigma - JR - 1.0 - Sigma - 0 - - - long - n - - - - - - long - f - result - - - - - - + + FactorialComponent + FactorialComponent + SuperVisionTest + Malvagi, Tajchman + 1.0 + Factorial + 0 + + + FactorialComponent + No comment + + + + + eval + MT-FM + 1.0 + Factorial + 1 + + + + long + n + + + + + + long + f + result + + + + + sigma + JR + 1.0 + Sigma + 0 + + + + long + n + + + + + + long + f + result + + + + + + - SyrControlComponent - SuperVisionTestSyrControl - SuperVisionTest - JR - - SuperVisionTest - 1 - - - - SyrControlComponent - - - - L_OneEven - - - - 0 - - - long - ValOne - - - - long - ValEven - - - - - - long - Finished - - - - long - Incr - - - - long - Even - - - - long - Odd - - - - - - C_NotOneIsEven - - - - 0 - - - - long - ValOne - - - - long - ValEven - - - - - - LOOPN - - - - 0 - - - long - InLoop - - - - long - NN - - - - long - KK - - - - long - min - - - - long - max - - - - - - long - OutLoop - - - - long - N - - - - long - K - - - - + SyrControlComponent + SyrControlComponent + SuperVisionTest + JR + + SuperVisionTest + 1 + + + + SyrControlComponent + + + + L_OneEven + + + + 0 + + + long + ValOne + + + + long + ValEven + + + + + + long + Finished + + + + long + Incr + + + + long + Even + + + + long + Odd + + + + - WHILENOTONE - - - - 0 - - - long - N - - - - - - long - OutLoop - - - - + C_NotOneIsEven + + + + 0 + + + + long + ValOne + + + + long + ValEven + + + + - IFNOTEVEN - - - - 0 - - - long - N - - - - - - long - Odd - - - - long - Even - - - - + LOOPN + + + + 0 + + + long + InLoop + + + + long + NN + + + + long + KK + + + + long + min + + + + long + max + + + + + + long + OutLoop + + + + long + N + + + + long + K + + + + + + WHILENOTONE + + + + 0 + + + long + N + + + + + + long + OutLoop + + + + + + IFNOTEVEN + + + + 0 + + + long + N + + + + + + long + Odd + + + + long + Even + + + + - LOOPi - - - - 0 - - - long - InLoop - - - - long - ii - - - - - - long - OutLoop - - - - long - i - - - - + LOOPi + + + + 0 + + + long + InLoop + + + + long + ii + + + + + + long + OutLoop + + + + long + i + + + + - WHILEEVEN - - - - 0 - - - long - N - - - - - - long - OutLoop - - - - + WHILEEVEN + + + + 0 + + + long + N + + + + + + long + OutLoop + + + + - + - - - TypesCheck - SuperVisionTestTypes - - - - - 1 - - - - TypesCheck - - - - StringCheck - - - - 0 - - - string - InString - - - - - - string - OutString - - - - - - BoolCheck - - - - 0 - - - boolean - InBool - - - - - - boolean - OutBool - - - - - - CharCheck - - - - 0 - - - char - InChar - - - - - - char - OutChar - - - - - - ShortCheck - - - - 0 - - - short - InShort - - - - - - short - OutShort - - - - - - LongCheck - - - - 0 - - - long - InLong - - - - - - long - OutLong - - - - - - FloatCheck - - - - 0 - - - float - InFloat - - - - - - float - OutFloat - - - - - - DoubleCheck - - - - 0 - - - double - InDouble - - - - - - double - OutDouble - - - - - - ObjRefCheck - - - - 0 - - - SuperVisionTest::Adder - InObjRef - - - - - - SuperVisionTest::Adder - OutObjRef - - - - - - MiscTypes - JR - 1.0 - Check of types - 1 - - - string - InString - - - - boolean - InBool - - - - char - InChar - - - - short - InShort - - - - long - InLong - - - - float - InFloat - - - - double - InDouble - - - - SuperVisionTest::Adder - InObjRef - - - - - - string - OutString - - - - boolean - OutBool - - - - char - OutChar - - - - short - OutShort - - - - long - OutLong - - - - float - OutFloat - - - - double - OutDouble - - - - SuperVisionTest::Adder - OutObjRef - - - - - - - - + + TypesCheck + TypesCheck + + + + + 1 + + + + TypesCheck + + + + StringCheck + + + + 0 + + + string + InString + + + + + + string + OutString + + + + + + BoolCheck + + + + 0 + + + boolean + InBool + + + + + + boolean + OutBool + + + + + + CharCheck + + + + 0 + + + char + InChar + + + + + + char + OutChar + + + + + + ShortCheck + + + + 0 + + + short + InShort + + + + + + short + OutShort + + + + + + LongCheck + + + + 0 + + + long + InLong + + + + + + long + OutLong + + + + + + FloatCheck + + + + 0 + + + float + InFloat + + + + + + float + OutFloat + + + + + + DoubleCheck + + + + 0 + + + double + InDouble + + + + + + double + OutDouble + + + + + + ObjRefCheck + + + + 0 + + + SuperVisionTest::Adder + InObjRef + + + + + + SuperVisionTest::Adder + OutObjRef + + + + + + + MiscTypes + JR + 1.0 + Check of types + 1 + + + + string + InString + + + + boolean + InBool + + + + char + InChar + + + + short + InShort + + + + long + InLong + + + + float + InFloat + + + + double + InDouble + + + + SuperVisionTest::Adder + InObjRef + + + + + + string + OutString + + + + boolean + OutBool + + + + char + OutChar + + + + short + OutShort + + + + long + OutLong + + + + float + OutFloat + + + + double + OutDouble + + + + SuperVisionTest::Adder + OutObjRef + + + + + + + Calculator @@ -1468,485 +1507,5 @@ - - - DataStreamFactory - DataStreamFactory - OTHER - jr - 1 - unknown - 1 - - - - DataStreamFactory - unknown - - - Setxy - jr - 1 - unknown - 0 - - - x - long - unknown - - - y - long - unknown - - - - - - istream - INTEGER - unknown - T - - - ostream - INTEGER - unknown - T - - - - - Getxy - jr - 1 - unknown - 0 - - - - x - long - unknown - - - y - long - unknown - - - - - - Add - jr - 1 - unknown - 0 - - - x - long - unknown - - - y - long - unknown - - - - - z - long - unknown - - - - - istream - INTEGER - unknown - I - - - ostream - INTEGER - unknown - I - - - OStream - INTEGER - unknown - I - - - - - Sub - jr - 1 - unknown - 0 - - - x - long - unknown - - - y - long - unknown - - - - - z - long - unknown - - - - - istream - INTEGER - unknown - I - - - Istream - INTEGER - unknown - I - - - - - Mul - jr - 1 - unknown - 0 - - - x - long - unknown - - - y - long - unknown - - - - - z - long - unknown - - - - - - Div - jr - 1 - unknown - 0 - - - x - long - unknown - - - y - long - unknown - - - - - z - long - unknown - - - - - ostream - INTEGER - unknown - I - - - - - NewDataStream - jr - 1 - unknown - 0 - - - - DataStream - DataStream - unknown - - - - - - DataStream - unknown - - - StreamSetxy - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - long - x - unknown - - - long - y - unknown - - - - - - istream - INTEGER - unknown - T - - - ostream - INTEGER - unknown - T - - - - - StreamGetxy - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - - - long - x - unknown - - - long - y - unknown - - - - - - StreamAdd - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - long - x - unknown - - - long - y - unknown - - - - - long - z - unknown - - - - - istream - INTEGER - unknown - I - - - ostream - INTEGER - unknown - I - - - OStream - INTEGER - unknown - I - - - - - StreamSub - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - long - x - unknown - - - long - y - unknown - - - - - long - z - unknown - - - - - istream - INTEGER - unknown - I - - - Istream - INTEGER - unknown - I - - - - - StreamMul - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - long - x - unknown - - - long - y - unknown - - - - - long - z - unknown - - - - - - StreamDiv - jr - 1 - unknown - 0 - 1 - - - objref - this - unknown - - - long - x - unknown - - - long - y - unknown - - - - - long - z - unknown - - - - - ostream - INTEGER - unknown - I - - - - - - - diff --git a/src/AddComponent/AddComponent_Impl.cxx b/src/AddComponent/AddComponent_Impl.cxx index 3574c08..491e79b 100644 --- a/src/AddComponent/AddComponent_Impl.cxx +++ b/src/AddComponent/AddComponent_Impl.cxx @@ -80,7 +80,7 @@ double AddComponent_Impl::Add( double x , double y , double & z ) { sendMessage(NOTIF_STEP, "AddComponent_Impl::Add is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( "AddComponent_Impl::Add( " << x << " , " << y << " , " << z << " ) returns " << (x - y) << " after " << S << " seconds" ) LastAddition = z ; @@ -107,7 +107,7 @@ double AddComponent_Impl::LastResult() { sendMessage(NOTIF_STEP, "AddComponent_Impl::LastResult is Computing"); int S; S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " AddComponent_Impl::LastResult" ); return LastAddition ; } @@ -165,7 +165,7 @@ double Adder_Impl::Add( double x , double y , double & z ) { sendMessage(NOTIF_STEP, "Adder_Impl::Add is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( "Adder_Impl::Add( " << x << " , " << y << " , " << z << " ) returns " << -(x - y) << " after " << S << " seconds" ) LastAddition = z ; @@ -182,7 +182,7 @@ double Adder_Impl::AddAndCompare( const double x , const double y , sendMessage(NOTIF_STEP, "Adder_Impl::AddAndCompare is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( "Adder_Impl::AddAndCompare( " << x << " , " << y << " , " << z << " ) returns " << -(x - y) << " after " << S << " seconds" ) LastAddition = z ; @@ -207,7 +207,7 @@ void Adder_Impl::SetLastResult( double z ) { sendMessage(NOTIF_STEP, "Adder_Impl::SetLastResult is Computing"); int S; S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); LastAddition = z ; endService( " Adder_Impl::SetLastResult" ); return ; @@ -218,7 +218,7 @@ void Adder_Impl::LastResult( double & z ) { sendMessage(NOTIF_STEP, "Adder_Impl::LastResult is Computing"); int S; S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); z = LastAddition ; endService( " Adder_Impl::LastResult" ); return ; diff --git a/src/DataStreamComponent/DataStreamComponent_CheckOfUndefined.cxx b/src/DataStreamComponent/DataStreamComponent_CheckOfUndefined.cxx deleted file mode 100644 index 05cfb16..0000000 --- a/src/DataStreamComponent/DataStreamComponent_CheckOfUndefined.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// SuperVisionTest DataStreamComponent : example of component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DataStreamComponent_CheckOfUndefined.cxx -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include - -#include "DataStreamComponent_Impl.hxx" - -int main(int argc, char **argv) { - return 0; -} - diff --git a/src/DataStreamComponent/DataStreamComponent_Impl.cxx b/src/DataStreamComponent/DataStreamComponent_Impl.cxx deleted file mode 100644 index 0cfff2a..0000000 --- a/src/DataStreamComponent/DataStreamComponent_Impl.cxx +++ /dev/null @@ -1,160 +0,0 @@ -// SuperVisionTest DataStreamComponent : example -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DataStreamComponent_Impl.cxx -// Author : Jean Rahuel -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include -#include -#include - -#include "DataStreamComponent_Impl.hxx" - -DataStreamFactory_Impl::DataStreamFactory_Impl( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - MESSAGE("DataStreamFactory_Impl::DataStreamFactory_Impl this " << hex << this << dec - << "activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ")" ) - _thisObj = this ; - _id = _poa->activate_object(_thisObj); -} - -DataStreamFactory_Impl::DataStreamFactory_Impl() { -} - -DataStreamFactory_Impl::~DataStreamFactory_Impl() { -} - -void DataStreamFactory_Impl::Setxy( const long x , const long y ) { - _x = x ; - _y = y ; -} - -void DataStreamFactory_Impl::Getxy( long & x , long & y ) { - x = _x ; - y = _y ; -} - -void DataStreamFactory_Impl::Add( const long x , const long y , long & z ) { - z = x+y ; -} -void DataStreamFactory_Impl::Sub( const long x , const long y , long & z ) { - z = x-y ; -} -void DataStreamFactory_Impl::Mul( const long x , const long y , long & z ) { - z = x*y ; -} -void DataStreamFactory_Impl::Div( const long x , const long y , long & z ) { - z = x/y ; -} - -DataStreamComponent::DataStream_ptr DataStreamFactory_Impl::NewDataStream() { - beginService( "DataStreamFactory_Impl::NewDataStream" ); - sendMessage(NOTIF_STEP, "DataStreamFactory_Impl creates DataStream_Impl"); - DataStream_Impl * myDataStream ; - myDataStream = new DataStream_Impl( _orb , _poa, _contId, - instanceName() , interfaceName() , - graphName() , nodeName() ) ; - DataStreamComponent::DataStream_var iobject ; - PortableServer::ObjectId * id = myDataStream->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = DataStreamComponent::DataStream::_narrow(obj) ; - endService( "DataStreamFactory_Impl::NewDataStream" ); - return DataStreamComponent::DataStream::_duplicate(iobject) ; -} - -extern "C" -{ - PortableServer::ObjectId * DataStreamFactoryEngine_factory - (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - MESSAGE("DataStreamFactoryEngine_factory DataStreamFactoryEngine (" - << instanceName << "," << interfaceName << "," << getpid() << ")"); - DataStreamFactory_Impl * myDataStreamFactory - = new DataStreamFactory_Impl(orb, poa, contId, instanceName, interfaceName); - return myDataStreamFactory->getId() ; - } -} - -DataStream_Impl::DataStream_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char * instanceName , - const char * interfaceName , - const char * graphName , - const char * nodeName ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - Names( graphName , nodeName ) ; - MESSAGE("DataStream_Impl::DataStream_Impl activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ") --> " - << hex << (void *) this << dec ) - beginService( "DataStream_Impl::DataStream_Impl" ); - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - sendMessage(NOTIF_STEP, "DataStream_Impl is Created"); - endService( "DataStream_Impl::DataStream_Impl" ); -} - -DataStream_Impl::DataStream_Impl() { -} - -DataStream_Impl::~DataStream_Impl() { - beginService( "DataStream_Impl::~DataStream_Impl" ); - endService( "DataStream_Impl::~DataStream_Impl" ); -} - -void DataStream_Impl::StreamSetxy( const long x , const long y ) { - _x = x ; - _y = y ; -} - -void DataStream_Impl::StreamGetxy( long & x , long & y ) { - x = _x ; - y = _y ; -} - -void DataStream_Impl::StreamAdd( const long x , const long y , long & z ) { - z = x+y ; -} -void DataStream_Impl::StreamSub( const long x , const long y , long & z ) { - z = x-y ; -} -void DataStream_Impl::StreamMul( const long x , const long y , long & z ) { - z = x*y ; -} -void DataStream_Impl::StreamDiv( const long x , const long y , long & z ) { - z = x/y ; -} - diff --git a/src/DataStreamComponent/DataStreamComponent_Impl.hxx b/src/DataStreamComponent/DataStreamComponent_Impl.hxx deleted file mode 100644 index 6998143..0000000 --- a/src/DataStreamComponent/DataStreamComponent_Impl.hxx +++ /dev/null @@ -1,106 +0,0 @@ -// SuperVisionTest DataStreamComponent : example of component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DataStreamComponent_Impl.hxx -// Author : Jean Rahuel -// Module : SuperVisionTest -// $Header: - -#ifndef _DATASTREAMINTERFACE_IMPL_HXX_ -#define _DATASTREAMINTERFACE_IMPL_HXX_ - -#include -#include CORBA_SERVER_HEADER(DataStreamComponent) -#include CORBA_SERVER_HEADER(SALOME_Component) -#include "SALOME_Component_i.hxx" - -class DataStreamFactory_Impl : public POA_DataStreamComponent::DataStreamFactory , - public Engines_Component_i { -public: - DataStreamFactory_Impl() ; - DataStreamFactory_Impl( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName); - - virtual ~DataStreamFactory_Impl(); - - virtual void Setxy( const long x , const long y ) ; - - virtual void Getxy( long & x , long & y ) ; - - virtual void Add( const long x , const long y , long & z ) ; - virtual void Sub( const long x , const long y , long & z ) ; - virtual void Mul( const long x , const long y , long & z ) ; - virtual void Div( const long x , const long y , long & z ) ; - - virtual DataStreamComponent::DataStream_ptr NewDataStream() ; - -private: - - long _x ; - long _y ; - -}; - -extern "C" - PortableServer::ObjectId * DataStreamFactoryEngine_factory - ( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName ) ; - - -class DataStream_Impl : public POA_DataStreamComponent::DataStream , - public Engines_Component_i { -public: - DataStream_Impl() ; - DataStream_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - const char * graphName , - const char * nodeName ); - - virtual ~DataStream_Impl(); - - virtual void StreamSetxy( const long x , const long y ) ; - - virtual void StreamGetxy( long & x , long & y ) ; - - virtual void StreamAdd( const long x , const long y , long & z ) ; - virtual void StreamSub( const long x , const long y , long & z ) ; - virtual void StreamMul( const long x , const long y , long & z ) ; - virtual void StreamDiv( const long x , const long y , long & z ) ; - -private: - - long _x ; - long _y ; - -}; - -#endif diff --git a/src/DataStreamComponent/Makefile.in b/src/DataStreamComponent/Makefile.in deleted file mode 100644 index d359713..0000000 --- a/src/DataStreamComponent/Makefile.in +++ /dev/null @@ -1,60 +0,0 @@ -# SUPERV DataStreamComponent : example of component -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Jean Rahuel -# Module : SUPERV -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = \ - DataStreamComponent_Impl.hxx - -# Libraries targets -LIB = libDataStreamFactoryEngine.la -LIB_SRC = \ - DataStreamComponent_Impl.cxx - -LIB_SERVER_IDL = SALOME_Component.idl \ - DataStreamComponent.idl - -# Executables targets -BIN = DataStreamComponent_CheckOfUndefined -BIN_SRC = -BIN_SERVER_IDL = - -CPPFLAGS+= $(PYTHON_INCLUDES) \ - -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS+= -lSalomeContainer -lSalomeNS -lOpUtil -lRegistry -lSalomeNotification -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace - -LDFLAGSFORBIN+= -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeContainer -lSalomeNS -lOpUtil -lRegistry -lSalomeNotification -lSALOMELocalTrace - -@CONCLUDE@ - diff --git a/src/DivComponent/DivComponent.cxx b/src/DivComponent/DivComponent.cxx index ab84e79..4a4522f 100644 --- a/src/DivComponent/DivComponent.cxx +++ b/src/DivComponent/DivComponent.cxx @@ -64,7 +64,7 @@ void DivComponentEngine::Div( double x , double y , double & z ) { sendMessage(NOTIF_STEP, "Div is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); sendMessage(NOTIF_TRACE, "Div is Much More Difficult Operation"); MESSAGE("DivComponentEngine::Div( " << x << " , " << y << " , " << z << " ) after " << S << " seconds" ) diff --git a/src/Makefile.in b/src/Makefile.in index c20e8ec..fd7b547 100755 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -21,16 +21,17 @@ # # File : Makefile.in # Author : Patrick GOLDBRONN (CEA) -# Module : COMPONENT -# $Header$ +# Module : SuperVisionTest +# $Header: top_srcdir=@top_srcdir@ top_builddir=.. srcdir=@srcdir@ VPATH=.:@srcdir@ + @COMMENCE@ -SUBDIRS = AddComponent DivComponent FactorialComponent MulComponent SubComponent SyrControlComponent SyrComponent TypesCheck DataStreamComponent CalculatorComponent +SUBDIRS = AddComponent DivComponent FactorialComponent MulComponent SubComponent SyrComponent SyrControlComponent TypesCheck CalculatorComponent @MODULE@ diff --git a/src/MulComponent/MulComponent.cxx b/src/MulComponent/MulComponent.cxx index 32d0bcd..1b4c41f 100644 --- a/src/MulComponent/MulComponent.cxx +++ b/src/MulComponent/MulComponent.cxx @@ -64,7 +64,7 @@ void MulComponentEngine::Mul( double x , double y , double & z ) { sendMessage(NOTIF_STEP, "Mul is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( "MulComponentEngine::Mul( " << x << " , " << y << " , " << z << " ) after " << S << " seconds" ) endService( " MulComponentEngine::Mul" ); diff --git a/src/SubComponent/SubComponent.cxx b/src/SubComponent/SubComponent.cxx index e5cd824..76ed6e1 100644 --- a/src/SubComponent/SubComponent.cxx +++ b/src/SubComponent/SubComponent.cxx @@ -64,7 +64,7 @@ void SubComponentEngine::Sub( double x , double y , double & z ) { sendMessage(NOTIF_STEP, "Sub is Computing"); S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( "SubComponentEngine::Sub( " << x << " , " << y << " , " << z << " ) after " << S << " seconds" ) endService( " SubComponentEngine::Sub" ); diff --git a/src/SyrComponent/COMPONENT_shared_modules.py b/src/SyrComponent/COMPONENT_shared_modules.py index 9e85b61..1dad963 100644 --- a/src/SyrComponent/COMPONENT_shared_modules.py +++ b/src/SyrComponent/COMPONENT_shared_modules.py @@ -9,7 +9,6 @@ print "============== import SuperVisionTest =======================" import SuperVisionTest -import DataStreamComponent # this function is required diff --git a/src/SyrComponent/SyrComponent_Impl.cxx b/src/SyrComponent/SyrComponent_Impl.cxx index c80e1b2..3c93ed7 100755 --- a/src/SyrComponent/SyrComponent_Impl.cxx +++ b/src/SyrComponent/SyrComponent_Impl.cxx @@ -64,7 +64,7 @@ long SyrComponent_Impl::C_ISEVEN( const long anInteger ) { beginService( " SyrComponent_Impl::C_ISEVEN" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISEVEN is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); RetVal = ( anInteger & 1 ) == 0 ; endService( " SyrComponent_Impl::C_ISEVEN" ); return RetVal ; @@ -75,7 +75,7 @@ long SyrComponent_Impl::C_ISONE( const long anOddInteger ) { beginService( " SyrComponent_Impl::C_ISONE" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISONE is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); RetVal = ( anOddInteger == 1 ) ; endService( " SyrComponent_Impl::C_ISONE" ); return RetVal ; @@ -85,7 +85,7 @@ long SyrComponent_Impl::C_M3( const long anOddInteger ) { beginService( " SyrComponent_Impl::C_M3" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3 is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " SyrComponent_Impl::C_M3" ); if ( C_ISEVEN( anOddInteger ) ) return 0 ; @@ -96,7 +96,7 @@ long SyrComponent_Impl::C_M3P1( const long anOddInteger ) { beginService( " SyrComponent_Impl::C_M3P1" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3P1 is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " SyrComponent_Impl::C_M3P1" ); if ( C_ISEVEN( anOddInteger ) ) return 0 ; @@ -107,7 +107,7 @@ long SyrComponent_Impl::C_DIV2( const long anEvenInteger ) { beginService( " SyrComponent_Impl::C_DIV2" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_DIV2 is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " SyrComponent_Impl::C_DIV2" ); if ( !C_ISEVEN( anEvenInteger ) ) return 0 ; @@ -118,7 +118,7 @@ long SyrComponent_Impl::C_INCR( const long aCount ) { beginService( " SyrComponent_Impl::C_INCR" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_INCR is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " SyrComponent_Impl::C_INCR" ); return ( aCount + 1 ) ; } @@ -127,7 +127,7 @@ long SyrComponent_Impl::C_MIN( const long aMinVal , const long anInteger ) { beginService( " SyrComponent_Impl::C_MIN" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MIN is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); int min = aMinVal ; if ( anInteger < min || aMinVal == 0 ) { min = anInteger ; @@ -145,7 +145,7 @@ long SyrComponent_Impl::C_MAX( const long aMaxVal , const long anInteger ) { beginService( " SyrComponent_Impl::C_MAX" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MAX is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); int max = aMaxVal ; if ( anInteger > max ) { max = anInteger ; @@ -163,7 +163,7 @@ SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_LISTOFSYR() { beginService( " SyrComponent_Impl::C_LISTOFSYR" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_LISTOFSYR is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); ListOfSyr_Impl * aNewListOfSyr = new ListOfSyr_Impl( _orb , _poa, _contId, instanceName() , interfaceName() , graphName() , nodeName() ) ; @@ -184,7 +184,7 @@ SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_AVERAGE( beginService( " SyrComponent_Impl::C_AVERAGE" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_AVERAGE is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); SuperVisionTest::SeqOfSyr * aSeqOfSyr = aListOfSyr->GetSeqOfSyr() ; int len = aSeqOfSyr->length() ; aSeqOfSyr->length( len + 1 ) ; @@ -208,7 +208,7 @@ SuperVisionTest::Syr_ptr SyrComponent_Impl::Init( const long anOddInteger ) { beginService( "SyrComponent_Impl::Init" ); sendMessage(NOTIF_STEP, "SyrComponent_Impl creates Syr_Impl"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); Syr_Impl * mySyr ; mySyr = new Syr_Impl( _orb , _poa, _contId, instanceName() , interfaceName() , @@ -310,7 +310,7 @@ long Syr_Impl::Initial() { beginService( " Syr_Impl::Initial" ); sendMessage(NOTIF_STEP, "Syr_Impl::Initial is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " Syr_Impl::Initial" ); return _InitialInteger ; } @@ -319,7 +319,7 @@ long Syr_Impl::Current() { beginService( " Syr_Impl::Current" ); sendMessage(NOTIF_STEP, "Syr_Impl::Current is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); endService( " Syr_Impl::Current" ); return _CurrentInteger ; } @@ -329,7 +329,7 @@ long Syr_Impl::IsEven() { beginService( " Syr_Impl::IsEven" ); sendMessage(NOTIF_STEP, "Syr_Impl::IsEven is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); RetVal = ( _CurrentInteger & 1 ) == 0 ; MESSAGE( " Syr_Impl::IsEven " << _CurrentInteger << " " << RetVal ); endService( " Syr_Impl::IsEven" ); @@ -341,7 +341,7 @@ long Syr_Impl::IsOne() { beginService( " Syr_Impl::IsOne" ); sendMessage(NOTIF_STEP, "Syr_Impl::IsOne is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); RetVal = ( _CurrentInteger == 1 ) ; MESSAGE( " Syr_Impl::IsOne " << _CurrentInteger << " " << RetVal ); endService( " Syr_Impl::IsOne" ); @@ -352,7 +352,7 @@ long Syr_Impl::Count() { beginService( " Syr_Impl::Count" ); sendMessage(NOTIF_STEP, "Syr_Impl::Count is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); MESSAGE( " Syr_Impl::Count " << _Count ); endService( " Syr_Impl::Count" ); return _Count ; @@ -362,7 +362,7 @@ void Syr_Impl::M3p1() { beginService( " Syr_Impl::M3p1" ); sendMessage(NOTIF_STEP, "Syr_Impl::M3p1 is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); if ( IsEven() ) _CurrentInteger = 0 ; else @@ -375,7 +375,7 @@ void Syr_Impl::Div2() { beginService( " Syr_Impl::Div2" ); sendMessage(NOTIF_STEP, "Syr_Impl::Div2 is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); if ( !IsEven() ) _CurrentInteger = 0 ; else @@ -388,7 +388,7 @@ void Syr_Impl::Incr() { beginService( " Syr_Impl::Incr" ); sendMessage(NOTIF_STEP, "Syr_Impl::Incr is Computing"); int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(1); + sleep(S); _Count = _Count + 1 ; MESSAGE( " Syr_Impl::Incr " << _Count ); endService( " Syr_Impl::Incr" ); -- 2.39.2