diff --git a/nebula_hw_interfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_aeva/connections/aeva_api.hpp b/nebula_hw_interfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_aeva/connections/aeva_api.hpp index 9faf2e4c3..55999a904 100644 --- a/nebula_hw_interfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_aeva/connections/aeva_api.hpp +++ b/nebula_hw_interfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_aeva/connections/aeva_api.hpp @@ -37,6 +37,17 @@ namespace nebula::drivers::connections::aeva static const uint16_t g_aeva_header = 0xAEFA; +static const uint16_t g_port_spherical_point_cloud = 41000; +static const uint16_t g_port_health = 41001; +static const uint16_t g_port_config = 41002; +static const uint16_t g_port_telemetry = 41003; +static const uint16_t g_port_calibration = 41005; +static const uint16_t g_port_image = 41006; +static const uint16_t g_port_reconfig_request = 21901; +static const uint16_t g_port_reconfig_response = 41007; +static const uint16_t g_port_log = 41009; +static const uint16_t g_port_imu = 41010; + enum class AevaStreamType : uint16_t { kSphericalPointCloud = 0, kHealth = 1, diff --git a/nebula_hw_interfaces/src/nebula_aeva_hw_interfaces/aeva_hw_interface.cpp b/nebula_hw_interfaces/src/nebula_aeva_hw_interfaces/aeva_hw_interface.cpp index 1245e6bff..3a3f2fedd 100644 --- a/nebula_hw_interfaces/src/nebula_aeva_hw_interfaces/aeva_hw_interface.cpp +++ b/nebula_hw_interfaces/src/nebula_aeva_hw_interfaces/aeva_hw_interface.cpp @@ -16,6 +16,8 @@ #include "nebula_hw_interfaces/nebula_hw_interfaces_aeva/aeva_hw_interface.hpp" +#include "nebula_hw_interfaces/nebula_hw_interfaces_aeva/connections/aeva_api.hpp" + namespace nebula::drivers { @@ -94,25 +96,29 @@ std::shared_ptr AevaHwInterface::make_reconfig_api( const aeva::Aeries2Config & config, const std::shared_ptr & logger) { return std::make_shared( - std::make_shared(config.sensor_ip, 41007), - std::make_shared(config.sensor_ip, 21901), logger->child("ReconfigApi")); + std::make_shared(config.sensor_ip, connections::aeva::g_port_reconfig_response), + std::make_shared(config.sensor_ip, connections::aeva::g_port_reconfig_request), + logger->child("ReconfigApi")); } std::shared_ptr AevaHwInterface::make_pointcloud_api( const aeva::Aeries2Config & config) { - return std::make_shared(std::make_shared(config.sensor_ip, 41000)); + return std::make_shared( + std::make_shared(config.sensor_ip, connections::aeva::g_port_spherical_point_cloud)); } std::shared_ptr AevaHwInterface::make_health_api(const aeva::Aeries2Config & config) { - return std::make_shared(std::make_shared(config.sensor_ip, 41001)); + return std::make_shared( + std::make_shared(config.sensor_ip, connections::aeva::g_port_health)); } std::shared_ptr AevaHwInterface::make_telemetry_api( const aeva::Aeries2Config & config) { - return std::make_shared(std::make_shared(config.sensor_ip, 41003)); + return std::make_shared( + std::make_shared(config.sensor_ip, connections::aeva::g_port_telemetry)); } } // namespace nebula::drivers