Skip to content
Snippets Groups Projects
Commit 5ba7c891 authored by Siyuan Niu's avatar Siyuan Niu
Browse files

daemon task change 2

parent 5f7a292c
No related branches found
No related tags found
1 merge request!233Daemon3
This commit is part of merge request !233. Comments created here will be created in the context of that merge request.
......@@ -859,9 +859,8 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
if(transLET!=0 && transLET->getCommand()->getTask()->getIsDaemon()==true){
if(transLET->getStartTime() >= deviceLET->getSimulatedTime()){
// std::cout<<"bigger time"<<std::endl;
bool isFinish=true;
if(_simComp->getNonDaemonTaskList().empty())
isFinish=false;
break;
for(TaskList::const_iterator i=_simComp->getNonDaemonTaskList().begin(); i != _simComp->getNonDaemonTaskList().end(); ++i){
// std::cout<<"non dameon task"<<(*i)->toString()<<" state is "<<(*i)->getState()<<(*i)->getCurrCommand()->toString()<<std::endl;
if((*i)->getState()!=3){
......@@ -1011,8 +1010,10 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){
}
bool aSimCompleted = ( transLET==0 && !_simComp->getStoppedOnAction());
if(isFinish==true)
if(isFinish==true){
// std::cout<<"terminated!!!"<<std::endl;
aSimCompleted = true;
}
if (aSimCompleted){
#ifdef LISTENERS_ENABLED
......
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