Commit b60385dc authored by Ulrich Kemloh's avatar Ulrich Kemloh

implementing grpc: google remote procedure call

parent 034b33e5
This diff is collapsed.
// Generated by the gRPC protobuf plugin.
// If you make any local change, they will be lost.
// source: MATSimInterface.proto
#ifndef GRPC_MATSimInterface_2eproto__INCLUDED
#define GRPC_MATSimInterface_2eproto__INCLUDED
#include "MATSimInterface.pb.h"
#include <grpc++/impl/internal_stub.h>
#include <grpc++/impl/rpc_method.h>
#include <grpc++/impl/service_type.h>
#include <grpc++/status.h>
namespace grpc {
class CompletionQueue;
class ChannelInterface;
class RpcService;
class ServerContext;
template <class OutMessage> class ClientAsyncResponseReader;
template <class OutMessage> class ServerAsyncResponseWriter;
} // namespace grpc
namespace hybrid {
class MATSimInterfaceService GRPC_FINAL {
public:
class Stub GRPC_FINAL : public ::grpc::InternalStub {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
::grpc::Status reqExtern2MATSim(::grpc::ClientContext* context, const ::hybrid::Extern2MATSim& request, ::hybrid::Extern2MATSimConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::Extern2MATSimConfirmed>> AsyncreqExtern2MATSim(::grpc::ClientContext* context, const ::hybrid::Extern2MATSim& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqAgentStuck(::grpc::ClientContext* context, const ::hybrid::AgentsStuck& request, ::hybrid::AgentsStuckConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::AgentsStuckConfirmed>> AsyncreqAgentStuck(::grpc::ClientContext* context, const ::hybrid::AgentsStuck& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqExternalConnect(::grpc::ClientContext* context, const ::hybrid::ExternalConnect& request, ::hybrid::ExternalConnectConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::ExternalConnectConfirmed>> AsyncreqExternalConnect(::grpc::ClientContext* context, const ::hybrid::ExternalConnect& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqExternSimStepFinished(::grpc::ClientContext* context, const ::hybrid::ExternSimStepFinished& request, ::hybrid::ExternSimStepFinishedReceived* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::ExternSimStepFinishedReceived>> AsyncreqExternSimStepFinished(::grpc::ClientContext* context, const ::hybrid::ExternSimStepFinished& request, ::grpc::CompletionQueue* cq, void* tag);
private:
const ::grpc::RpcMethod rpcmethod_reqExtern2MATSim_;
const ::grpc::RpcMethod rpcmethod_reqAgentStuck_;
const ::grpc::RpcMethod rpcmethod_reqExternalConnect_;
const ::grpc::RpcMethod rpcmethod_reqExternSimStepFinished_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
class Service : public ::grpc::SynchronousService {
public:
Service() : service_(nullptr) {}
virtual ~Service();
virtual ::grpc::Status reqExtern2MATSim(::grpc::ServerContext* context, const ::hybrid::Extern2MATSim* request, ::hybrid::Extern2MATSimConfirmed* response);
virtual ::grpc::Status reqAgentStuck(::grpc::ServerContext* context, const ::hybrid::AgentsStuck* request, ::hybrid::AgentsStuckConfirmed* response);
virtual ::grpc::Status reqExternalConnect(::grpc::ServerContext* context, const ::hybrid::ExternalConnect* request, ::hybrid::ExternalConnectConfirmed* response);
virtual ::grpc::Status reqExternSimStepFinished(::grpc::ServerContext* context, const ::hybrid::ExternSimStepFinished* request, ::hybrid::ExternSimStepFinishedReceived* response);
::grpc::RpcService* service() GRPC_OVERRIDE GRPC_FINAL;
private:
::grpc::RpcService* service_;
};
class AsyncService GRPC_FINAL : public ::grpc::AsynchronousService {
public:
explicit AsyncService(::grpc::CompletionQueue* cq);
~AsyncService() {};
void RequestreqExtern2MATSim(::grpc::ServerContext* context, ::hybrid::Extern2MATSim* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::Extern2MATSimConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqAgentStuck(::grpc::ServerContext* context, ::hybrid::AgentsStuck* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::AgentsStuckConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqExternalConnect(::grpc::ServerContext* context, ::hybrid::ExternalConnect* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::ExternalConnectConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqExternSimStepFinished(::grpc::ServerContext* context, ::hybrid::ExternSimStepFinished* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::ExternSimStepFinishedReceived>* response, ::grpc::CompletionQueue* cq, void *tag);
};
};
class ExternInterfaceService GRPC_FINAL {
public:
class Stub GRPC_FINAL : public ::grpc::InternalStub {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
::grpc::Status reqMATSim2ExternHasSpace(::grpc::ClientContext* context, const ::hybrid::MATSim2ExternHasSpace& request, ::hybrid::MATSim2ExternHasSpaceConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::MATSim2ExternHasSpaceConfirmed>> AsyncreqMATSim2ExternHasSpace(::grpc::ClientContext* context, const ::hybrid::MATSim2ExternHasSpace& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqMATSim2ExternPutAgent(::grpc::ClientContext* context, const ::hybrid::MATSim2ExternPutAgent& request, ::hybrid::MATSim2ExternPutAgentConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::MATSim2ExternPutAgentConfirmed>> AsyncreqMATSim2ExternPutAgent(::grpc::ClientContext* context, const ::hybrid::MATSim2ExternPutAgent& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqExternDoSimStep(::grpc::ClientContext* context, const ::hybrid::ExternDoSimStep& request, ::hybrid::ExternDoSimStepReceived* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::ExternDoSimStepReceived>> AsyncreqExternDoSimStep(::grpc::ClientContext* context, const ::hybrid::ExternDoSimStep& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqExternOnPrepareSim(::grpc::ClientContext* context, const ::hybrid::ExternOnPrepareSim& request, ::hybrid::ExternOnPrepareSimConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::ExternOnPrepareSimConfirmed>> AsyncreqExternOnPrepareSim(::grpc::ClientContext* context, const ::hybrid::ExternOnPrepareSim& request, ::grpc::CompletionQueue* cq, void* tag);
::grpc::Status reqExternAfterSim(::grpc::ClientContext* context, const ::hybrid::ExternAfterSim& request, ::hybrid::ExternAfterSimConfirmed* response);
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::hybrid::ExternAfterSimConfirmed>> AsyncreqExternAfterSim(::grpc::ClientContext* context, const ::hybrid::ExternAfterSim& request, ::grpc::CompletionQueue* cq, void* tag);
private:
const ::grpc::RpcMethod rpcmethod_reqMATSim2ExternHasSpace_;
const ::grpc::RpcMethod rpcmethod_reqMATSim2ExternPutAgent_;
const ::grpc::RpcMethod rpcmethod_reqExternDoSimStep_;
const ::grpc::RpcMethod rpcmethod_reqExternOnPrepareSim_;
const ::grpc::RpcMethod rpcmethod_reqExternAfterSim_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
class Service : public ::grpc::SynchronousService {
public:
Service() : service_(nullptr) {}
virtual ~Service();
virtual ::grpc::Status reqMATSim2ExternHasSpace(::grpc::ServerContext* context, const ::hybrid::MATSim2ExternHasSpace* request, ::hybrid::MATSim2ExternHasSpaceConfirmed* response);
virtual ::grpc::Status reqMATSim2ExternPutAgent(::grpc::ServerContext* context, const ::hybrid::MATSim2ExternPutAgent* request, ::hybrid::MATSim2ExternPutAgentConfirmed* response);
virtual ::grpc::Status reqExternDoSimStep(::grpc::ServerContext* context, const ::hybrid::ExternDoSimStep* request, ::hybrid::ExternDoSimStepReceived* response);
virtual ::grpc::Status reqExternOnPrepareSim(::grpc::ServerContext* context, const ::hybrid::ExternOnPrepareSim* request, ::hybrid::ExternOnPrepareSimConfirmed* response);
virtual ::grpc::Status reqExternAfterSim(::grpc::ServerContext* context, const ::hybrid::ExternAfterSim* request, ::hybrid::ExternAfterSimConfirmed* response);
::grpc::RpcService* service() GRPC_OVERRIDE GRPC_FINAL;
private:
::grpc::RpcService* service_;
};
class AsyncService GRPC_FINAL : public ::grpc::AsynchronousService {
public:
explicit AsyncService(::grpc::CompletionQueue* cq);
~AsyncService() {};
void RequestreqMATSim2ExternHasSpace(::grpc::ServerContext* context, ::hybrid::MATSim2ExternHasSpace* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::MATSim2ExternHasSpaceConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqMATSim2ExternPutAgent(::grpc::ServerContext* context, ::hybrid::MATSim2ExternPutAgent* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::MATSim2ExternPutAgentConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqExternDoSimStep(::grpc::ServerContext* context, ::hybrid::ExternDoSimStep* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::ExternDoSimStepReceived>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqExternOnPrepareSim(::grpc::ServerContext* context, ::hybrid::ExternOnPrepareSim* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::ExternOnPrepareSimConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
void RequestreqExternAfterSim(::grpc::ServerContext* context, ::hybrid::ExternAfterSim* request, ::grpc::ServerAsyncResponseWriter< ::hybrid::ExternAfterSimConfirmed>* response, ::grpc::CompletionQueue* cq, void *tag);
};
};
} // namespace hybrid
#endif // GRPC_MATSimInterface_2eproto__INCLUDED
This diff is collapsed.
This diff is collapsed.
syntax = "proto2";
option java_generic_services = true;
//option cc_generic_services = true;
option java_outer_classname="ProtoMATSimInterface";
option java_package = "playground.gregor.proto";
package hybrid;
//for compilation
// protoc --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` MATSimInterface.proto
// protoc --cpp_out="./" MATSimInterface.proto
// protoc -I ../../protos/ --cpp_out=. ../../protos/helloworld.proto
message MATSim2ExternPutAgent {
message Agent {
required string id = 1;
......
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