Fixing simstartup

This commit is contained in:
stephb9959
2021-11-04 14:08:42 -07:00
parent e502dd7823
commit 7d6c9aee89
3 changed files with 6 additions and 24 deletions

View File

@@ -26,43 +26,25 @@ namespace OpenWifi {
}
std::string Error;
std::cout << __func__ << " : " << __LINE__ << std::endl;
if(Op=="start") {
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimulationCoordinator()->StartSim(SimId,Id,Error);
std::cout << __func__ << " : " << __LINE__ << std::endl;
} else if(Op=="stop") {
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimulationCoordinator()->StopSim(Id,Error);
std::cout << __func__ << " : " << __LINE__ << std::endl;
} else if(Op=="pause") {
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimulationCoordinator()->PauseSim(Id,Error);
std::cout << __func__ << " : " << __LINE__ << std::endl;
} else if(Op=="cancel") {
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimulationCoordinator()->CancelSim(Id,Error);
std::cout << __func__ << " : " << __LINE__ << std::endl;
} else if(Op=="resume") {
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimulationCoordinator()->ResumeSim(Id,Error);
std::cout << __func__ << " : " << __LINE__ << std::endl;
}
std::cout << __func__ << " : " << __LINE__ << std::endl;
if(Error.empty()) {
std::cout << __func__ << " : " << __LINE__ << std::endl;
OWLSObjects::SimulationStatus S;
std::cout << __func__ << " : " << __LINE__ << std::endl;
SimStats()->GetCurrent(S);
std::cout << __func__ << " : " << __LINE__ << std::endl;
Poco::JSON::Object Answer;
std::cout << __func__ << " : " << __LINE__ << std::endl;
S.to_json(Answer);
std::cout << __func__ << " : " << __LINE__ << std::endl;
return ReturnObject(Answer);
}
std::cout << __func__ << " : " << __LINE__ << std::endl;
return BadRequest(Error);
}
}