From 4202670345ce1fc3ab944a1e18115fed0cf968a9 Mon Sep 17 00:00:00 2001 From: Daniel Knorreck <daniel.knorreck@telecom-paristech.fr> Date: Wed, 15 Dec 2010 17:06:10 +0000 Subject: [PATCH] --- .../c++av/src_simulator/app/AvState.cpp | 9 ++++----- simulators/c++av/src_simulator/app/AvTimer.h | 8 ++++---- .../c++av/src_simulator/app/AvTransition.cpp | 20 +++++++++---------- .../src_simulator/sim/EventQueueCallback.h | 4 ++-- .../c++av/src_simulator/sim/Simulator.cpp | 2 +- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/simulators/c++av/src_simulator/app/AvState.cpp b/simulators/c++av/src_simulator/app/AvState.cpp index 9e47c87e27..2afe2d7dc4 100644 --- a/simulators/c++av/src_simulator/app/AvState.cpp +++ b/simulators/c++av/src_simulator/app/AvState.cpp @@ -49,21 +49,20 @@ AvState::~AvState(){ } AvNode* AvState::prepare(bool iControlTransfer){ - //if _lastControlTransfer==true set actual cmd in block to this one and call execute - std::cout<< "prepare " << _name << "\n"; + //std::cout<< "prepare " << _name << "\n"; _lastControlTransfer=iControlTransfer; if(_lastControlTransfer){ AvTransition* directAccessTrans = determineDirectAccessTrans(); if (directAccessTrans!=0){ - std::cout<< _name << " go on to next\n"; + //std::cout<< _name << " go on to next\n"; return directAccessTrans->prepare(true); } - std::cout<< "prepare transitions " << _name << "\n"; + //std::cout<< "prepare transitions " << _name << "\n"; _block->setCurrCommand(this); for (unsigned int i=0; i<_nbOfOutgoingTrans; i++) _outgoingTrans[i]->prepare(false); } - std::cout<< "end prepare " << _name << "\n"; + //std::cout<< "end prepare " << _name << "\n"; return this; } diff --git a/simulators/c++av/src_simulator/app/AvTimer.h b/simulators/c++av/src_simulator/app/AvTimer.h index 59fab5f170..9b7049bb8b 100644 --- a/simulators/c++av/src_simulator/app/AvTimer.h +++ b/simulators/c++av/src_simulator/app/AvTimer.h @@ -51,14 +51,14 @@ public: } void set(AVTTime iSetTime){ - std::cout << "set timer\n"; + //std::cout << "set timer\n"; _expired=false; registerEventIn(iSetTime); - std::cout << "end set timer\n"; + //std::cout << "end set timer\n"; } void reset(){ - std::cout << "reset timer\n"; + //std::cout << "reset timer\n"; cancelEvent(); } @@ -67,7 +67,7 @@ public: } void eventQCallback(){ - std::cout << "timer expired\n"; + //std::cout << "timer expired\n"; _expired=true; } diff --git a/simulators/c++av/src_simulator/app/AvTransition.cpp b/simulators/c++av/src_simulator/app/AvTransition.cpp index 0851ca26b1..20de25721e 100644 --- a/simulators/c++av/src_simulator/app/AvTransition.cpp +++ b/simulators/c++av/src_simulator/app/AvTransition.cpp @@ -50,32 +50,32 @@ AvTransition::~AvTransition(){ AvNode* AvTransition::prepare(bool iControlTransfer){ _lastControlTransfer=iControlTransfer; - std::cout << "trans prepare 1\n"; + //std::cout << "trans prepare 1\n"; if (_lastControlTransfer){ - std::cout << "trans prepare 2\n"; + //std::cout << "trans prepare 2\n"; _block->setCurrCommand(this); if (_actionFunc!=0) (_block->*_actionFunc)(); } - std::cout << "trans prepare 3\n"; + //std::cout << "trans prepare 3\n"; if(_condFunc!=0 && (_block->*_condFunc)()==0){ _state=DISABLED; }else{ - std::cout << "trans prepare 4\n"; + //std::cout << "trans prepare 4\n"; AVTTime aTime2Wait = myrand(_afterMin, _afterMax); if (aTime2Wait==0){ - std::cout << "trans prepare 5\n"; + //std::cout << "trans prepare 5\n"; _computeFor = myrand(_computeMin, _computeMax); if(_computeFor==0){ - std::cout << "trans prepare 5a\n"; + //std::cout << "trans prepare 5a\n"; _state = WAIT4CMD; return _outgoingCmd->prepare(_lastControlTransfer); }else{ - std::cout << "trans prepare 5b\n"; + //std::cout << "trans prepare 5b\n"; //registerEventIn(_computeFor); _state = PREPCOMP; } }else{ - std::cout << "trans prepare 6\n"; + //std::cout << "trans prepare 6\n"; registerEventIn(aTime2Wait); _state = WAIT4AFTER; } @@ -149,8 +149,8 @@ std::string AvTransition::toString() const{ } bool AvTransition::directExecution(){ - std::cout << "let's crash\n"; + //std::cout << "let's crash\n"; bool anErg = !(_afterMin!=0 || _afterMax!=0 || (_actionFunc==0 && _computeMin==0 && _computeMax==0 && !_outgoingCmd->directExecution()) || (_condFunc!=0 && (_block->*_condFunc)()==0)); - std::cout << "not crashed\n"; + //std::cout << "not crashed\n"; return anErg; } diff --git a/simulators/c++av/src_simulator/sim/EventQueueCallback.h b/simulators/c++av/src_simulator/sim/EventQueueCallback.h index 644b9435cc..000a3a89fa 100644 --- a/simulators/c++av/src_simulator/sim/EventQueueCallback.h +++ b/simulators/c++av/src_simulator/sim/EventQueueCallback.h @@ -62,9 +62,9 @@ protected: } void registerEventIn(AVTTime iTime){ - std::cout << "register event in " << _simulator << "\n"; + //std::cout << "register event in " << _simulator << "\n"; _simulator->registerEvent(EvtQueueNode(this, iTime + _simulator->getSimulationTime(), _evtID)); - std::cout << "register event in end\n"; + //std::cout << "register event in end\n"; } void cancelEvent(){ diff --git a/simulators/c++av/src_simulator/sim/Simulator.cpp b/simulators/c++av/src_simulator/sim/Simulator.cpp index 51e200e623..05b82f5c86 100644 --- a/simulators/c++av/src_simulator/sim/Simulator.cpp +++ b/simulators/c++av/src_simulator/sim/Simulator.cpp @@ -52,7 +52,7 @@ Simulator::~Simulator(){ //} void Simulator::registerEvent(const EvtQueueNode &iNode){ - std::cout << "evt queue register event for time: " << iNode.time << "\n"; + //std::cout << "evt queue register event for time: " << iNode.time << "\n"; _evtQueue.push(iNode); } -- GitLab