ROS2FrameSystemBus.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/Component/EntityId.h>
  10. #include <AzCore/EBus/EBus.h>
  11. #include <AzCore/EBus/Policies.h>
  12. #include <AzCore/Interface/Interface.h>
  13. #include <AzCore/RTTI/RTTIMacros.h>
  14. #include <AzCore/std/containers/set.h>
  15. #include <AzCore/std/string/string.h>
  16. #include <ROS2/Frame/ROS2FrameConfiguration.h>
  17. namespace ROS2
  18. {
  19. class ROS2FrameSystemRequests
  20. {
  21. public:
  22. AZ_RTTI(ROS2FrameSystemRequests, "{24fe4584-0499-4a37-bc1a-00ca04bd22f5}");
  23. //! Registers the ROS2FrameEditorComponent into the ROS2FrameSystemComponent. All ROS2FrameEditorComponents should
  24. //! register using this function during activation.
  25. //! This is used to properly handle the entity tree and namespaces, for the ROS2FrameEditorComponents.
  26. //! @param frameEntityId entityId containing the frame to register.
  27. virtual void RegisterFrame(const AZ::EntityId& frameEntityId) = 0;
  28. //! Unregister the ROS2FrameEditorComponent into the system. All ROS2FrameEditorComponents should
  29. //! unregister using this function during deactivation.
  30. //! @param frameEntityId entityId containing the frame to unregister.
  31. virtual void UnregisterFrame(const AZ::EntityId& frameEntityId) = 0;
  32. };
  33. class ROS2FrameSystemBusTraits : public AZ::EBusTraits
  34. {
  35. public:
  36. static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  37. static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
  38. };
  39. using ROS2FrameSystemInterface = AZ::Interface<ROS2FrameSystemRequests>;
  40. using ROS2FrameSystemBus = AZ::EBus<ROS2FrameSystemRequests>;
  41. } // namespace ROS2