nav_server.h 953 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Created by zx on 23-7-15.
  3. //
  4. #ifndef NAVIGATION_NAV_SERVER_H
  5. #define NAVIGATION_NAV_SERVER_H
  6. #include "MPC/navigation_main.h"
  7. class NavServer : public NavMessage::NavExcutor::Service {
  8. public:
  9. NavServer(Navigation *navigator) {
  10. navigator_ = navigator;
  11. }
  12. virtual ~NavServer() {}
  13. private:
  14. virtual ::grpc::Status Start(::grpc::ServerContext *context,
  15. const ::NavMessage::NavCmd *request, ::NavMessage::NavResponse *response);
  16. virtual ::grpc::Status Cancel(::grpc::ServerContext *context,
  17. const ::NavMessage::NavCmd *request, ::NavMessage::NavResponse *response);
  18. virtual ::grpc::Status ManualOperation(::grpc::ServerContext *context,
  19. const ::NavMessage::ManualCmd *request, ::NavMessage::NavResponse *response);
  20. protected:
  21. Navigation *navigator_ = nullptr;
  22. };
  23. #endif //NAVIGATION_NAV_SERVER_H