Commit e310e9e2 authored by Ulrich Kemloh's avatar Ulrich Kemloh

Cleaning

parent 97218519
......@@ -109,7 +109,7 @@ bool HybridSimulationManager::Run(Simulation& sim)
//create the server
std::string server_address(_externalServerName + ":" + std::to_string(_externalServerPort));
JPSserver jupedsimService(sim,extern_service_address);
JPSserver jupedsimService(sim);
jupedsimService.SetDuplexClient(_rpcClient);
//MATSIMserver jupedsimService;
......
......@@ -14,6 +14,7 @@
#include <grpc++/server.h>
#include "../pedestrian/AgentsSourcesManager.h"
//forward classes
class Building;
class AgentsSourcesManager;
......@@ -23,7 +24,16 @@ class Simulation;
class HybridSimulationManager
{
public:
/**
* Constructor
* @param server, the server name to listen
* @param port, the server port to listen
*/
HybridSimulationManager(const std::string& server,int port);
/**
* Destructor
*/
virtual ~HybridSimulationManager();
bool Init(Building* building);
......
......@@ -151,7 +151,7 @@ bool JPSclient::NotifyEndOfSimulation()
ExternSimStepFinishedReceived reply;
Status status =_matsimChannel->reqExternSimStepFinished(&context, request, &reply);
Log->Write("INFO:\tRPC::JPSserver simulation step finished");
//Log->Write("INFO:\tRPC::JPSserver simulation step finished");
//std::cout<<"Details: "<<status.details()<<endl;
return status.IsOk();
}
......
......@@ -30,7 +30,7 @@ extern OutputHandler* Log;
using namespace std;
JPSserver::JPSserver(Simulation& src, const std::string& connection): _SimManager(src)
JPSserver::JPSserver(Simulation& src): _SimManager(src)
{
//_rpcClient = std::unique_ptr<JPSclient>(new JPSclient( grpc::CreateChannel(connection,
// grpc::InsecureCredentials(), grpc::ChannelArguments())));
......@@ -64,7 +64,7 @@ void JPSserver::RunSimulation()
_SimManager.RunFooter();
}
Status JPSserver::reqMATSim2ExternHasSpace(ServerContext* context,
Status JPSserver::reqMATSim2ExternHasSpace(ServerContext* context __attribute__((unused)),
const MATSim2ExternHasSpace* request,
MATSim2ExternHasSpaceConfirmed* response)
{
......@@ -76,9 +76,9 @@ Status JPSserver::reqMATSim2ExternHasSpace(ServerContext* context,
return Status::OK;
}
Status JPSserver::reqMATSim2ExternPutAgent(ServerContext* context,
Status JPSserver::reqMATSim2ExternPutAgent(ServerContext* context __attribute__((unused)),
const MATSim2ExternPutAgent* request,
MATSim2ExternPutAgentConfirmed* response)
MATSim2ExternPutAgentConfirmed* response __attribute__((unused)))
{
//Log->Write("INFO:\tRPC::JPSserver I have space on node " + nodeID);
string agent_id=request->agent().id();
......@@ -136,8 +136,10 @@ Status JPSserver::reqExternOnPrepareSim(ServerContext* context __attribute__((un
return Status::OK;
}
Status JPSserver::reqExternAfterSim(ServerContext* context,
const ExternAfterSim* request, ExternAfterSimConfirmed* response)
Status JPSserver::reqExternAfterSim(
ServerContext* context __attribute__((unused)),
const ExternAfterSim* request __attribute__((unused)),
ExternAfterSimConfirmed* response __attribute__((unused)))
{
Log->Write("INFO:\tRPC::JPSserver I received shutdown order. But can I do that ?");
_shutdown=true;
......
......@@ -37,7 +37,7 @@ public:
* constructor with an agent source manager, which will be
* responsible for positioning the agents.
*/
JPSserver(Simulation& src, const std::string& connection);
JPSserver(Simulation& src);
/**
* Destructor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment