ROS2ControllersSystemComponent.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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
  4. * of this distribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0 OR MIT
  7. *
  8. */
  9. #include "ROS2ControllersSystemComponent.h"
  10. #include <ROS2Controllers/ROS2ControllersTypeIds.h>
  11. #include <AzCore/Serialization/SerializeContext.h>
  12. #include <ROS2Controllers/Controllers/PidConfiguration.h>
  13. #include <VehicleDynamics/VehicleModelComponent.h>
  14. namespace ROS2Controllers
  15. {
  16. AZ_COMPONENT_IMPL(ROS2ControllersSystemComponent, "ROS2ControllersSystemComponent", ROS2ControllersSystemComponentTypeId);
  17. void ROS2ControllersSystemComponent::Reflect(AZ::ReflectContext* context)
  18. {
  19. // Reflect structs not strictly owned by any single component
  20. ROS2::Controllers::PidConfiguration::Reflect(context);
  21. ROS2::VehicleDynamics::VehicleModelComponent::Reflect(context);
  22. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  23. {
  24. serializeContext->Class<ROS2ControllersSystemComponent, AZ::Component>()->Version(0);
  25. }
  26. }
  27. void ROS2ControllersSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  28. {
  29. provided.push_back(AZ_CRC_CE("ROS2ControllersService"));
  30. }
  31. void ROS2ControllersSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  32. {
  33. incompatible.push_back(AZ_CRC_CE("ROS2ControllersService"));
  34. }
  35. void ROS2ControllersSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  36. {
  37. }
  38. void ROS2ControllersSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  39. {
  40. }
  41. } // namespace ROS2Controllers