GetEntitiesStatesServiceHandler.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/std/string/string_view.h>
  10. #include <Interfaces/ISimulationFeaturesBase.h>
  11. #include <ROS2/Handlers/ROS2ServiceBase.h>
  12. #include <simulation_interfaces/srv/get_entities_states.hpp>
  13. namespace ROS2SimulationInterfaces
  14. {
  15. class GetEntitiesStatesServiceHandler
  16. : public ROS2::ROS2ServiceBase<simulation_interfaces::srv::GetEntitiesStates>
  17. , public ISimulationFeaturesBase
  18. {
  19. public:
  20. AZStd::string_view GetTypeName() const override
  21. {
  22. return "GetEntitiesStates";
  23. }
  24. AZStd::string_view GetDefaultName() const override
  25. {
  26. return "get_entities_states";
  27. }
  28. AZStd::unordered_set<SimulationFeatureType> GetProvidedFeatures() override;
  29. AZStd::optional<Response> HandleServiceRequest(const std::shared_ptr<rmw_request_id_t> header, const Request& request) override;
  30. };
  31. } // namespace ROS2SimulationInterfaces