// // Created by zx on 23-7-15. // #include "nav_server.h" ::grpc::Status NavServer::Start(::grpc::ServerContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response){ std::cout << "server received StartCmd: " << request->key() << std::endl; if(navigator_!= nullptr){ navigator_->Start(*request,*response); } return ::grpc::Status::OK; } ::grpc::Status NavServer::Cancel(::grpc::ServerContext* context, const ::NavMessage::NavCmd* request, ::NavMessage::NavResponse* response){ std::cout << "server received Cancel Cmd: " << request->key() << std::endl; if(navigator_!= nullptr){ navigator_->Cancel(*request,*response); } return ::grpc::Status::OK; }