Add preliminary GRPC server for PyBullet and BulletRobotics.
Will add GRPC client and PyBullet GRPC server plugin. Will cover most/all SharedMemoryCommand/SharedMemoryStatus messages. Run the server, then test using the pybullet_client.py
This commit is contained in:
59
examples/SharedMemory/grpc/pybullet.grpc.pb.cpp
Normal file
59
examples/SharedMemory/grpc/pybullet.grpc.pb.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
// Generated by the gRPC C++ plugin.
|
||||
// If you make any local change, they will be lost.
|
||||
// source: pybullet.proto
|
||||
|
||||
#include "pybullet.pb.h"
|
||||
#include "pybullet.grpc.pb.h"
|
||||
|
||||
#include <grpc++/impl/codegen/async_stream.h>
|
||||
#include <grpc++/impl/codegen/async_unary_call.h>
|
||||
#include <grpc++/impl/codegen/channel_interface.h>
|
||||
#include <grpc++/impl/codegen/client_unary_call.h>
|
||||
#include <grpc++/impl/codegen/method_handler_impl.h>
|
||||
#include <grpc++/impl/codegen/rpc_service_method.h>
|
||||
#include <grpc++/impl/codegen/service_type.h>
|
||||
#include <grpc++/impl/codegen/sync_stream.h>
|
||||
namespace pybullet_grpc {
|
||||
|
||||
static const char* PyBulletAPI_method_names[] = {
|
||||
"/pybullet_grpc.PyBulletAPI/SubmitCommand",
|
||||
};
|
||||
|
||||
std::unique_ptr< PyBulletAPI::Stub> PyBulletAPI::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
|
||||
std::unique_ptr< PyBulletAPI::Stub> stub(new PyBulletAPI::Stub(channel));
|
||||
return stub;
|
||||
}
|
||||
|
||||
PyBulletAPI::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
|
||||
: channel_(channel), rpcmethod_SubmitCommand_(PyBulletAPI_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel)
|
||||
{}
|
||||
|
||||
::grpc::Status PyBulletAPI::Stub::SubmitCommand(::grpc::ClientContext* context, const ::pybullet_grpc::PyBulletCommand& request, ::pybullet_grpc::PyBulletStatus* response) {
|
||||
return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_SubmitCommand_, context, request, response);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::pybullet_grpc::PyBulletStatus>* PyBulletAPI::Stub::AsyncSubmitCommandRaw(::grpc::ClientContext* context, const ::pybullet_grpc::PyBulletCommand& request, ::grpc::CompletionQueue* cq) {
|
||||
return new ::grpc::ClientAsyncResponseReader< ::pybullet_grpc::PyBulletStatus>(channel_.get(), cq, rpcmethod_SubmitCommand_, context, request);
|
||||
}
|
||||
|
||||
PyBulletAPI::Service::Service() {
|
||||
AddMethod(new ::grpc::RpcServiceMethod(
|
||||
PyBulletAPI_method_names[0],
|
||||
::grpc::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::RpcMethodHandler< PyBulletAPI::Service, ::pybullet_grpc::PyBulletCommand, ::pybullet_grpc::PyBulletStatus>(
|
||||
std::mem_fn(&PyBulletAPI::Service::SubmitCommand), this)));
|
||||
}
|
||||
|
||||
PyBulletAPI::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status PyBulletAPI::Service::SubmitCommand(::grpc::ServerContext* context, const ::pybullet_grpc::PyBulletCommand* request, ::pybullet_grpc::PyBulletStatus* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
|
||||
} // namespace pybullet_grpc
|
||||
|
||||
Reference in New Issue
Block a user